diff options
Diffstat (limited to 'gcc/configure')
-rwxr-xr-x | gcc/configure | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/gcc/configure b/gcc/configure index 2da3716d834..a4549469816 100755 --- a/gcc/configure +++ b/gcc/configure @@ -25445,6 +25445,53 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_eh_gc_sections" >&5 $as_echo "$gcc_cv_ld_eh_gc_sections" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker EH garbage collection of sections bug" >&5 +$as_echo_n "checking linker EH garbage collection of sections bug... " >&6; } +gcc_cv_ld_eh_gc_sections_bug=no +if test $in_tree_ld = yes ; then + if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -lt 19 -o "$gcc_cv_gld_major_version" -lt 2 \ + && test $in_tree_ld_is_elf = yes; then + gcc_cv_ld_eh_gc_sections_bug=yes + fi +elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x -a x$gcc_cv_as_comdat_group = xyes; then + gcc_cv_ld_eh_gc_sections_bug=yes + cat > conftest.s <<EOF + .section .text +.globl _start + .type _start, @function +_start: + .long foo + .size _start, .-_start + .section .text.startup.foo,"ax",@progbits + .type foo, @function +foo: + .long 0 + .size foo, .-foo + .section .gcc_except_table.foo,"a",@progbits +.L0: + .long 0 + .section .eh_frame,"a",@progbits + .long .L0 +EOF + if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then + if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \ + | grep "gc-sections option ignored" > /dev/null; then + : + elif $gcc_cv_objdump -h conftest 2> /dev/null \ + | grep gcc_except_table > /dev/null; then + gcc_cv_ld_eh_gc_sections_bug=no + fi + fi + rm -f conftest.s conftest.o conftest +fi +if test x$gcc_cv_ld_eh_gc_sections_bug = xyes; then + +$as_echo "#define HAVE_LD_EH_GC_SECTIONS_BUG 1" >>confdefs.h + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_eh_gc_sections_bug" >&5 +$as_echo "$gcc_cv_ld_eh_gc_sections_bug" >&6; } + # -------- # UNSORTED # -------- |