From 893d208cc66fbe533ab4e3e66907c5f63266579b Mon Sep 17 00:00:00 2001
From: Ong Boon Leong <boon.leong.ong@intel.com>
Date: Thu, 2 Jul 2015 23:51:01 +0800
Subject: [PATCH] dpdk: add --sysroot option within app makefile

Upstream-Status: Inappropriate [configuration]

rte.app.mk has been changed to add -Wl, to all items listed
under EXTRA_LDFLAGS. It causes --sysroot=<path> to not setup
correctly when we depends on gcc to setup for GNU ld.

Signed-off-by: Ong Boon Leong <boon.leong.ong@intel.com>
Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
---
 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 8ecab41..35fcd8d 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -186,7 +186,7 @@ ifeq ($(LINK_USING_CC),1)
 override EXTRA_LDFLAGS := $(call linkerprefix,$(EXTRA_LDFLAGS))
 O_TO_EXE = $(CC) $(CFLAGS) $(LDFLAGS_$(@)) \
 	-Wl,-Map=$(@).map,--cref -o $@ $(OBJS-y) $(call linkerprefix,$(LDFLAGS)) \
-	$(EXTRA_LDFLAGS) $(call linkerprefix,$(LDLIBS))
+	$(EXTRA_LDFLAGS) $(SYSROOTPATH) $(call linkerprefix,$(LDLIBS))
 else
 O_TO_EXE = $(LD) $(LDFLAGS) $(LDFLAGS_$(@)) $(EXTRA_LDFLAGS) \
 	-Map=$(@).map --cref -o $@ $(OBJS-y) $(LDLIBS)
-- 
1.9.1

