From: Stephen Hemminger <stephen@networkplumber.org>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] mk: add EXTRA_CFLAGS to link step for shared library
Date: Mon, 25 Nov 2019 17:44:03 -0800 [thread overview]
Message-ID: <20191125174403.7b2359c4@hermes.lan> (raw)
In-Reply-To: <2247185.beDHgelkcT@xps>
On Mon, 25 Nov 2019 23:56:00 +0100
Thomas Monjalon <thomas@monjalon.net> 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 <stephen@networkplumber.org>
> > ---
> > --- 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
prev parent reply other threads:[~2019-11-26 1:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-05 1:56 Stephen Hemminger
2019-11-25 22:56 ` Thomas Monjalon
2019-11-26 1:44 ` Stephen Hemminger [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191125174403.7b2359c4@hermes.lan \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).