From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B896EA034F; Mon, 25 Nov 2019 23:56:05 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 880F72952; Mon, 25 Nov 2019 23:56:05 +0100 (CET) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by dpdk.org (Postfix) with ESMTP id DE57291 for ; Mon, 25 Nov 2019 23:56:03 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 8E862226BC; Mon, 25 Nov 2019 17:56:02 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 25 Nov 2019 17:56:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=z2hLbP8kShr6i7vUtS5AGwEFWeL1WhLSjTSlm3mknY8=; b=edB2TSFUv0uo vYM8pBHySTDbJp3vajowRl82u9xjQvDdwzUgnjFDv2ntSUhgRtAloqC9oTtQOJR1 oPMQje/XiJ19e0acIt1hzPflV6SAUOnFeqqWHrd/M0Hty0OtuSHKiX+/Ijg7Ta2D Ff6Blhv8stafKf+TfnXW1oB8luDJRHQ= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=z2hLbP8kShr6i7vUtS5AGwEFWeL1WhLSjTSlm3mkn Y8=; b=oFCRO8R0m04Qa+iI3Mbic+WUhnbQllXqsfWSTfmZv+dGH+JSmCEEDVqby zYctjPmou3jXWe5BWs4cCqO304dh8c+L+aMt3XW1T5o32tvuZUf/nYg2SOItcH8L BYmS0g1rGJHVfJojb/P51ezFZO38bmjEerKDs0daJ145W2XHX4jlCB2aGIb+Fv7N /7gdLxK5KbMlaDBpS8piz/hbBH/IPDk1vAltBlQpuUFkwiwTU6w+fkvpx6UAZ5kv aMYBspsREVwBYaywciSQW81g3GVhU2ymqsBwkgo3xgZMG9DbPJfIMC6FKhBW1myq oDwqrhMWKVTYm9lW0djpVjo8oOmFA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrudeivddgtdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecuff homhgrihhnpehshhgrrhgvugdrmhhknecukfhppeejjedrudefgedrvddtfedrudekgeen ucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth enucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 9A70F306005C; Mon, 25 Nov 2019 17:56:01 -0500 (EST) From: Thomas Monjalon To: Stephen Hemminger Cc: dev@dpdk.org Date: Mon, 25 Nov 2019 23:56:00 +0100 Message-ID: <2247185.beDHgelkcT@xps> In-Reply-To: <20191105015642.17385-1-stephen@networkplumber.org> References: <20191105015642.17385-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] mk: add EXTRA_CFLAGS to link step for shared library X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 05/11/2019 02:56, Stephen Hemminger: > When doing a cross compiling it is common to use EXTRA_CFLAGS with > --sysroot option to point to alternate root filesystem. This already > works as expected for objects and executables, it just doesn't work > correctly for shared libraries. > > When a shared library is linked using CC this flag needs to > be passed in order for libraries to be found. > > Signed-off-by: Stephen Hemminger > --- > --- a/mk/rte.shared.mk > +++ b/mk/rte.shared.mk > -O_TO_SO = $(CC) $(call linkerprefix,$(LDFLAGS)) $(LDFLAGS_$(@)) $(EXTRA_LDFLAGS) \ > +O_TO_SO = $(CC) $(EXTRA_CFLAGS) $(call linkerprefix,$(LDFLAGS)) $(LDFLAGS_$(@)) $(EXTRA_LDFLAGS) \ > -shared -o $@ $(OBJS-y) $(call linkerprefix,$(LDLIBS)) After several thoughts, I am afraid of the possible side effects of such a change. I think only LDFLAGS should be used when linking. If you need the same parameters at compilation and linking, you should pass the same parameters to CFLAGS and LDFLAGS.