Message ID | 20201204164612.2309440-1-stijn@linux-ipv6.be |
---|---|
State | Accepted |
Delegated to: | Stijn Tintel |
Headers | show
Return-Path: <openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org> 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=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux-ipv6.be Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=m1cdlE09; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linux-ipv6.be header.i=@linux-ipv6.be header.a=rsa-sha256 header.s=502B7754-045F-11E5-BBC5-64595FD46BE8 header.b=vBnJ4yz5; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (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 4Cndvc64zLz9sWq for <incoming@patchwork.ozlabs.org>; Sat, 5 Dec 2020 03:49:00 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe :List-Id:MIME-Version:Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=HRFbb5pu7uDxvw3Urg+uqkOQf2PIxZefuTw/d9dlDXQ=; b=m1cdlE09HWC+muo5Jrp7ITy1jq 9WpOoVj93LxFQ/VMUtoqyl89u4reH1SvfvVdpyMk9/FWnQppvHBxw7bkLOfZDDCmUe+npJAXPoZTh xa5JIonhHcu/OK8GAcaMWLUPOQH1FVZ9FO4Z1KoEn0yc+P/eeCtwlY8YV0QZJfRyJvpooIvMs9x+N 0kQgog6xKP2GOgSoc68z94MRit231Ty2wAkcGncnNytp8dXwBBeMFYbh3Cqnu/r/fylB/9bivhmXz Qrkn1M5wTM1OnlUfc8OgWlsA73rdCY/pj2VAFfHFJVICFkcF3WxSPruFNxwoEk1DA9b912TSJpKsE 2to5/EbA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1klEDy-0000Fq-Nv; Fri, 04 Dec 2020 16:46:26 +0000 Received: from mail.tintel.eu ([51.83.127.189]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1klEDv-0000FK-W9 for openwrt-devel@lists.openwrt.org; Fri, 04 Dec 2020 16:46:24 +0000 Received: from localhost (localhost [IPv6:::1]) by mail.tintel.eu (Postfix) with ESMTP id 90EBD47519CF for <openwrt-devel@lists.openwrt.org>; Fri, 4 Dec 2020 17:46:14 +0100 (CET) Received: from mail.tintel.eu ([IPv6:::1]) by localhost (mail.tintel.eu [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id 9ixnnjZ4Oisz for <openwrt-devel@lists.openwrt.org>; Fri, 4 Dec 2020 17:46:14 +0100 (CET) Received: from localhost (localhost [IPv6:::1]) by mail.tintel.eu (Postfix) with ESMTP id 17A6B4759F6C for <openwrt-devel@lists.openwrt.org>; Fri, 4 Dec 2020 17:46:14 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.tintel.eu 17A6B4759F6C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-ipv6.be; s=502B7754-045F-11E5-BBC5-64595FD46BE8; t=1607100374; bh=kI9Cs4DoN2Hv+UHujcLyRcy+OWALdR9Eck1tMDZFeDo=; h=From:To:Date:Message-Id:MIME-Version; b=vBnJ4yz5i7A9Evf7H5BtCSFrNuUi9Rtjg+6+GHcrlKLftRehb6oCMMioSi+iGielw FYfpicqMAR1ubj0kdzeXRvud3boATHFe904b6gbJSKY31OV3EZcMWKEzBtHzVB4TVd 4olWJWnS/cqJvrvS83/THU1MUOnapvkNK/D2wRE8= X-Virus-Scanned: amavisd-new at mail.tintel.eu Received: from mail.tintel.eu ([IPv6:::1]) by localhost (mail.tintel.eu [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id bTW-wVpd5CZD for <openwrt-devel@lists.openwrt.org>; Fri, 4 Dec 2020 17:46:14 +0100 (CET) Received: from taz.sof.bg.adlevio.net (taz.sof.bg.adlevio.net [IPv6:2001:67c:21bc:20:52bf:b29c:6e1e:7c70]) by mail.tintel.eu (Postfix) with SMTP id D5CF147519CF for <openwrt-devel@lists.openwrt.org>; Fri, 4 Dec 2020 17:46:13 +0100 (CET) Received: (nullmailer pid 2309488 invoked by uid 1000); Fri, 04 Dec 2020 16:46:12 -0000 From: Stijn Tintel <stijn@linux-ipv6.be> To: openwrt-devel@lists.openwrt.org Subject: [PATCH] rules.mk: use -fPIC instead of -fpic on arm64 Date: Fri, 4 Dec 2020 18:46:12 +0200 Message-Id: <20201204164612.2309440-1-stijn@linux-ipv6.be> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-Rspamd-Queue-Id: D5CF147519CF X-Spamd-Result: default: False [0.00 / 15.00]; ASN(0.00)[asn:200533, ipnet:2001:67c:21bc::/48, country:BG]; IP_WHITELIST(0.00)[2001:67c:21bc:20:52bf:b29c:6e1e:7c70] X-Rspamd-Server: skulls X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201204_114624_141875_7CA76E18 X-CRM114-Status: GOOD ( 11.09 ) X-Spam-Score: 0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.1 DKIM_INVALID DKIM or DK signature exists, but is not valid X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List <openwrt-devel.lists.openwrt.org> List-Unsubscribe: <https://lists.openwrt.org/mailman/options/openwrt-devel>, <mailto:openwrt-devel-request@lists.openwrt.org?subject=unsubscribe> List-Archive: <http://lists.openwrt.org/pipermail/openwrt-devel/> List-Post: <mailto:openwrt-devel@lists.openwrt.org> List-Help: <mailto:openwrt-devel-request@lists.openwrt.org?subject=help> List-Subscribe: <https://lists.openwrt.org/mailman/listinfo/openwrt-devel>, <mailto:openwrt-devel-request@lists.openwrt.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "openwrt-devel" <openwrt-devel-bounces@lists.openwrt.org> Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org |
Series |
rules.mk: use -fPIC instead of -fpic on arm64
|
expand
|
diff --git a/rules.mk b/rules.mk index 34222a3a71..f79340b124 100644 --- a/rules.mk +++ b/rules.mk @@ -77,7 +77,7 @@ IS_PACKAGE_BUILD := $(if $(filter package/%,$(BUILD_SUBDIR)),1) OPTIMIZE_FOR_CPU=$(subst i386,i486,$(ARCH)) -ifeq ($(ARCH),powerpc) +ifneq (,$(findstring $(ARCH) , aarch64 aarch64_be powerpc )) FPIC:=-fPIC else FPIC:=-fpic
Some packages fail to build on arm64 when PKG_ASLR_PIE_ALL=y, due to machine-specific size restrictions on the global offset table. While the manual instructs to recompile with -fPIC if it fails with -fpic, by doing this per package, there is still a risk of random breakage due to version bumps or other changes, so let's use -fPIC on arm64 by default. While comparing the sizes of 141 packages built with -fpic vs -fPIC, most packages are either equal or smaller in size. Only 9 of the compared packages turned out slightly larger. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> --- rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)