From patchwork Tue Jun 27 12:08:15 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: 113396 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp8148069vqr; Tue, 27 Jun 2023 05:15:13 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5uhPpCylp3ClW9yxhmRlapfsBQc9qpRz1SqhRncPkiEKs5synMC+50WzptnSKD8fidykuR X-Received: by 2002:a05:6402:190a:b0:51a:493e:3212 with SMTP id e10-20020a056402190a00b0051a493e3212mr28464854edz.17.1687868113569; Tue, 27 Jun 2023 05:15:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687868113; cv=none; d=google.com; s=arc-20160816; b=e0a6dUzDbm6QtHNu5KjZJFm0PCLl6AZM90oYGS0kVhS4Z2BUiLyx0iMxDE46pY6tiW 3Z2/Vz6tZGg8qwRJE3lOdbeGG9iC8NnUBLZPYE4AnhYuHj1Xpjw1+ccOk5Fmda6rcrzf XIiYvnIyOSBGqiflrAzsd9MeBWvdWV6AWp1qkjTNEqA4B7vlh2xeIxCvJIyh5w9tK5n5 3EeCCd5yneapAWAK7zPUinXNqNfO3HDho/efWH/VcyLnEKMxoh9i/k5Ehs8R+vdLm0LU uiFwyKOK3jJXMB6a0forxPOaDBkVrY5RI2qau1zEj4ezWSDleK8mkvgRBJnVVTD8TAuQ 6vrg== 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=YK4+o23bAK9zFjaKWAxxiidow9ONc985FUXjfaJ/Zm8=; fh=hOhsC1930eHatDPYd2EALQ9Ry/g++vvN4vxlQkRuX+0=; b=mHFRxRmjF16RD47taD+i0rWROqV4Uj6mfKHFMdrVOav3dfyNFbUPHhuTmQt51Y1WEa 2a3mXtowuDctXqI8iJ7+VDS2Wfq0l2IBoaEOWU/ON0DADfhUXCH9FbiKvi4PAndLnzaS mGtzN+6w1dkiIYeR1uyPYYXWyPdz3rngNGLJMWTv3yLSRAJOR3fsBV9JRWm6eDx38ySo LZQvbXXNxRhPwlPjuNuHV8JF0lA80WKJkvMPo4qDox6c5xZdb/AZJuc1DDJW4Ay193Tv LzGLyl/kao1EFIAh+l7ab3laooI8rcu8LVE4NQ67Nc4vHvOkToLyc3RXAFHrJJm2q8xn whaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=BqnkUJrc; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 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 sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id l24-20020a1709060e1800b009828bb40443si4102121eji.549.2023.06.27.05.15.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jun 2023 05:15:13 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=BqnkUJrc; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 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 C534D3857725 for ; Tue, 27 Jun 2023 12:11:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C534D3857725 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1687867863; bh=YK4+o23bAK9zFjaKWAxxiidow9ONc985FUXjfaJ/Zm8=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=BqnkUJrcjS2LUAUPVuh9OfMMa59JabAcpvmW8C53hP+DTb8oyr6pjX7ovOm+JEUB7 qgmQEfyw+biowlR4CN1PJZDRolysNj9JN5amswhlietJUu5FJM2gUYFO2XY7tWUaHQ +Cj95XwFIJ8sG//soCz0izrjklzTZNTcPK3G8224= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by sourceware.org (Postfix) with ESMTPS id CD73A3857344 for ; Tue, 27 Jun 2023 12:08:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CD73A3857344 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-31297125334so3885543f8f.0 for ; Tue, 27 Jun 2023 05:08:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687867696; x=1690459696; 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=YK4+o23bAK9zFjaKWAxxiidow9ONc985FUXjfaJ/Zm8=; b=D8OIEBQJFpW9KnEthjkoQYqN+zY7c1bza5yMoZOT+3QaGGuiBzhzp8nhY9QudtOD1q Gd9wSCm4ht18Bq14k+PubIf8qZt8x1diaKqTx0M495LRziyjLp1IvopUB58GgkbBCNpE Zcqwl9guo4NHazzfHxfTQkbNHaOkzVBLaI4fYLKPNzUU3+3NPHmfXebmXsPV6uRIxdNF tBtO0ob7HX+15AfDMusI/nT2nqoDET4XkiYFJMyGR2nNWb8Fo5Tuo535lTfgV97Z0Hni wUZmdBPlgtSGvZJR5HoE9AQWQr8n6UJZPPqExhUTvupCSKwE6CJjeq3mvLKTyVH5HRHM 4p+g== X-Gm-Message-State: AC+VfDyGNVHOCQdWsEjY78vrNh6GgPg39CxMo8j3dZiceq1dwjEC2cwk 8tD6j586J1THN39VQFW6OvHfMLmBmKXpDkNPHj22qw== X-Received: by 2002:adf:f0d0:0:b0:314:3f1:cebf with SMTP id x16-20020adff0d0000000b0031403f1cebfmr414538wro.28.1687867696677; Tue, 27 Jun 2023 05:08:16 -0700 (PDT) Received: from poulhies-Precision-5550.telnowedge.local (lmontsouris-659-1-24-67.w81-250.abo.wanadoo.fr. [81.250.175.67]) by smtp.gmail.com with ESMTPSA id 4-20020a05600c228400b003f7e4d143cfsm10502839wmf.15.2023.06.27.05.08.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jun 2023 05:08:16 -0700 (PDT) To: gcc-patches@gcc.gnu.org Cc: Eric Botcazou Subject: [COMMITTED] ada: Fix build of GNAT tools Date: Tue, 27 Jun 2023 14:08:15 +0200 Message-Id: <20230627120815.3420628-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, T_SCC_BODY_TEXT_LINE 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.29 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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769857995384420565?= X-GMAIL-MSGID: =?utf-8?q?1769857995384420565?= From: Eric Botcazou gcc/ada/ * gcc-interface/Makefile.in (LIBIBERTY): Fix condition. (TOOLS_LIBS): Add @LD_PICFLAG@. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/gcc-interface/Makefile.in | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in index dc0e54f8eb6..b5243a24a8f 100644 --- a/gcc/ada/gcc-interface/Makefile.in +++ b/gcc/ada/gcc-interface/Makefile.in @@ -240,10 +240,10 @@ ALL_CPPFLAGS = $(CPPFLAGS) ALL_COMPILERFLAGS = $(ALL_CFLAGS) # This is where we get libiberty.a from. -ifeq ($(PICFLAG),) -LIBIBERTY = ../../libiberty/libiberty.a -else +ifneq ($(findstring $(PICFLAG),-fPIC -fPIE),) LIBIBERTY = ../../libiberty/pic/libiberty.a +else +LIBIBERTY = ../../libiberty/libiberty.a endif # We need to link against libbacktrace because diagnostic.c in @@ -261,6 +261,9 @@ TOOLS_LIBS = ../version.o ../link.o ../targext.o ../../ggc-none.o \ $(LIBGNAT) $(LIBINTL) $(LIBICONV) ../$(LIBBACKTRACE) ../$(LIBIBERTY) \ $(SYSLIBS) $(TGT_LIB) +# Add -no-pie to TOOLS_LIBS since some of them are compiled with -fno-PIE. +TOOLS_LIBS += @LD_PICFLAG@ + # Specify the directories to be searched for header files. # Both . and srcdir are used, in that order, # so that tm.h and config.h will be found in the compilation