DPDK patches and discussions
 help / color / mirror / Atom feed
From: Gage Eads <gage.eads@intel.com>
To: dev@dpdk.org
Cc: thomas@monjalon.net
Subject: [dpdk-dev] [PATCH] mk: use extra cflags when linking libs with a compiler
Date: Tue, 25 Jul 2017 10:03:46 -0500	[thread overview]
Message-ID: <1500995026-20707-1-git-send-email-gage.eads@intel.com> (raw)

When using the compiler to link libraries, include EXTRA_CFLAGS. This is
needed when cross-compiling to pass --sysroot, for example. GCC
cross-compilers built with Yocto don't use the --with-sysroot option,
making it necessary to pass the --sysroot command-line option.

This is the same solution as in commit e8fbb6d9cfd9 ("mk: use extra cflags
when linking with compiler"), but applied to libs instead of apps.
---
 mk/rte.lib.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk
index bc2f2fb..13115d1 100644
--- a/mk/rte.lib.mk
+++ b/mk/rte.lib.mk
@@ -77,7 +77,7 @@ exe2cmd = $(strip $(call dotfile,$(patsubst %,%.cmd,$(1))))
 
 ifeq ($(LINK_USING_CC),1)
 # Override the definition of LD here, since we're linking with CC
-LD := $(CC) $(CPU_CFLAGS)
+LD := $(CC) $(CPU_CFLAGS) $(EXTRA_CFLAGS)
 _CPU_LDFLAGS := $(call linkerprefix,$(CPU_LDFLAGS))
 override EXTRA_LDFLAGS := $(call linkerprefix,$(EXTRA_LDFLAGS))
 else
-- 
2.7.4

             reply	other threads:[~2017-07-25 15:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-25 15:03 Gage Eads [this message]
2017-07-31 21:44 ` Thomas Monjalon
2017-07-31 21:46   ` Eads, Gage
2017-07-31 21:49 ` [dpdk-dev] [PATCH v2] " Gage Eads
2017-07-31 21:56   ` Thomas Monjalon

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=1500995026-20707-1-git-send-email-gage.eads@intel.com \
    --to=gage.eads@intel.com \
    --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).