mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Disable _FORTIFY_SOURCE on mingw for now
It causes a link error due to some `__*_chk` functions on mingw.
This commit is contained in:
parent
b1c92363a7
commit
a7b9f085ff
1 changed files with 11 additions and 0 deletions
11
configure.ac
11
configure.ac
|
@ -569,6 +569,17 @@ AS_IF([test "$GCC" = yes], [
|
|||
# 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'}
|
||||
|
|
Loading…
Reference in a new issue