From patchwork Sat Jan 2 20:19:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Sandoe X-Patchwork-Id: 1421785 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sandoe.co.uk Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D7YG01hw8z9sVR for ; Sun, 3 Jan 2021 07:21:58 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2BDAF384241B; Sat, 2 Jan 2021 20:21:56 +0000 (GMT) X-Original-To: GCC-patches@gcc.gnu.org Delivered-To: GCC-patches@gcc.gnu.org Received: from smtp1.wavenetuk.net (smtp.wavenetuk.net [195.26.36.10]) by sourceware.org (Postfix) with ESMTP id F40D03850408 for ; Sat, 2 Jan 2021 20:20:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org F40D03850408 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sandoe.co.uk Authentication-Results: sourceware.org; spf=none smtp.mailfrom=iain@sandoe.co.uk Received: from [192.168.1.212] (host81-138-1-83.in-addr.btopenworld.com [81.138.1.83]) by smtp1.wavenetuk.net (Postfix) with ESMTPA id 4CD1E1200A42; Sat, 2 Jan 2021 20:20:54 +0000 (GMT) From: Iain Sandoe Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Date: Sat, 2 Jan 2021 20:19:51 +0000 Subject: [pushed] Darwin : Adjust defaults for the linker. Message-Id: <53CC93F0-A677-42B6-B789-7C505441C4ED@sandoe.co.uk> To: GCC Patches X-Mailer: Apple Mail (2.3273) X-Spam-Status: No, score=-15.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_COUK, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, KHOP_HELO_FCRDNS, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" Hi, Ideally, the linker will be queried for its version and that will be used to determine capabilities that cannot be discovered from reasonable configuration testing. When building cross tools, this might not be possible, and we have strategies for providing useful defaults. These are adjusted here to refect current choices. tested on dariwn8, 9, 18, 20, x86_64-linux-gnu pushed to master Iain gcc/ChangeLog: * config/darwin.h (MIN_LD64_NO_COAL_SECTS): Adjust. Amend handling for LD64_VERSION fallback defaults. --- gcc/config/darwin.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h index 0eabd3f19eb..e40a98394d3 100644 --- a/gcc/config/darwin.h +++ b/gcc/config/darwin.h @@ -1094,16 +1094,20 @@ extern void darwin_driver_init (unsigned int *,struct cl_decoded_option **); /* Later versions of ld64 support coalescing weak code/data without requiring that they be placed in specially identified sections. This is the earliest _tested_ version known to support this so far. */ -#define MIN_LD64_NO_COAL_SECTS "236.4" +#define MIN_LD64_NO_COAL_SECTS "236.3" /* From at least version 62.1, ld64 can build symbol indirection stubs as needed, and there is no need for the compiler to emit them. */ #define MIN_LD64_OMIT_STUBS "62.1" +/* If we have no definition for the linker version, pick the minimum version + that will bootstrap the compiler. */ #ifndef LD64_VERSION -#define LD64_VERSION "62.1" -#else -#define DEF_LD64 LD64_VERSION +# ifndef DEF_LD64 +# define LD64_VERSION "85.2.1" +# else +# define LD64_VERSION DEF_LD64 +# endif #endif #endif /* CONFIG_DARWIN_H */