summaryrefslogtreecommitdiff
path: root/gcc/configure.ac
diff options
context:
space:
mode:
authorro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>2012-02-20 11:47:25 +0000
committerro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>2012-02-20 11:47:25 +0000
commit1c6e4ce9d88b644e398b2f4337195cd497841a04 (patch)
treea77f9137c76c7d39fcac1110b79efb90d3a95ab7 /gcc/configure.ac
parenteeff6a54fe4eef656054dfb2053e1d4b006720ac (diff)
downloadgcc-1c6e4ce9d88b644e398b2f4337195cd497841a04.tar.gz
Enable initfini array support on Solaris (PR target/50166)
* acinclude.m4 (gcc_AC_INITFINI_ARRAY): Require gcc_SUN_LD_VERSION. Define _start. Remove -e 0 from $gcc_cv_ld invocation. Only use __GLIBC_PREREQ if defined. Enable on Solaris since Solaris 8 patch. (gcc_SUN_LD_VERSION): New macro. * configure.ac (ld_ver) <*-*-solaris2*>: Refer to gcc_SUN_LD_VERSION for version number format. * configure: Regenerate. * varasm.c (get_elf_initfini_array_priority_section): Set SECTION_NOTYPE for non-default priority. Use get_section instead of get_unnamed_section to emit .init_array/.fini_array with default priority. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184390 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/configure.ac')
-rw-r--r--gcc/configure.ac12
1 files changed, 4 insertions, 8 deletions
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 5d6aa5d3c28..97be57b83e3 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -2296,15 +2296,11 @@ if test $in_tree_ld != yes ; then
else
case "${target}" in
*-*-solaris2*)
+ # See acinclude.m4 (gcc_SUN_LD_VERSION) for the version number
+ # format.
#
- # Solaris 2 ld -V output looks like this for a regular version:
- #
- # ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1699
- #
- # but test versions add stuff at the end:
- #
- # ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1701:onnv-ab196087-6931056-03/25/10
- #
+ # Don't reuse gcc_gv_sun_ld_vers_* in case a linker other than
+ # /usr/ccs/bin/ld has been configured.
ld_ver=`$gcc_cv_ld -V 2>&1`
if echo "$ld_ver" | grep 'Solaris Link Editors' > /dev/null; then
ld_vers=`echo $ld_ver | sed -n \