make/common/NativeCompilation.gmk
changeset 23428 3c8a05bf4656
parent 22721 63761da45392
child 23433 afe67de12b7d
--- a/make/common/NativeCompilation.gmk	Wed Mar 26 16:56:58 2014 -0700
+++ b/make/common/NativeCompilation.gmk	Fri Mar 28 14:59:56 2014 +0100
@@ -369,6 +369,10 @@
     $$(error Unknown value for OPTIMIZATION: $$($1_OPTIMIZATION))
   endif
 
+  # Add sys root specific cflags last
+  $1_EXTRA_CFLAGS += $(SYSROOT_CFLAGS)
+  $1_EXTRA_CXXFLAGS += $(SYSROOT_CFLAGS)
+
   # Now call add_native_source for each source file we are going to compile.
   $$(foreach p,$$($1_SRCS), \
       $$(eval $$(call add_native_source,$1,$$p,$$($1_OBJECT_DIR), \
@@ -414,6 +418,8 @@
     $1_EXTRA_LDFLAGS += $(call SET_SHARED_LIBRARY_MAPFILE,$$($1_REAL_MAPFILE))
   endif
 
+  $1_EXTRA_LDFLAGS += $(SYSROOT_LDFLAGS)
+
   # Need to make sure TARGET is first on list
   $1 := $$($1_TARGET)
   ifeq ($$($1_STATIC_LIBRARY),)