[build] Remove support for alternative Solaris 11.4 ld -V output

Message ID yddzhmgtxgw.fsf@CeBiTec.Uni-Bielefeld.DE
State New
Headers show
Series
  • [build] Remove support for alternative Solaris 11.4 ld -V output
Related show

Commit Message

Rainer Orth June 17, 2019, 8:41 a.m.
I've been informed that parsing of Solaris ld -V output doesn't work
with Solaris sed.  The problem is that the alternation used since

	[build] Cleanup Solaris linker version checks
        https://gcc.gnu.org/ml/gcc-patches/2017-11/msg00068.html

isn't recognized by /usr/bin/sed and /usr/xpg4/bin/sed which can only
handle BREs.  This means that all features dependent on ld version
checking aren't supported anymore.

I hadn't recognized this before since I've been using GNU sed
exclusively.  While Illumos sed could work around this by using sed -E
instead, which enables ERE support, this option isn't recognized by
Solaris sed.

Fortunately, the fix is simple: the alternative ld -V output format
handled since the patch above never made it into a non-beta version of
Solaris, and never will, so I'm just removing this again.

Bootstrapped without regressions on i386-pc-solaris2.11 and
sparc-sun-solaris2.11.   Installed for mainline now; will backport to
the gcc-9 and gcc-8 branches after some soak time.

For good measure, I've also run Solaris bootstraps with /usr/bin in
front of /usr/gnu/bin, but this issue was the only difference.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


2019-06-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* configure.ac (ld_vers) <*-*-solaris2*>: Remove support for
	alternative Solaris 11.4 format.
	* configure: Regenerate.

Patch

# HG changeset patch
# Parent  5e2355b076a745aef941612cd3fa7827279e9325
Remove support for alternative Solaris 11.4 ld -V output

diff --git a/gcc/configure.ac b/gcc/configure.ac
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -2684,17 +2684,13 @@  if test $in_tree_ld != yes ; then
 	#
 	# ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1701:onnv-ab196087-6931056-03/25/10
 	#
-	# In Solaris 11.4, this was changed to
-	#
-	# ld: Solaris ELF Utilities: 11.4-1.3123
-	#
 	# ld and ld.so.1 are guaranteed to be updated in lockstep, so ld version
 	# numbers can be used in ld.so.1 feature checks even if a different
 	# linker is configured.
 	ld_ver=`$gcc_cv_ld -V 2>&1`
-	if echo "$ld_ver" | $EGREP 'Solaris Link Editors|Solaris ELF Utilities' > /dev/null; then
+	if echo "$ld_ver" | grep 'Solaris Link Editors' > /dev/null; then
 	  ld_vers=`echo $ld_ver | sed -n \
-	    -e 's,^.*: \(5\|1[0-9]\)\.[0-9][0-9]*-\([0-9]\.[0-9][0-9]*\).*$,\2,p'`
+	    -e 's,^.*: 5\.[0-9][0-9]*-\([0-9]\.[0-9][0-9]*\).*$,\1,p'`
 	  ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
 	  ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
 	fi