From patchwork Tue Sep 6 12:16:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Filippov X-Patchwork-Id: 1041 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5044:0:0:0:0:0 with SMTP id h4csp614345wrt; Tue, 6 Sep 2022 05:17:17 -0700 (PDT) X-Google-Smtp-Source: AA6agR5p6UKnFQ+VEX9bC3akXftJBsBC371SxvxFNeR/30xXrtEN2dUWJeyGKtvArqpGyEMnE3Mz X-Received: by 2002:a05:6402:5207:b0:448:73ba:e5e5 with SMTP id s7-20020a056402520700b0044873bae5e5mr34280830edd.321.1662466637700; Tue, 06 Sep 2022 05:17:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662466637; cv=none; d=google.com; s=arc-20160816; b=QCus++rfSgiJ8p5vo0n1rOk4PqmTnl9JPnxarAMn9sPoqLsrv8v6u0K9NJnhpRO0V3 TMdeWDpDZ0xq2uWOlXhOiP3BaKwfIUV8FgOeeB4XPrj0EQtGpTUm+db474zUy8wQAvQF s12+YDDDsIr46temS0gyT1gkJcDM3IOjejn6Je+OWKpMko0GhlZFz6i10TLNo2yva9dw 5+vhKqV6TrBNE/JeKzpx9BtFF7k3k+1JZxgIKQ87GcLmPJgOKhdgh2jUs95f8tvMrH/8 o2pHrLUZYxgPF455iKIqvXpHLAQHrXeLcDPE8P3iZZeh2t6bSAfAm1oDfQHa+0HxZx/2 3apw== 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:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=ZjskF8J5jA8hIDOJvGQs/4SsKN5mgP6lzAxzUV6ZqP4=; b=gd7kv4ltnp5w42/SmPk0syHirMiIcimfRX8ev431nUrBE904nlsUzD3a9jCCSyeTUT VakUmdnaQbD7QnLt8m6KOw0fG3+7fyBMl/K1i1WTnB29O/FAFtF6I3dTc/c85/dpLz0E CcvZ/jwwJm3oYJDyXnnkJV3QJnWnZof9VPWIx1G60urjfc5iG0/l95QMgNJAhB53lsGf dzlzBFDQr1RAHTiUD26ANjz6Hk9+mukb3nQjiqw3oWmu1MsnhSMu9tnyPuU4jJLangUf hVy6ryaMpuRe/HGb1QSkXy8WsstVAFPpIE3hhykauSSTVk0gitL0CGiq4tlzJ1wouaPh WToA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=TduxDAAe; 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 sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id l15-20020a170906794f00b00741a19c2151si10651357ejo.625.2022.09.06.05.17.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Sep 2022 05:17:17 -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=TduxDAAe; 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 6CD1F385355A for ; Tue, 6 Sep 2022 12:17:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6CD1F385355A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662466636; bh=ZjskF8J5jA8hIDOJvGQs/4SsKN5mgP6lzAxzUV6ZqP4=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=TduxDAAe68Yj6ExGHfVjsLRY8b/8gnZlzdR1m1GLJtgwh+HoYqgAgYHUL5kejgbBD StYQuzwLG2ZqCBVjaTewD4frBE5ogwfW2czIg8NmwIPKCDLdPZ9Jt3WTVl/V/t1E02 RFUPJz5IT9jkSFIKjiS6PkXe2qZNHT89w5X6FFk0= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by sourceware.org (Postfix) with ESMTPS id 05873385AC24 for ; Tue, 6 Sep 2022 12:16:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 05873385AC24 Received: by mail-pj1-x102c.google.com with SMTP id t11-20020a17090a510b00b001fac77e9d1fso14719304pjh.5 for ; Tue, 06 Sep 2022 05:16:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=ZjskF8J5jA8hIDOJvGQs/4SsKN5mgP6lzAxzUV6ZqP4=; b=4Q31aRheXTbrpn1UgPpSbpkMrNv8R/E8deDcKcNOurA3ooZ2eHbMNteYLO2piQZDmM Nr+WN1s2Tl4Xxe5MLFfgAgQhvHCN/KY3jygOGUtoMkhtnkdO3ScqWR8e8GB6OaLGDaNW dyKcArQvi3xysjkToZse9SEbIIndxnF87rh/IPP0CkTqNbVNzPT+hVBmqTSIhWE7DVWa YS5X/R8FE9z7db6riquQcdI7qKyAytSbbDdfTpvkfttkotc+crDKVnk72kB/Tdk4ETR8 AUZsKeaEEaMsRA4GfxhaC5HFx6vwdJr10xyvcdzAzZBBQUvL22UfVYyzuKM8DVDpc718 HqsA== X-Gm-Message-State: ACgBeo1f4pTI9InGOZ7e7fwcdpDE9bjiDzTUofcIQ0wUMjU5AisFEguf jQ3+7lMkzYw8mXgud9i0zykODB2Y1UxnWA== X-Received: by 2002:a17:902:c40a:b0:174:7d05:97cd with SMTP id k10-20020a170902c40a00b001747d0597cdmr47261822plk.34.1662466591569; Tue, 06 Sep 2022 05:16:31 -0700 (PDT) Received: from octofox.metropolis (c-24-130-93-68.hsd1.ca.comcast.net. [24.130.93.68]) by smtp.gmail.com with ESMTPSA id y9-20020a17090a784900b001fab208523esm8583756pjl.3.2022.09.06.05.16.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Sep 2022 05:16:30 -0700 (PDT) To: gcc-patches@gcc.gnu.org Subject: [COMMITTED] xtensa: gcc: add static PIE support Date: Tue, 6 Sep 2022 05:16:14 -0700 Message-Id: <20220906121614.1968627-1-jcmvbkbc@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, FROM_LOCAL_NOVOWEL, GIT_PATCH_0, HK_RANDOM_ENVFROM, HK_RANDOM_FROM, 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: Max Filippov via Gcc-patches From: Max Filippov Reply-To: Max Filippov 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?1743222616742892838?= X-GMAIL-MSGID: =?utf-8?q?1743222616742892838?= gcc/ * config/xtensa/linux.h (LINK_SPEC): Add static-pie. --- gcc/config/xtensa/linux.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gcc/config/xtensa/linux.h b/gcc/config/xtensa/linux.h index 540e4bf538f8..bc7bee71517d 100644 --- a/gcc/config/xtensa/linux.h +++ b/gcc/config/xtensa/linux.h @@ -54,9 +54,10 @@ along with GCC; see the file COPYING3. If not see #define LINK_SPEC \ "%{shared:-shared} \ %{!shared: \ - %{!static: \ + %{!static:%{!static-pie: \ %{rdynamic:-export-dynamic} \ - -dynamic-linker " GNU_USER_DYNAMIC_LINKER "} \ + -dynamic-linker " GNU_USER_DYNAMIC_LINKER "}} \ + %{static-pie:-static -pie --no-dynamic-linker -z text} \ %{static:-static}} \ %{mabi=windowed:--abi-windowed} \ %{mabi=call0:--abi-call0}"