summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGage Eads <gage.eads@intel.com>2017-07-31 16:49:51 -0500
committerThomas Monjalon <thomas@monjalon.net>2017-07-31 23:57:49 +0200
commitec57ed08c992bf61d7a90fedf807dc38a511383d (patch)
treee82ca80418f6909fa51100c355dea6adcfcdc9d0
parentbdc3a09b4acb73aad56a83c12bd8c268849f76b5 (diff)
downloaddpdk-ec57ed08c992bf61d7a90fedf807dc38a511383d.zip
dpdk-ec57ed08c992bf61d7a90fedf807dc38a511383d.tar.gz
dpdk-ec57ed08c992bf61d7a90fedf807dc38a511383d.tar.xz
mk: use extra cflags when linking libs with compiler
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. Signed-off-by: Gage Eads <gage.eads@intel.com>
-rw-r--r--mk/rte.lib.mk2
1 files changed, 1 insertions, 1 deletions
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