diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/configure b/configure index 45cc7cba2b..86feb6a79f 100755 --- a/configure +++ b/configure @@ -624,6 +624,7 @@ libc_cv_cc_loop_to_function libc_cv_cc_submachine libc_cv_cc_nofma exceptions +libc_cv_ld_secondary gnu89_inline libc_cv_ssp fno_unit_at_a_time @@ -6488,8 +6489,10 @@ if { ac_try='${CC-cc} $ASFLAGS -c conftest.s 1>&5' $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then libc_cv_asm_weak_directive=yes + libc_cv_asm_weak=.weak else libc_cv_asm_weak_directive=no + libc_cv_asm_weak= fi rm -f conftest* fi @@ -6518,6 +6521,7 @@ EOF $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then libc_cv_asm_weakext_directive=yes + libc_cv_asm_weak=.weakext else libc_cv_asm_weakext_directive=no fi @@ -6536,6 +6540,71 @@ elif test $libc_cv_asm_weakext_directive = yes; then fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for .secondary assembler directive" >&5 +$as_echo_n "checking for .secondary assembler directive... " >&6; } +if ${libc_cv_asm_secondary_directive+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.s <<EOF +${libc_cv_dot_text} +_sym: +.secondary _sym +EOF +test -n "$libc_cv_asm_weak" && cat >> conftest.s <<EOF +$libc_cv_asm_weak _sym +EOF +if ${CC-cc} -c $ASFLAGS -o conftest.o conftest.s 1>&5 2>&5; then + if $READELF -s conftest.o | fgrep _sym | fgrep SECOND > /dev/null; then + libc_cv_asm_secondary_directive=yes + else + libc_cv_asm_secondary_directive=no + fi +else + libc_cv_asm_secondary_directive=no +fi +rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_asm_secondary_directive" >&5 +$as_echo "$libc_cv_asm_secondary_directive" >&6; } +if test $libc_cv_asm_secondary_directive = yes; then + $as_echo "#define HAVE_ASM_SECONDARY_DIRECTIVE 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for secondary symbol in shared library" >&5 +$as_echo_n "checking for secondary symbol in shared library... " >&6; } +if ${libc_cv_ld_secondary+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.c <<EOF +asm (".secondary foo"); +void foo (void) { } +EOF + if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS + -fPIC -shared -o conftest.so conftest.c + -nostartfiles -nostdlib + 1>&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } + then + if $READELF -s conftest.so | fgrep foo | fgrep SECOND > /dev/null; then + libc_cv_ld_secondary=yes + else + libc_cv_ld_secondary=no + fi + else + libc_cv_ld_secondary=no + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ld_secondary" >&5 +$as_echo "$libc_cv_ld_secondary" >&6; } +else + libc_cv_ld_secondary=no +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld --no-whole-archive" >&5 $as_echo_n "checking for ld --no-whole-archive... " >&6; } if ${libc_cv_ld_no_whole_archive+:} false; then : |