* configure.in: enable -fPIE when checking -pie for fixing
OpenBSD build error. Patch by George Koehler. Thank you! [Bug #7606] [ruby-core:51082] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e4b760128b
commit
495f72ed38
@ -1,3 +1,9 @@
|
|||||||
|
Wed Dec 26 11:54:11 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||||
|
|
||||||
|
* configure.in: enable -fPIE when checking -pie for fixing
|
||||||
|
OpenBSD build error. Patch by George Koehler. Thank you!
|
||||||
|
[Bug #7606] [ruby-core:51082]
|
||||||
|
|
||||||
Wed Dec 26 07:31:24 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Wed Dec 26 07:31:24 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* string.c (rb_enc_cr_str_copy_for_substr): empty string is always
|
* string.c (rb_enc_cr_str_copy_for_substr): empty string is always
|
||||||
|
@ -2708,14 +2708,21 @@ AS_CASE("$enable_shared", [yes], [
|
|||||||
if test "$GCC" = yes -a -z "$EXTSTATIC" -a "x$pie" != xno; then
|
if test "$GCC" = yes -a -z "$EXTSTATIC" -a "x$pie" != xno; then
|
||||||
RUBY_TRY_CFLAGS(-fPIE, [pie=yes], [pie=no])
|
RUBY_TRY_CFLAGS(-fPIE, [pie=yes], [pie=no])
|
||||||
if test "$pie" = yes; then
|
if test "$pie" = yes; then
|
||||||
RUBY_APPEND_OPTION(XCFLAGS, -fPIE)
|
# Use -fPIE when testing -pie. RUBY_TRY_LDFLAGS sets
|
||||||
|
# $save_CFLAGS internally, so set other name here.
|
||||||
|
save_CFLAGS_before_pie="$CFLAGS"
|
||||||
|
CFLAGS="$CFLAGS -fPIE"
|
||||||
|
|
||||||
|
# gcc need -pie but clang need -Wl,-pie.
|
||||||
for pie in -pie -Wl,-pie; do
|
for pie in -pie -Wl,-pie; do
|
||||||
RUBY_TRY_LDFLAGS([$pie], [], [pie=])
|
RUBY_TRY_LDFLAGS([$pie], [], [pie=])
|
||||||
if test "x$pie" != x; then
|
if test "x$pie" != x; then
|
||||||
|
RUBY_APPEND_OPTION(XCFLAGS, -fPIE)
|
||||||
RUBY_APPEND_OPTION(XLDFLAGS, $pie)
|
RUBY_APPEND_OPTION(XLDFLAGS, $pie)
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
CFLAGS="$save_CFLAGS_before_pie"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user