From patchwork Tue Sep 5 11:08:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Marc_Poulhi=C3=A8s?= X-Patchwork-Id: 137506 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ab0a:0:b0:3f2:4152:657d with SMTP id m10csp1608323vqo; Tue, 5 Sep 2023 04:15:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHEabJ3ax5WjkszXU3OCS1OblPj6MbBSUOQI/9t3g53z3RcA0zHvCjx1zEM2AwXEdI45uGX X-Received: by 2002:a17:907:3e9c:b0:9a5:aa43:1c7c with SMTP id hs28-20020a1709073e9c00b009a5aa431c7cmr16984990ejc.26.1693912534739; Tue, 05 Sep 2023 04:15:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693912534; cv=none; d=google.com; s=arc-20160816; b=SwlRHLc9DlfsqFzdtjNJKQNeqmxFHeIQKnrfVf/nA/SUOJN2pG+FQDErXWdVdq66pd PdgUVOsOgbreI0wlMQ5fDPUAcKSmUii0wiIY6sby0UFAR8QhaSfbvH4hyt/SueLNKbNV TclMSCFOEOZeW/cFeMyesKDQfB2XIWFdxLDlS+3yMHYtEp4pgUTFUlaGyFPF8GE1mpQZ pHid8aI2CLJbasFCA5w6pu7paj+wotXNKUEbgpoSMwpmju5BaSp1yaJ6NgJvrOuZSJVD SfYcUUCD0xskF82WIrwdpAsQud35IWU36jR569hVjvZMO0PnzmYdJe2lN3ctcmmHuMy2 uREA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=GsEz9Ew0BAjnqDaicqLtlYi21rlrEyXjnIvotgJmD9s=; fh=hLSGQLDnR198Y5mpVNuZbh6oQSuDI4WEn65/c6bD4Do=; b=wLMVKt4W90GWT011OOnGe1kgGca1SV1oUNPej3FlvjVxuDmiWulUgCLR9kffnuWUxc NEH4jDg5Ffu4SWVh04oeuHbCpaq0A5Kde6kvFy1I4LZT2ax5QhAL159qCAMdRaRbEQZs BxfF4IFCiKP6dSvtJi0OKhVKM5tpW+ESgw2fIKO77STFJN6TmsYFW6plHGDDJZ4pTFbh N8UA6FWQN+qQnkNaLW9QlzFuCzqdmyqK/2s5vDu16/Rj8MdmqUSD5nO76V9xe3IiW69C Vlmez2aqPmlNhn44cQeX1p/1t/lZ83yH8D1oew9VUps4x0XEpO3BUfB4O5rOZtPG86+j FdbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=X7ayRjzA; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id h11-20020a1709063b4b00b009a1b857e3b5si7382662ejf.170.2023.09.05.04.15.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Sep 2023 04:15:34 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=X7ayRjzA; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 104273882051 for ; Tue, 5 Sep 2023 11:10:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 104273882051 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1693912253; bh=GsEz9Ew0BAjnqDaicqLtlYi21rlrEyXjnIvotgJmD9s=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=X7ayRjzAopH0RW2U2lOI9OIBT5gPjxDkwIVXOemSaCXDDWLXCrfEAkVfwNVGBFxPH icb7I8yYZZsSlephv6QbB2YsHs/xXyOYLTir8Orcxema8neOGOhqxUHghxi95CrseR WCRn312neilaCRhP/ne3nCyf8Gozri+Ahx3NLBU4= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by sourceware.org (Postfix) with ESMTPS id 1F5F6385C6E9 for ; Tue, 5 Sep 2023 11:08:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1F5F6385C6E9 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-4018af103bcso15555725e9.1 for ; Tue, 05 Sep 2023 04:08:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693912098; x=1694516898; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=GsEz9Ew0BAjnqDaicqLtlYi21rlrEyXjnIvotgJmD9s=; b=Fh5n0+95l0K8z85wtj6fmwezvF4XAo2ACdMo3P0l1pvvq+5qnIEoJtagT6mZsauLIB N1M+Ne7aDwlF3rhjz0lHtCEouzfxQYw4sHWXBPtzipup96WK4vhqF2FKF3Ml7lt5lRr+ hdZ5FlIYqmSriN3nSduYVr3nugCibXbGfv5XtNEygUWApFIgGsOqh+C/xIxeb9Yyt1in Sp30Zpa6qEtUNaiBc6eUzKSvtMQYeeiQnCtiSDorveXGARqn9GoytbcmhWG9FkvFAFb4 sZfWf7U+ZhAznS+tC/v8KX9eZYoYWp3AXqpQhLZ4KKp23MGn0L738Jc63F543VyRJbs3 ee9g== X-Gm-Message-State: AOJu0Yxqocw+GXsziVwViWllLM3sNOJlf8HJlpmDU+C2R4vs43SWDSi+ ZtmWViA+8W+PNNvVnfC/8dMCWlIrRQK6c/We9dgluA== X-Received: by 2002:a1c:750a:0:b0:3f6:d90:3db with SMTP id o10-20020a1c750a000000b003f60d9003dbmr9786705wmc.3.1693912097975; Tue, 05 Sep 2023 04:08:17 -0700 (PDT) Received: from poulhies-Precision-5550.lan ([2001:861:3382:1a90:20fc:79e4:455c:1075]) by smtp.gmail.com with ESMTPSA id k1-20020adff5c1000000b0031ad5a54bedsm17266195wrp.9.2023.09.05.04.08.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Sep 2023 04:08:17 -0700 (PDT) To: gcc-patches@gcc.gnu.org Cc: Alexandre Oliva Subject: [COMMITTED] ada: Pass -msmp when linking for ppc-vx6 --RTS=rtp-smp Date: Tue, 5 Sep 2023 13:08:16 +0200 Message-Id: <20230905110816.562928-1-poulhies@adacore.com> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 X-Spam-Status: No, score=-13.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: =?utf-8?q?Marc_Poulhi=C3=A8s_via_Gcc-patches?= From: =?utf-8?q?Marc_Poulhi=C3=A8s?= Reply-To: =?utf-8?q?Marc_Poulhi=C3=A8s?= Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776196030054280373 X-GMAIL-MSGID: 1776196030054280373 From: Alexandre Oliva gprbuild and gnatmake won't pass --RTS=rtp-smp to the compiler driver for linking. The flag was not used during linking: the .spec files named as linker options were all we passed for the linker to get the -L flags for lib_smp and lib. There was a problem, though: although /lib_smp/ and /lib/ were to be searched in this order, and the specs files did that correctly, the compiler would search /lib/ first regardless, because STARTFILE_PREFIX_SPEC said so, and specs files cannot override that. With this patch, we make sure the rtp-smp runtime causes -msmp to be added to the command line passed to the compiler driver for linking, and a corresponding patch for the ppc-vxworks configuration makes the GCC compiler driver use this flag to select /lib_smp/ rather than /lib/. gcc/ada/ * libgnat/system-vxworks-ppc-rtp-smp.ads: Add -msmp to Linker_Options pragma. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/libgnat/system-vxworks-ppc-rtp-smp.ads | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/ada/libgnat/system-vxworks-ppc-rtp-smp.ads b/gcc/ada/libgnat/system-vxworks-ppc-rtp-smp.ads index d8c498fac7f..e4b80a8415e 100644 --- a/gcc/ada/libgnat/system-vxworks-ppc-rtp-smp.ads +++ b/gcc/ada/libgnat/system-vxworks-ppc-rtp-smp.ads @@ -120,6 +120,7 @@ package System is private + pragma Linker_Options ("-msmp"); pragma Linker_Options ("--specs=vxworks-smp-ppc-link.spec"); pragma Linker_Options ("--specs=vxworks-ppc-link.spec"); -- Setup proper set of -L's for this configuration