diff options
Diffstat (limited to 'sysdeps/i386')
-rw-r--r-- | sysdeps/i386/configure | 7 | ||||
-rw-r--r-- | sysdeps/i386/configure.ac | 6 |
2 files changed, 12 insertions, 1 deletions
diff --git a/sysdeps/i386/configure b/sysdeps/i386/configure index 4d6685f7c2..4cf968d8bc 100644 --- a/sysdeps/i386/configure +++ b/sysdeps/i386/configure @@ -26,7 +26,7 @@ libc_compiler_builtin_inlined=no cat > conftest.c <<EOF int _start (void) { int a, b, c; __sync_val_compare_and_swap (&a, b, c); return 0; } EOF -if ! { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS +if ! { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp -O0 -nostdlib -nostartfiles -S conftest.c -o - | fgrep "__sync_val_compare_and_swap" 1>&5' @@ -79,3 +79,8 @@ fi $as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h + +if test x"$multi_arch" != xno; then + $as_echo "#define NO_HIDDEN_EXTERN_FUNC_IN_PIE 1" >>confdefs.h + +fi diff --git a/sysdeps/i386/configure.ac b/sysdeps/i386/configure.ac index f7766ad2b8..b598b120bc 100644 --- a/sysdeps/i386/configure.ac +++ b/sysdeps/i386/configure.ac @@ -48,3 +48,9 @@ fi dnl It is always possible to access static and hidden symbols in an dnl position independent way. AC_DEFINE(PI_STATIC_AND_HIDDEN) + +dnl When multi-arch is enabled, all external functions must be called +dnl via PIC PLT in PIE, which requires setting up EBX register. +if test x"$multi_arch" != xno; then + AC_DEFINE(NO_HIDDEN_EXTERN_FUNC_IN_PIE) +fi |