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 54424A04C2; Tue, 26 Nov 2019 02:44:10 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 58BB02952; Tue, 26 Nov 2019 02:44:09 +0100 (CET) Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by dpdk.org (Postfix) with ESMTP id 8FAE1CF3 for ; Tue, 26 Nov 2019 02:44:07 +0100 (CET) Received: by mail-pl1-f193.google.com with SMTP id k20so2900039pll.13 for ; Mon, 25 Nov 2019 17:44:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hcd9Q80AI5+2MiPdSZFr5LMI0sa5Ox4/P7cMzDRrda0=; b=MP+sy3ByFkGJfDycMO9m7SiyIaYz/fiK4GKhcLggwTrwTJk1CNlCr9iCGBU+AbdN5x f71mpckYB3bCuMAguydQXn2lqBtDl518VYscrthX0UFekz5J43CMji5TmQ2c7uF7789u jXwUCwdj8auUofgvvLe1nu9ldEOx2Yph5famQJiUPPZItTErIAdCEAE94HsYIVmbdrmv OzdQzaf3TNJDwhAwQViVWxYZUTFbUrOeS8BE4wkIlgOTbyBxXzrvAqC6PwV/kFCnYO9i UFz/31E1HAUDQiaW5mpbGcObyBDVzRTKgNTGP3nU8iTi8WKDa1I2HrpWQjyCs7eeydps UVPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hcd9Q80AI5+2MiPdSZFr5LMI0sa5Ox4/P7cMzDRrda0=; b=Lf8E+n7y+gUfSuaPEW6xdAPVjLOWR7lbLcsr9wJNrQ4hWoWptgcYHUikT3bfvcvC5r jqYdUoe7q9sDjXhzkiM632pgiGdGCnF2JtMKcf9KhyyYHL+TRKQYuvMRAzFO/+H4lcRw cfVNdXKfSdvC+fc5aIiK7lXPt8GPj5/jshM2dl5qRKcANg9stgV4m9QKxTEx9aHfjj51 cYF5JjPF+Eg0Y29DWWA1FUxsyE4c49e7I+fVCMFgu4a1IIfB8+WQR4xgtZrgxctmOLmN ZUOmZJV7gHyesJC2WjczUoP04NxJFPcUN4rxHgSYbjei8qgq5tUEvVnfHSlyspEEw86V q6mQ== X-Gm-Message-State: APjAAAUedsfvQL/LNpux9qAwXQz+UM8mSeBScMFXGfiQU6z/MI7cQmUN FVRLw2X19RNBuPfOQdRjXljiiDcn4RM7Pg== X-Google-Smtp-Source: APXvYqxFKBbtIQg5fyojzwuarwPQuaOu6l2303UonP6NVr6tv7o3sLSVrUNSKDYACLR6wJUlMYTuIw== X-Received: by 2002:a17:902:b945:: with SMTP id h5mr31421452pls.291.1574732646127; Mon, 25 Nov 2019 17:44:06 -0800 (PST) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id c9sm10050243pfb.114.2019.11.25.17.44.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2019 17:44:05 -0800 (PST) Date: Mon, 25 Nov 2019 17:44:03 -0800 From: Stephen Hemminger To: Thomas Monjalon Cc: dev@dpdk.org Message-ID: <20191125174403.7b2359c4@hermes.lan> In-Reply-To: <2247185.beDHgelkcT@xps> References: <20191105015642.17385-1-stephen@networkplumber.org> <2247185.beDHgelkcT@xps> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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" On Mon, 25 Nov 2019 23:56:00 +0100 Thomas Monjalon wrote: > 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. Let me try same thing with EXTRA_LDFLAGS