summaryrefslogtreecommitdiff
path: root/gcc/configure.ac
diff options
context:
space:
mode:
authorjules <jules@138bc75d-0d04-0410-961f-82ee72b054a4>2005-05-08 16:58:03 +0000
committerjules <jules@138bc75d-0d04-0410-961f-82ee72b054a4>2005-05-08 16:58:03 +0000
commit2593b9be117b0610da5c4147e60762d983cebee2 (patch)
treefd14cfe6d9d55ff5167a2cd3d7ecf8cf70ea5b5b /gcc/configure.ac
parentbc57849d121b77b89ea6eeae043df2bc3aa3c0ba (diff)
downloadgcc-2593b9be117b0610da5c4147e60762d983cebee2.tar.gz
* configure.ac: Set ld_vers_major, ld_vers_minor and ld_vers_patch for
GNU linker. Support linker version x.x.x.x.x. Require GNU linker 20050308/2.16.0 or newer for comdat group. * configure: Regenerated. * config.in: Regenerated. * varasm.c (default_function_rodata_section): Put .rodata section in COMDAT group when necessary. (default_elf_asm_named_section): Rename HAVE_GAS_COMDAT_GROUP to HAVE_COMDAT_GROUP. (default_unique_section_1): Don't use .gnu.linkonce when COMDAT is available. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99395 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/configure.ac')
-rw-r--r--gcc/configure.ac34
1 files changed, 26 insertions, 8 deletions
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 5327e56392b..2a96212817c 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -2104,8 +2104,12 @@ changequote(,)dnl
-e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
-e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
-e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
- -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p'`
+ -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
+ -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p'`
ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'`
+ ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
+ ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
+ ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
if test 0"$ld_date" -lt 20020404; then
if test -n "$ld_date"; then
# If there was date string, but was earlier than 2002-04-04, fail
@@ -2114,9 +2118,6 @@ changequote(,)dnl
# If there was no date string nor ld version number, something is wrong
gcc_cv_ld_hidden=no
else
- ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
- ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
- ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
test -z "$ld_vers_patch" && ld_vers_patch=0
if test "$ld_vers_major" -lt 2; then
gcc_cv_ld_hidden=no
@@ -2258,18 +2259,35 @@ AC_DEFINE_UNQUOTED(HAVE_GAS_SHF_MERGE,
[Define 0/1 if your assembler supports marking sections with SHF_MERGE flag.])
gcc_GAS_CHECK_FEATURE(COMDAT group support, gcc_cv_as_comdat_group,
- [elf,2,15,91], [--fatal-warnings],
+ [elf,2,16,0], [--fatal-warnings],
[.section .text,"axG",@progbits,.foo,comdat])
if test $gcc_cv_as_comdat_group = yes; then
gcc_cv_as_comdat_group_percent=no
else
gcc_GAS_CHECK_FEATURE(COMDAT group support, gcc_cv_as_comdat_group_percent,
- [elf,2,15,91], [--fatal-warnings],
+ [elf,2,16,0], [--fatal-warnings],
[.section .text,"axG",%progbits,.foo,comdat])
fi
-AC_DEFINE_UNQUOTED(HAVE_GAS_COMDAT_GROUP,
+if test $in_tree_ld != yes && test x"$ld_vers" != x; then
+ comdat_group=yes
+ if test 0"$ld_date" -lt 20050308; then
+ if test -n "$ld_date"; then
+ # If there was date string, but was earlier than 2005-03-08, fail
+ comdat_group=no
+ elif test "$ld_vers_major" -lt 2; then
+ comdat_group=no
+ elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 16; then
+ comdat_group=no
+ fi
+ fi
+ if test $comdat_group = no; then
+ gcc_cv_as_comdat_group=no
+ gcc_cv_as_comdat_group_percent=no
+ fi
+fi
+AC_DEFINE_UNQUOTED(HAVE_COMDAT_GROUP,
[`if test $gcc_cv_as_comdat_group = yes || test $gcc_cv_as_comdat_group_percent = yes; then echo 1; else echo 0; fi`],
-[Define 0/1 if your assembler supports COMDAT group.])
+[Define 0/1 if your assembler and linker support COMDAT groups.])
# Thread-local storage - the check is heavily parametrized.
conftest_s=