Bug #7606 » pie-check.diff
configure.in | ||
---|---|---|
if test "$GCC" = yes -a -z "$EXTSTATIC" -a "x$pie" != xno; then
|
||
RUBY_TRY_CFLAGS(-fPIE, [pie=yes], [pie=no])
|
||
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"
|
||
for pie in -pie -Wl,-pie; do
|
||
RUBY_TRY_LDFLAGS([$pie], [], [pie=])
|
||
if test "x$pie" != x; then
|
||
RUBY_APPEND_OPTION(XCFLAGS, -fPIE)
|
||
RUBY_APPEND_OPTION(XLDFLAGS, $pie)
|
||
break
|
||
fi
|
||
done
|
||
CFLAGS="$save_CFLAGS_before_pie"
|
||
fi
|
||
fi
|
||
])
|
- « Previous
- 1
- 2
- Next »