{"id":833290,"url":"http://patchwork.ozlabs.org/api/1.2/patches/833290/?format=json","web_url":"http://patchwork.ozlabs.org/project/gcc/patch/yddshdx3qsd.fsf@CeBiTec.Uni-Bielefeld.DE/","project":{"id":17,"url":"http://patchwork.ozlabs.org/api/1.2/projects/17/?format=json","name":"GNU Compiler Collection","link_name":"gcc","list_id":"gcc-patches.gcc.gnu.org","list_email":"gcc-patches@gcc.gnu.org","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<yddshdx3qsd.fsf@CeBiTec.Uni-Bielefeld.DE>","list_archive_url":null,"date":"2017-11-02T10:42:42","name":"[build] Cleanup Solaris linker version checks","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"5d47c4ff7f18646af052d44940857c2ec544c35d","submitter":{"id":4362,"url":"http://patchwork.ozlabs.org/api/1.2/people/4362/?format=json","name":"Rainer Orth","email":"ro@CeBiTec.Uni-Bielefeld.DE"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/gcc/patch/yddshdx3qsd.fsf@CeBiTec.Uni-Bielefeld.DE/mbox/","series":[{"id":11473,"url":"http://patchwork.ozlabs.org/api/1.2/series/11473/?format=json","web_url":"http://patchwork.ozlabs.org/project/gcc/list/?series=11473","date":"2017-11-02T10:42:42","name":"[build] Cleanup Solaris linker version checks","version":1,"mbox":"http://patchwork.ozlabs.org/series/11473/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/833290/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/833290/checks/","tags":{},"related":[],"headers":{"Return-Path":"<gcc-patches-return-465725-incoming=patchwork.ozlabs.org@gcc.gnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","mailing list gcc-patches@gcc.gnu.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=gcc-patches-return-465725-incoming=patchwork.ozlabs.org@gcc.gnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org\n\theader.b=\"ga4WgS4a\"; dkim-atps=neutral","sourceware.org; auth=none"],"Received":["from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3ySMBD1xYjz9sRW\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu,  2 Nov 2017 21:43:15 +1100 (AEDT)","(qmail 40987 invoked by alias); 2 Nov 2017 10:43:02 -0000","(qmail 39940 invoked by uid 89); 2 Nov 2017 10:43:01 -0000","from smtp.CeBiTec.Uni-Bielefeld.DE (HELO\n\tsmtp.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by\n\tsourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP;\n\tThu, 02 Nov 2017 10:42:54 +0000","from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1])\tby\n\tsmtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id\n\t2370389F\tfor <gcc-patches@gcc.gnu.org>;\n\tThu,  2 Nov 2017 11:42:46 +0100 (CET)","from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1])\tby localhost\n\t(malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new,\n\tport 10024)\twith LMTP id eBcBhU3nrh-Q for\n\t<gcc-patches@gcc.gnu.org>; Thu,  2 Nov 2017 11:42:42 +0100 (CET)","from lokon.CeBiTec.Uni-Bielefeld.DE\n\t(lokon.CeBiTec.Uni-Bielefeld.DE [129.70.161.152])\t(using\n\tTLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\t(No\n\tclient certificate requested)\tby\n\tsmtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id\n\tC85DC89E\tfor <gcc-patches@gcc.gnu.org>;\n\tThu,  2 Nov 2017 11:42:42 +0100 (CET)","(from ro@localhost)\tby lokon.CeBiTec.Uni-Bielefeld.DE\n\t(8.15.2+Sun/8.15.2/Submit) id vA2Agg7G010868;\n\tThu, 2 Nov 2017 11:42:42 +0100 (MET)"],"DomainKey-Signature":"a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender:from\n\t:to:subject:date:message-id:mime-version:content-type; q=dns; s=\n\tdefault; b=QiAqiHB/K2+g2Hynj4eOsfQ24fEUj0fvkyCOIgUiPLv/PxEmXTXn2\n\tg3MzrgKo9T1GEON+ztWi27QRlup0SeZ3FG/DeE1DbB5IYFeN/x7y4REhDpaHBM5O\n\tftXdJC/lVhDsbX/JtK/3hySd/04tqa7BzK0f9n/DSbqMtgBSM00bHw=","DKIM-Signature":"v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender:from\n\t:to:subject:date:message-id:mime-version:content-type; s=\n\tdefault; bh=fnqHZlnVPGBiV+3hZLtOLEBn7T8=; b=ga4WgS4aPfx376pSgETS\n\tiN71tXrejDAtG/W+45AqXiWXtpCAfTipAeq42pEIbil043pIHlUUBbAvKvePbfwE\n\tQvhI20HisYC4RG1GgCu8cBnuhGPnAax9vJA4oRYUr9uFdpin5x+kMRy1HjpFu8IF\n\thRxADSSo7M57HQCTHu5KzQE=","Mailing-List":"contact gcc-patches-help@gcc.gnu.org; run by ezmlm","Precedence":"bulk","List-Id":"<gcc-patches.gcc.gnu.org>","List-Unsubscribe":"<mailto:gcc-patches-unsubscribe-incoming=patchwork.ozlabs.org@gcc.gnu.org>","List-Archive":"<http://gcc.gnu.org/ml/gcc-patches/>","List-Post":"<mailto:gcc-patches@gcc.gnu.org>","List-Help":"<mailto:gcc-patches-help@gcc.gnu.org>","Sender":"gcc-patches-owner@gcc.gnu.org","X-Virus-Found":"No","X-Spam-SWARE-Status":"No, score=-18.6 required=5.0 tests=AWL, BAYES_00,\n\tGIT_PATCH_0, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS,\n\tKAM_LAZY_DOMAIN_SECURITY,\n\tRP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=1p,\n\tGeneration","X-HELO":"smtp.CeBiTec.Uni-Bielefeld.DE","From":"Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>","To":"gcc-patches@gcc.gnu.org","Subject":"[build] Cleanup Solaris linker version checks","Date":"Thu, 02 Nov 2017 11:42:42 +0100","Message-ID":"<yddshdx3qsd.fsf@CeBiTec.Uni-Bielefeld.DE>","User-Agent":"Gnus/5.13 (Gnus v5.13) Emacs/25.1 (usg-unix-v)","MIME-Version":"1.0","Content-Type":"multipart/mixed; boundary=\"=-=-=\"","X-IsSubscribed":"yes"},"content":"There's some potential to cleanup Solaris linker version checks:\n\n* gcc_AC_INITFINI_ARRAY in acinclude.m4 is unused, but still serves as\n  documentation for the various variants of ld version strings.  This is\n  now moved to configure.ac.\n\n* Solaris 11.4 has (or shortly will have) some changes to the version\n  numbering: until now this is something like\n\n  ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.2560\n\n  but will become\n\n  ld: Solaris ELF Utilities: 11.4-1.3123\n\n  like the rest of Solaris binutils (ar, nm, ...) already have.\n\n  The patch below accomodates both formats.\n\nBootstrapped without regressions on i386-pc-solaris2.11.4,\ni386-pc-solaris2.10, to be installed on mainline shortly.\n\n\tRainer","diff":"# HG changeset patch\n# Parent  d45c8c8a41993c685d1de58840fc675b4cb7b5c0\nCleanup Solaris linker version checks\n\ndiff --git a/gcc/acinclude.m4 b/gcc/acinclude.m4\n--- a/gcc/acinclude.m4\n+++ b/gcc/acinclude.m4\n@@ -277,8 +277,7 @@ fi\n fi])\n \n AC_DEFUN([gcc_AC_INITFINI_ARRAY],\n-[AC_REQUIRE([gcc_SUN_LD_VERSION])dnl\n-AC_ARG_ENABLE(initfini-array,\n+[AC_ARG_ENABLE(initfini-array,\n \t[  --enable-initfini-array\tuse .init_array/.fini_array sections],\n \t[], [\n AC_CACHE_CHECK(for .preinit_array/.init_array/.fini_array support,\n@@ -556,43 +555,6 @@ if test $[$2] != yes; then\n   $8\n fi])])\n \n-dnl gcc_SUN_LD_VERSION\n-dnl\n-dnl Determines Sun linker version numbers, setting gcc_cv_sun_ld_vers to\n-dnl the complete version number and gcc_cv_sun_ld_vers_{major, minor} to\n-dnl the corresponding fields.\n-dnl\n-dnl ld and ld.so.1 are guaranteed to be updated in lockstep, so ld version\n-dnl numbers can be used in ld.so.1 feature checks even if a different\n-dnl linker is configured.\n-dnl\n-AC_DEFUN([gcc_SUN_LD_VERSION],\n-[changequote(,)dnl\n-if test \"x${build}\" = \"x${target}\" && test \"x${build}\" = \"x${host}\"; then\n-  case \"${target}\" in\n-    *-*-solaris2*)\n-      #\n-      # Solaris 2 ld -V output looks like this for a regular version:\n-      #\n-      # ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1699\n-      #\n-      # but test versions add stuff at the end:\n-      #\n-      # ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1701:onnv-ab196087-6931056-03/25/10\n-      #\n-      gcc_cv_sun_ld_ver=`/usr/ccs/bin/ld -V 2>&1`\n-      if echo \"$gcc_cv_sun_ld_ver\" | grep 'Solaris Link Editors' > /dev/null; then\n-\tgcc_cv_sun_ld_vers=`echo $gcc_cv_sun_ld_ver | sed -n \\\n-\t  -e 's,^.*: 5\\.[0-9][0-9]*-\\([0-9]\\.[0-9][0-9]*\\).*$,\\1,p'`\n-\tgcc_cv_sun_ld_vers_major=`expr \"$gcc_cv_sun_ld_vers\" : '\\([0-9]*\\)'`\n-\tgcc_cv_sun_ld_vers_minor=`expr \"$gcc_cv_sun_ld_vers\" : '[0-9]*\\.\\([0-9]*\\)'`\n-      fi\n-      ;;\n-  esac\n-fi\n-changequote([,])dnl\n-])\n-\n dnl GCC_TARGET_TEMPLATE(KEY)\n dnl ------------------------\n dnl Define KEY as a valid configure key on the target machine.\ndiff --git a/gcc/configure.ac b/gcc/configure.ac\n--- a/gcc/configure.ac\n+++ b/gcc/configure.ac\n@@ -2587,15 +2587,25 @@ if test $in_tree_ld != yes ; then\n   else\n     case \"${target}\" in\n       *-*-solaris2*)\n-\t# See acinclude.m4 (gcc_SUN_LD_VERSION) for the version number\n-\t# format.\n+\t# Solaris 2 ld -V output looks like this for a regular version:\n \t#\n-\t# Don't reuse gcc_gv_sun_ld_vers_* in case a linker other than\n-\t# /usr/ccs/bin/ld has been configured.\n+\t# ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1699\n+\t#\n+\t# but test versions add stuff at the end:\n+\t#\n+\t# ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1701:onnv-ab196087-6931056-03/25/10\n+\t#\n+\t# In Solaris 11.4, this was changed to\n+\t#\n+\t# ld: Solaris ELF Utilities: 11.4-1.3123\n+\t#\n+\t# ld and ld.so.1 are guaranteed to be updated in lockstep, so ld version\n+\t# numbers can be used in ld.so.1 feature checks even if a different\n+\t# linker is configured.\n \tld_ver=`$gcc_cv_ld -V 2>&1`\n-\tif echo \"$ld_ver\" | grep 'Solaris Link Editors' > /dev/null; then\n+\tif echo \"$ld_ver\" | $EGREP 'Solaris Link Editors|Solaris ELF Utilities' > /dev/null; then\n \t  ld_vers=`echo $ld_ver | sed -n \\\n-\t    -e 's,^.*: 5\\.[0-9][0-9]*-\\([0-9]\\.[0-9][0-9]*\\).*$,\\1,p'`\n+\t    -e 's,^.*: \\(5\\|1[0-9]\\)\\.[0-9][0-9]*-\\([0-9]\\.[0-9][0-9]*\\).*$,\\2,p'`\n \t  ld_vers_major=`expr \"$ld_vers\" : '\\([0-9]*\\)'`\n \t  ld_vers_minor=`expr \"$ld_vers\" : '[0-9]*\\.\\([0-9]*\\)'`\n \tfi\n","prefixes":["build"]}