[build] Check for visibility support in Solaris 8 ld

Submitted by Rainer Orth on Sept. 30, 2010, 9:59 p.m.

Details

Message ID yddzkuyao5m.fsf@manam.CeBiTec.Uni-Bielefeld.DE
State New
Headers show

Commit Message

Rainer Orth Sept. 30, 2010, 9:59 p.m.
Provided one has a recent enough patch for Sun ld on Solaris 8, that
release can support .hidden, too.  The following trivial patch checks
for the required linker version and enables visibility support if
found.  Bootstrapped without regressions on sparc-sun-solaris2.8,
installed.

	Rainer


2010-06-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* configure.ac: Check for Solaris 8 ld with .hidden support.
	* configure: Regenerate.

Patch hide | download patch | download mbox

diff -r 41fded51032e gcc/configure.ac
--- a/gcc/configure.ac	Fri Jun 18 11:19:02 2010 +0200
+++ b/gcc/configure.ac	Fri Jun 18 12:56:37 2010 +0200
@@ -2252,6 +2252,15 @@ 
       hppa64*-*-hpux* | ia64*-*-hpux*)
 	gcc_cv_ld_hidden=yes
 	;;
+      *-*-solaris2.8*)
+        # .hidden support was backported to Solaris 8, starting with ld
+	# version 1.276.
+	if test "$ld_vers_minor" -ge 276; then
+	  gcc_cv_ld_hidden=yes
+	else
+	  gcc_cv_ld_hidden=no
+	fi
+	;;
       *-*-solaris2.9* | *-*-solaris2.1[0-9]*)
 	# Support for .hidden in Sun ld appeared in Solaris 9 FCS, but
 	# .symbolic was only added in Solaris 9 12/02.