From: John Jacques Date: Tue, 25 Apr 2017 16:10:47 +0000 (-0500) Subject: mk: use extra cflags when linking with compiler X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=e8fbb6d9cfd9;p=dpdk.git mk: use extra cflags when linking with compiler When using the compiler to link applications, include EXTRA_CFLAGS. This is needed, for example, when cross-compiling, to pass --sysroot. GCC cross-compilers built with Yocto don't use the --with-sysroot option, making it necessary to pass --sysroot command-line option. Signed-off-by: John Jacques Signed-off-by: Gage Eads --- diff --git a/mk/rte.app.mk b/mk/rte.app.mk index b5215c02ef..bcaf1b3820 100644 --- a/mk/rte.app.mk +++ b/mk/rte.app.mk @@ -235,7 +235,7 @@ build: _postbuild exe2cmd = $(strip $(call dotfile,$(patsubst %,%.cmd,$(1)))) ifeq ($(LINK_USING_CC),1) -O_TO_EXE = $(CC) -o $@ $(CFLAGS) $(OBJS-y) $(call linkerprefix, \ +O_TO_EXE = $(CC) -o $@ $(CFLAGS) $(EXTRA_CFLAGS) $(OBJS-y) $(call linkerprefix, \ $(LDLIBS) $(LDFLAGS) $(LDFLAGS_$(@)) $(EXTRA_LDFLAGS) \ $(MAPFLAGS)) else