DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stefan Puiu <stefan.puiu@gmail.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] including rte.app.mk from a Makefile.am
Date: Wed, 24 Feb 2016 10:43:35 -0600	[thread overview]
Message-ID: <CACKs7VAC+koKBvzQ7tGVeu0yHroMVuzti3CY5Nw=VXUN+BfrrA@mail.gmail.com> (raw)
In-Reply-To: <7557103.ADgOLz8lG7@xps13>

On Wed, Feb 24, 2016 at 3:26 AM, Thomas Monjalon
<thomas.monjalon@6wind.com> wrote:

> Yes it is prefixed when used instead of assignment.
> In 2.2, it is better fixed:
>
> ifeq ($(LINK_USING_CC),1)
> override EXTRA_LDFLAGS := $(call linkerprefix,$(EXTRA_LDFLAGS))
> O_TO_EXE = $(CC) $(CFLAGS) $(LDFLAGS_$(@)) \
>     -Wl,-Map=$(@).map,--cref -o $@ $(OBJS-y) $(call linkerprefix,$(LDFLAGS)) \
>     $(EXTRA_LDFLAGS) $(call linkerprefix,$(LDLIBS))
>
> So everything is properly prefixed.
>
> Could you please better describe your issue?
> Is $(LINK_USING_CC) true in your case?

Yes, everything would be perfect if the O_TO_EXE part was used. As far
as I can tell, that's not how automake works.

You just set bin_programs, <prog>_SOURCES, <prog>_CFLAGS and then it
generates the Makefile code to build your stuff, which is different
from the above thing; it also uses LDFLAGS, which it treats as a user
variable. In 1.7.1, LDFLAGS is prefixed properly. In 2.2, it's not
prefixed, so the build system ends up calling gcc with linker options.

I'm not implying this is something that should be fixed in the DPDK; I
was just trying to see how others handle this.

>
> Yes, mk/rte.app.mk is primarily used by internal apps.
> If an external app don't want to use the DPDK makefiles, it should be
> possible to use pkgconfig on DPDK. I hadn't time yet to write a patch for
> pkgconfig support, so any contribution is welcome.

I'm not very familiar with pkgconfig, but if it can supply some *FLAGS
to build against, then it sounds good. I've worked on a project where
we built with scons, so including mk files wasn't much of an option.

Thanks,
Stefan.

  reply	other threads:[~2016-02-24 16:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-24  2:24 Stefan Puiu
2016-02-24  9:26 ` Thomas Monjalon
2016-02-24 16:43   ` Stefan Puiu [this message]
2016-02-24  9:28 ` Panu Matilainen

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='CACKs7VAC+koKBvzQ7tGVeu0yHroMVuzti3CY5Nw=VXUN+BfrrA@mail.gmail.com' \
    --to=stefan.puiu@gmail.com \
    --cc=dev@dpdk.org \
    --cc=thomas.monjalon@6wind.com \
    /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).