Don't include system/core/include/arch/<arch>/Android.mk for apps-only build.
Bug: 6994483
Change-Id: I76c4d96264cf94a79d59fdeb52bb37c07a9458dd
diff --git a/core/combo/TARGET_linux-mips.mk b/core/combo/TARGET_linux-mips.mk
index f89873e..0cf7964 100644
--- a/core/combo/TARGET_linux-mips.mk
+++ b/core/combo/TARGET_linux-mips.mk
@@ -60,7 +60,7 @@
TARGET_STRIP_COMMAND = $(TARGET_STRIP) --strip-all $< -o $@
else
TARGET_STRIP_COMMAND = $(TARGET_STRIP) --strip-all $< -o $@ && \
- $(TARGET_OBJCOPY) --add-gnu-debuglink=$< $@
+ $(TARGET_OBJCOPY) --add-gnu-debuglink=$< $@
endif
endif
@@ -78,9 +78,6 @@
TARGET_mips_CFLAGS += -fno-omit-frame-pointer
endif
-android_config_h := $(call select-android-config-h,linux-mips)
-arch_include_dir := $(dir $(android_config_h))
-
TARGET_GLOBAL_CFLAGS += \
$(TARGET_mips_CFLAGS) \
-Ulinux -U__unix -U__unix__ -Umips \
@@ -89,9 +86,11 @@
-fdata-sections \
-funwind-tables \
-Werror=format-security \
- $(arch_variant_cflags) \
- -include $(android_config_h) \
- -I $(arch_include_dir)
+ $(arch_variant_cflags)
+
+android_config_h := $(call select-android-config-h,linux-mips)
+TARGET_ANDROID_CONFIG_CFLAGS := -include $(android_config_h) -I $(dir $(android_config_h))
+TARGET_GLOBAL_CFLAGS += $(TARGET_ANDROID_CONFIG_CFLAGS)
# This warning causes dalvik not to build with gcc 4.6.x and -Werror.
# We cannot turn it off blindly since the option is not available