From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 742EF5911 for ; Tue, 25 Apr 2017 18:11:38 +0200 (CEST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP; 25 Apr 2017 09:11:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,250,1488873600"; d="scan'208";a="93638807" Received: from txasoft-yocto.an.intel.com (HELO txasoft-yocto.an.intel.com.) ([10.123.72.111]) by fmsmga005.fm.intel.com with ESMTP; 25 Apr 2017 09:11:36 -0700 From: Gage Eads To: dev@dpdk.org Cc: thomas@monjalon.net, john.jacques@intel.com Date: Tue, 25 Apr 2017 11:10:47 -0500 Message-Id: <1493136647-14744-1-git-send-email-gage.eads@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH] mk: use extra cflags when linking apps with the compiler X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Apr 2017 16:11:39 -0000 From: John Jacques 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 --- mk/rte.app.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mk/rte.app.mk b/mk/rte.app.mk index b5215c0..bcaf1b3 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 -- 2.7.4