Skip to contentSkip to conversation

mk: use extra cflags when linking apps with the compiler

PATCH Applied Gage Eads 2 participants 2 messages Apr 25, 2017 – Apr 30, 2017

lore
Share & tools
lore

Gage Eads

author
#0 lore raw

PATCH 1/1 mk: use extra cflags when linking apps with the compiler

From: John Jacques <[email protected]>

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.

---
 mk/rte.app.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mk/rte.app.mk +1 -1
index b5215c0..bcaf1b3 100644
@@ -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
Signature · 1 line
2.7.4
#1 lore raw

25/04/2017 18:10, Gage Eads:

Quoted 9 lines

From: John Jacques <[email protected]>

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.

Applied, thanks