From patchwork Fri Mar 19 22:58:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip Prindeville X-Patchwork-Id: 1456063 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1:d65d:64ff:fe57:4e05; helo=desiato.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) 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=desiato.20200630 header.b=QjFTCRyW; dkim-atps=neutral Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) (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 4F2K9y0zfmz9sWK for ; Sat, 20 Mar 2021 10:00:37 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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:Cc:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=PPgwiUNdJY8pCOD9vXSPZG+P494St5nOH/uJS+YQLd4=; b=QjFTCRyWUS1Ibyc00Oldl6Sxz9 uRFxUe5f4Wk6TfKMV7IN0Ak/TQ4UyCM+GQAz8/kIqc1FUdU9kXHM51zN2+yARYzgk7F/Qzk7j133+ 1kQxd7Od7zvGq3tvKTl/XUWuRE99Q5bt8537Djdz5y3oXPLvCniiiu26UiHn5TV7PAQbbw0bl4at6 UQ7rMWWAdE4CK8R6TDgjQ05oYZj0lywoa/4RoK5/7V9vpdPmg1pSYLiUuYa4tlmtuv1vdxLMupiMg tmosxUuiBqb2sbllWf/qZwyNnARFCNG2tPR6MQRNP4alKNGIV+M2ExsugmvPPTX53Fs5IlyrUFsNB a5xcIYfg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lNO4o-008I49-8V; Fri, 19 Mar 2021 22:58:42 +0000 Received: from mail.redfish-solutions.com ([45.33.216.244]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lNO4j-008I3X-Bh for openwrt-devel@lists.openwrt.org; Fri, 19 Mar 2021 22:58:39 +0000 Received: from ubuntu20.redfish-solutions.com (ubuntu20.redfish-solutions.com [192.168.4.33]) (authenticated bits=0) by mail.redfish-solutions.com (8.16.1/8.16.1) with ESMTPSA id 12JMwWLA211878 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 19 Mar 2021 16:58:32 -0600 From: "Philip Prindeville" To: openwrt-devel@lists.openwrt.org Cc: Philip Prindeville Subject: [PATCH 1/1] build: make sure asm gets built with -DPIC Date: Fri, 19 Mar 2021 16:58:32 -0600 Message-Id: <20210319225832.3614929-1-philipp@redfish-solutions.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 192.168.4.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210319_225837_747556_501A9B87 X-CRM114-Status: UNSURE ( 7.70 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: Spam detection software, running on the system "desiato.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Philip Prindeville Fixes issue #14921, whereby inline ASM wasn't getting built as PIC; look at gmp-6.2.1/mpn/x86/pentium/popcount.asm for example: ifdef(`PIC',` ... Content analysis details: (0.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org From: Philip Prindeville Fixes issue #14921, whereby inline ASM wasn't getting built as PIC; look at gmp-6.2.1/mpn/x86/pentium/popcount.asm for example: ifdef(`PIC',` ... for a routine that exists in both PIC and non-PIC versions. Make sure that wherever $(FPIC) gets passed as a variable expansion that it gets quoted where necessary (such as setting environment variables in shell commands). Signed-off-by: Philip Prindeville --- package/libs/libnfnetlink/Makefile | 4 ++-- rules.mk | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package/libs/libnfnetlink/Makefile b/package/libs/libnfnetlink/Makefile index 7d65d6385784e3d418f714386efe505b905c3b3e..bc64ff111d1f37e64463d519736d013679ccebf0 100644 --- a/package/libs/libnfnetlink/Makefile +++ b/package/libs/libnfnetlink/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libnfnetlink PKG_VERSION:=1.0.1 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:= \ @@ -45,7 +45,7 @@ CONFIGURE_ARGS += \ --enable-shared CONFIGURE_VARS += \ - lt_prog_compiler_pic=$(FPIC) + lt_prog_compiler_pic="$(FPIC)" define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include/libnfnetlink diff --git a/rules.mk b/rules.mk index 8dee9e8489ac81ee524ca096e38355cea9730368..cb165f954892578f7c11e872d1ff921c96df90da 100644 --- a/rules.mk +++ b/rules.mk @@ -76,12 +76,12 @@ IS_PACKAGE_BUILD := $(if $(filter package/%,$(BUILD_SUBDIR)),1) OPTIMIZE_FOR_CPU=$(subst i386,i486,$(ARCH)) ifneq (,$(findstring $(ARCH) , aarch64 aarch64_be powerpc )) - FPIC:=-fPIC + FPIC:=-DPIC -fPIC else - FPIC:=-fpic + FPIC:=-DPIC -fpic endif -HOST_FPIC:=-fPIC +HOST_FPIC:=-DPIC -fPIC ARCH_SUFFIX:=$(call qstrip,$(CONFIG_CPU_TYPE)) GCC_ARCH:=