From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by sourceware.org (Postfix) with ESMTPS id D59CF383D00F for ; Fri, 25 Jun 2021 16:13:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D59CF383D00F Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15PGAI0M016525; Fri, 25 Jun 2021 16:13:48 GMT Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by mx0b-00069f02.pphosted.com with ESMTP id 39d2pe9qkb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 25 Jun 2021 16:13:48 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 15PGBnZ4163774; Fri, 25 Jun 2021 16:13:47 GMT Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2175.outbound.protection.outlook.com [104.47.55.175]) by aserp3030.oracle.com with ESMTP id 39d2pye3b3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 25 Jun 2021 16:13:47 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Vc/7u6UKPAyrxeWQfZnafl5uGYbN2YFiARtAaJafL9Kf83YW+hybVpJMS3a8wJzvrv7fMLUdlq9wklpWdmKQveXCEtRCK2ZlneY1PFp3p72+70jpMLpcEAL/DjWRKR7VwaLrRV1KvpwsLM3pmnvHH6xN2i6RlOTPaF7GhePzi020atCz0e0jwLQLgzCXvyeJed3jVhoCnuY26T0A237SC/IV4lau/z/evp8zjAghPbqlX0OnysLDPSG6sHfZ3gLrgFm6pse3Xsu7QfP8eHgUyfDuWsZBrZ3VzWExVTqrMF3ZiO3vg82AHGFcGii9qxr4V2JFUQk7VTQi+xNkNccmFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RFdNC2nGCpHE34N+qmSSk3bokVqQ24iWVSXCUQgX16o=; b=eGKvbp5nc6J42aBgtmaIyYOxJ4pCF4UsSBhqm4BXLc2k+ITYMkdnmO/0uHeyrw8mPEdMp8y304zcmzShYbAAvtczfWom4eOu5bx+M2X8al1cIEqh88j0xWY+Nf4qoPp3r4nZVxHmSoWPWPhb1uduACHVWIspkNGfioL0LGF3HN66hyi5EPHJDiXfuAWx5lkMn2loiSfvj8pvhNmDKiVKBTzhtu00KLHGaIZC/uyqstNgYQEIWAg6vQR5sn8h6ltrRS0hHAMUhU6981Rt6k8Z7us4+icPopV0dyS2Ss+Gj9ooFDlKj1W58LdZu9Oq7W31bis4YJFBgSz/sFjN6YvDzA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none Received: from SA2PR10MB4715.namprd10.prod.outlook.com (2603:10b6:806:fb::10) by SN6PR10MB2815.namprd10.prod.outlook.com (2603:10b6:805:d1::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.23; Fri, 25 Jun 2021 16:13:45 +0000 Received: from SA2PR10MB4715.namprd10.prod.outlook.com ([fe80::9ded:a005:f4da:7741]) by SA2PR10MB4715.namprd10.prod.outlook.com ([fe80::9ded:a005:f4da:7741%9]) with mapi id 15.20.4264.023; Fri, 25 Jun 2021 16:13:45 +0000 From: Nick Alcock To: binutils@sourceware.org Cc: gcc-patches@gcc.gnu.org Subject: [PATCH 0/4 REVIEW] libtool and libctf fixes for Solaris 11 Date: Fri, 25 Jun 2021 17:13:31 +0100 Message-Id: <20210625161335.4831-1-nick.alcock@oracle.com> X-Mailer: git-send-email 2.32.0.255.gd9b1d14a2a Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [2001:8b0:1101:10::2] X-ClientProxiedBy: LO2P265CA0213.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9e::33) To SA2PR10MB4715.namprd10.prod.outlook.com (2603:10b6:806:fb::10) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from loom.srvr.nix (2001:8b0:1101:10::2) by LO2P265CA0213.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9e::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.19 via Frontend Transport; Fri, 25 Jun 2021 16:13:44 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 64e3b3a7-821a-48b2-9d8e-08d937f4352d X-MS-TrafficTypeDiagnostic: SN6PR10MB2815: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: agPSXXOsXQVDe8V3vdh/AyhYDlSjhVk/wrJcic9gHO75M+XjAQs7xf8bAywPeXCX7WTch6QiYVNNqMXkSTJ4Dp51j+d5c16XTQVjlu11xgEABYU2gNO3x4xqBRs8ByWlc9kuWER2B3K7BvNtETVLzvPGUgGiQWT3Ve4ON7RchpvUwMNVrWsVJ77nf0nFpuEh1xKlYbVaOsxr97cmaoSbM9YzkhDihQuTf3IAG5eXfR+VnvBbVXjXhFL384OTC4NpxcP/RVqU3cNBIWnjbNA1oxncAhU0pb+TNYTGNa19Ry+jfQN+gBAxaCiK6dM+dyxnNBXIBsXS4xFc/yE5XN5iLmNSwfRXdeFWKid6iXozg+lnxTW9NQ1+VUEoIh2v6U/0SkzlR8DT/rLviiXEqPzuDxdHlaeCE7nhF4FFbbKzaXkuZGdReR9mCCOT3YK1fXmQmcfveWVkGxoVIEKBEY0eA1Mp2ekSxMZrtvR7Pfznyw4ZB0xCNtpquGFUiefK3k6L/CJwetFwmYaB5qK2kgTAjdWz/U4jJA2bNEfoDSrSg1Gr6IqrdPQ+pKuW60QUCBG+X3BFyRnTQmtNXJQhFBxgT/ThTkqPx1AEoxF7AWpJl69fENsJn/6i130sxxb0eh8UvG2rkToWSfQ7yD26D2Cu8A== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SA2PR10MB4715.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(136003)(376002)(366004)(396003)(39860400002)(346002)(6916009)(6666004)(66556008)(66476007)(2906002)(66946007)(2616005)(8676002)(8936002)(6506007)(6512007)(186003)(478600001)(44832011)(38100700002)(6486002)(16526019)(316002)(86362001)(36756003)(5660300002)(1076003)(4326008)(52116002)(83380400001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?lJOLGJbQ6XeoijtsxXBzIZnPP6b9Dg+LzTLzf/kqwE9I/HWDj8nbLu3Mq+Pa?= =?us-ascii?Q?DSAm9ropWzsIr1ftObbOLB6iz0FiePaWe3/D+HtE2sa8S6gIKVLUY9+RA/xj?= =?us-ascii?Q?hWH8pKI0Iz/dEeCc5IVnHYZ8JrC683jtJNMJNLzlH75pz31VKRBEC1aacS7x?= =?us-ascii?Q?3nZ4u1AEec+dA3JI2dL6f2H0n9lM+u7pvTKhjOe8Sc8NB12x3lZB3PPvg8VI?= =?us-ascii?Q?ISLekqQRnXd7oAdGAUqyLyOYTtf+0SCefPOeWJWSof3GsspXXYK8lAI/Z4nx?= =?us-ascii?Q?lAoNIoJJ8DD0T7P+d7xGjWD5iAfyQGn2NQ1WqEg3jec0IUPl0qdBL323MnEz?= =?us-ascii?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w4dZ3XTwHm+2Nh?= =?us-ascii?Q?2u7X8vhc+iVsN4B2ije7bFNfZLD3f9GDHRNKjA2BtOWZ9bWceHicWyB1EIQV?= =?us-ascii?Q?UFARNQiFTzYKWmYk+BQ4grLMahKJaOhXpEAwf4fwc8lErg=3D=3D?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 64e3b3a7-821a-48b2-9d8e-08d937f4352d X-MS-Exchange-CrossTenant-AuthSource: SA2PR10MB4715.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jun 2021 16:13:45.5187 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: DfDOYO9WQb6qCRyOmNk944xM66DrwBiZVSVi52+GI2MadnHSfISE6DLsWvy9vdHbO07u/smJWx103J6pOZXQ3Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR10MB2815 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=10026 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 adultscore=0 malwarescore=0 mlxlogscore=999 spamscore=0 bulkscore=0 suspectscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106250095 X-Proofpoint-GUID: 6QloXG6V9l1SorckHnE3YEB58FnVLBtq X-Proofpoint-ORIG-GUID: 6QloXG6V9l1SorckHnE3YEB58FnVLBtq X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_NUMSUBJECT, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jun 2021 16:13:56 -0000 There are three intertwined bugs here, two in libtool.m4, one in libctf. The underlying "problem" is that libctf tries to version its symbols: if it can't use a GNU version script it tries to hide unnecessary symbols using Libtool's --export-symbols-regex flag... and that flag has kinda rusted. Firstly, it relies on running nm and knowing what the symbol type codes it emits (in BSD mode) mean: Solaris 11 has gained 'C' for common symbols, like GNU nm, but libtool.m4 was never updated to know about that, so the test failed. Secondly, it relies on knowing how to switch nm into BSD mode, which it does by nm'ing a bunch of candidate nms with various flags: but it nms /dev/null and has not-very-good handling of nms that emit errors if you do that. Thirdly, libtool's nm option scanning is entirely suppressed if NM is set in the environment, on the grounds that the user must have set it -- but libtool already augments other things set in the environment with extra flags if needed, and the user can hardly be expected to know that Libtool needs 'nm -p' on Solaris, not just nm. Worse yet, Cygnus configure sets NM unconditionally, stopping the test dead. Fixed by checking flags even if the user overrides nm, but checking the specific nm they requested. The first two patches in this series need review because, well, libtool upstream is dead enough that I don't know if I can even submit it there, but it should probably go to GCC and binutils-gdb. I have tested it on Solaris 11.3, Solaris 11.4, FreeBSD, (x86-64 and SPARC) Linux, and Cygwin, which should be enough coverage, I hope. libtool upstream has diverged in this area and the patch would need redoing in any case (though the conflicts look quite minor, I don't have time right now and doing that wouldn't help fix any of the reporter's problems in any case). (The latter two patches, sent to binutils@ alone, enable symbol versioning on Solaris 11.4, which provides a --version-script flag almost but not quite compatible with GNU ld's, and regenerate most relevant configure scripts, skipping only sim/ because it's in a ferment of change right now.) Cc: gcc-patches@gcc.gnu.org Nick Alcock (4): libtool.m4: augment symcode for Solaris 11 libtool.m4: fix nm BSD flag detection libctf: try several possibilities for linker versioning flags configure: regenerate in all projects that use libtool.m4 bfd/configure | 91 ++++++++++++------------- binutils/configure | 91 ++++++++++++------------- gas/configure | 91 ++++++++++++------------- gprof/configure | 91 ++++++++++++------------- ld/configure | 91 ++++++++++++------------- libctf/Makefile.am | 5 +- libctf/Makefile.in | 6 +- libctf/configure | 157 ++++++++++++++++++++++++++++++-------------- libctf/configure.ac | 46 ++++++++++++- libctf/libctf.ver | 10 ++- libtool.m4 | 90 ++++++++++++------------- opcodes/configure | 91 ++++++++++++------------- zlib/configure | 91 ++++++++++++------------- 13 files changed, 531 insertions(+), 420 deletions(-) -- 2.32.0.255.gd9b1d14a2a