[前][次][番号順一覧][スレッド一覧]

ruby-changes:59036

From: Nobuyoshi <ko1@a...>
Date: Mon, 2 Dec 2019 13:33:18 +0900 (JST)
Subject: [ruby-changes:59036] a7b9f085ff (master): Disable _FORTIFY_SOURCE on mingw for now

https://git.ruby-lang.org/ruby.git/commit/?id=a7b9f085ff

From a7b9f085ff952fcb18f82de39b3bf9ab7e5ba3e7 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Mon, 2 Dec 2019 13:20:00 +0900
Subject: Disable _FORTIFY_SOURCE on mingw for now

It causes a link error due to some `__*_chk` functions on mingw.

diff --git a/configure.ac b/configure.ac
index 0435f12..2230e18 100644
--- a/configure.ac
+++ b/configure.ac
@@ -569,6 +569,17 @@ AS_IF([test "$GCC" = yes], [ https://github.com/ruby/ruby/blob/trunk/configure.ac#L569
     # argument check. The performance drop is very little and Ubuntu enables
     # _FORTIFY_SOURCE=2 by default. So, let's support it for protecting us from
     # a mistake of silly C extensions.
+
+    # TODO: check if link succeeds with _FORTIFY_SOURCE=2.
+    AS_CASE(["$target_os"],
+    [mingw*], [
+	fortify_source=no
+    ])
+    AC_ARG_ENABLE(fortify_source,
+		  AS_HELP_STRING([--disable-fortify-source],
+				 [disable -D_FORTIFY_SOURCE=2 option, which causes link error on mingw]),
+		  [fortify_source=$enableval])
+    test "x$fortify_source" = xno ||
     RUBY_TRY_CFLAGS(-D_FORTIFY_SOURCE=2, [RUBY_APPEND_OPTION(XCFLAGS, -D_FORTIFY_SOURCE=2)])
 
     : ${MJIT_HEADER_FLAGS='-P -dD'}
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]