mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
configure: accept __stack_chk_fail_local for ssp support too [BZ #20662]
When glibc is compiled with gcc 6.2 that has been configured with --enable-default-pie and --enable-default-ssp, the configure script fails to detect that the compiler has ssp turned on by default when being built for i686-linux-gnu. This is because gcc is emitting __stack_chk_fail_local but the script is only looking for __stack_chk_fail. Support both. Example output: checking whether x86_64-pc-linux-gnu-gcc -m32 -Wl,-O1 -Wl,--as-needed implicitly enables -fstack-protector... no
This commit is contained in:
committed by
Mike Frysinger
parent
001f81ad1e
commit
c7409aded4
8
configure
vendored
8
configure
vendored
@ -6340,12 +6340,14 @@ echo >&5 "libc_undefs='$libc_undefs'"
|
||||
# symbols (resolved by the linker), so filter out unknown symbols.
|
||||
# This will fail to produce the correct result if the compiler
|
||||
# defaults to -fstack-protector but this produces an undefined symbol
|
||||
# other than __stack_chk_fail. However, compilers like that have not
|
||||
# been encountered in practice.
|
||||
libc_undefs=`echo "$libc_undefs" | egrep '^(foobar|__stack_chk_fail)$'`
|
||||
# other than __stack_chk_fail or __stack_chk_fail_local. However,
|
||||
# compilers like that have not been encountered in practice.
|
||||
libc_undefs=`echo "$libc_undefs" | \
|
||||
egrep '^(foobar|__stack_chk_fail|__stack_chk_fail_local)$'`
|
||||
case "$libc_undefs" in
|
||||
foobar) libc_cv_predef_stack_protector=no ;;
|
||||
'__stack_chk_fail
|
||||
foobar'|'__stack_chk_fail_local
|
||||
foobar') libc_cv_predef_stack_protector=yes ;;
|
||||
*) as_fn_error $? "unexpected symbols in test: $libc_undefs" "$LINENO" 5 ;;
|
||||
esac
|
||||
|
Reference in New Issue
Block a user