summaryrefslogtreecommitdiff
path: root/gcc/configure.ac
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2006-12-21 22:10:30 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2006-12-21 22:10:30 +0000
commitc8aaf000d90103d91d3314584c569bc0eb74467a (patch)
treee54d62a50edf79cac72303478711cfb6eec51622 /gcc/configure.ac
parenta100ece7a4b9734ef5bbcf17890fd2bd11179895 (diff)
downloadgcc-c8aaf000d90103d91d3314584c569bc0eb74467a.tar.gz
PR other/29639
* configure.ac (HAVE_LD_EH_GC_SECTIONS): Check that exception tables are kept for .gnu.linkonce.t sections if COMDAT groups are disabled. * configure: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120121 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/configure.ac')
-rw-r--r--gcc/configure.ac36
1 files changed, 36 insertions, 0 deletions
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 26560cf10a5..706735ee95d 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -3192,10 +3192,46 @@ EOF
gcc_cv_ld_eh_gc_sections=no
elif $gcc_cv_objdump -h conftest | grep gcc_except_table > /dev/null; then
gcc_cv_ld_eh_gc_sections=yes
+ # If no COMDAT groups, the compiler will emit .gnu.linkonce.t. sections.
+ if test x$gcc_cv_as_comdat_group != xyes; then
+ gcc_cv_ld_eh_gc_sections=no
+ cat > conftest.s <<EOF
+ .section .text
+.globl _start
+ .type _start, @function
+_start:
+ .long foo
+ .size _start, .-_start
+ .section .gnu.linkonce.t.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
+ gcc_cv_ld_eh_gc_sections=no
+ elif $gcc_cv_objdump -h conftest | grep gcc_except_table > /dev/null; then
+ gcc_cv_ld_eh_gc_sections=yes
+ fi
+ fi
+ fi
fi
fi
rm -f conftest.s conftest.o conftest
fi
+case "$target" in
+ hppa*-*-linux*)
+ # ??? This apparently exposes a binutils bug with PC-relative relocations.
+ gcc_cv_ld_eh_gc_sections=no
+ ;;
+esac
if test x$gcc_cv_ld_eh_gc_sections = xyes; then
AC_DEFINE(HAVE_LD_EH_GC_SECTIONS, 1,
[Define if your linker supports garbage collection of