mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Fix CFLAGS and CXXFLAGS in RbConfig::CONFIG on FreeBSD and NetBSD/amd64.
* configure.in: Fix a bug introduced in r38342 that the cflagspat substitution is messed up by the way CFLAGS and optflags are modified, which affected FreeBSD and NetBSD/amd64 when configured to use libexecinfo. This bug resulted in CFLAGS and CXXFLAGS in RbConfig::CONFIG having warnflags expanded in them, forcing third-party C/C++ extensions to follow what warnflags demands, like ANSI/ISO-C90 conformance. ref [Bug #7101] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e41b789c99
commit
aeac90e6c5
2 changed files with 19 additions and 2 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
||||||
|
Fri Feb 15 22:21:37 2013 Akinori MUSHA <knu@iDaemons.org>
|
||||||
|
|
||||||
|
* configure.in: Fix a bug introduced in r38342 that the cflagspat
|
||||||
|
substitution is messed up by the way CFLAGS and optflags are
|
||||||
|
modified, which affected FreeBSD and NetBSD/amd64 when
|
||||||
|
configured to use libexecinfo. This bug resulted in CFLAGS and
|
||||||
|
CXXFLAGS in RbConfig::CONFIG having warnflags expanded in them,
|
||||||
|
forcing third-party C/C++ extensions to follow what warnflags
|
||||||
|
demands, like ANSI/ISO-C90 conformance. ref [Bug #7101]
|
||||||
|
|
||||||
Fri Feb 15 20:29:11 2013 Tanaka Akira <akr@fsij.org>
|
Fri Feb 15 20:29:11 2013 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* ext/socket/sockport.h (SET_SIN_LEN): defined for strict-aliasing
|
* ext/socket/sockport.h (SET_SIN_LEN): defined for strict-aliasing
|
||||||
|
|
11
configure.in
11
configure.in
|
@ -2421,8 +2421,15 @@ AS_CASE(["$target_cpu-$target_os"],
|
||||||
execinfo_frame_pointer=no
|
execinfo_frame_pointer=no
|
||||||
RUBY_TRY_CFLAGS(-fno-omit-frame-pointer, [execinfo_frame_pointer=yes])
|
RUBY_TRY_CFLAGS(-fno-omit-frame-pointer, [execinfo_frame_pointer=yes])
|
||||||
if test "x$execinfo_frame_pointer" = xyes; then
|
if test "x$execinfo_frame_pointer" = xyes; then
|
||||||
optflags="${optflags+$optflags }-fno-omit-frame-pointer"
|
# optflags must be manipulated very carefully. For the
|
||||||
CFLAGS="$CFLAGS -fno-omit-frame-pointer"
|
# later cflagspat/cxxflagspat substitution to work, CFLAGS
|
||||||
|
# and CXXFLAGS must start exactly with the value of
|
||||||
|
# optflags.
|
||||||
|
CFLAGS="${CFLAGS# }"; CFLAGS="${CFLAGS#"$optflags "}"
|
||||||
|
CXXFLAGS="${CXXFLAGS# }"; CXXFLAGS="${CXXFLAGS#"$optflags "}"
|
||||||
|
RUBY_APPEND_OPTION(optflags, -fno-omit-frame-pointer)
|
||||||
|
CFLAGS=" $optflags $CFLAGS"
|
||||||
|
CXXFLAGS=" $optflags $CXXFLAGS"
|
||||||
fi
|
fi
|
||||||
fi])
|
fi])
|
||||||
AC_CHECK_FUNCS(backtrace)
|
AC_CHECK_FUNCS(backtrace)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue