diff --git a/core/clang/HOST_CROSS_x86.mk b/core/clang/HOST_CROSS_x86.mk index c67825b66..f7b2583e4 100644 --- a/core/clang/HOST_CROSS_x86.mk +++ b/core/clang/HOST_CROSS_x86.mk @@ -36,20 +36,4 @@ CLANG_CONFIG_x86_HOST_CROSS_EXTRA_LDFLAGS := \ $(CLANG_CONFIG_x86_HOST_CROSS_COMBO_EXTRA_LDFLAGS) \ -target $(CLANG_CONFIG_x86_HOST_CROSS_TRIPLE) -$(clang_2nd_arch_prefix)CLANG_HOST_CROSS_GLOBAL_CFLAGS := \ - $(call convert-to-host-clang-flags,$($(clang_2nd_arch_prefix)HOST_CROSS_GLOBAL_CFLAGS)) \ - $(CLANG_CONFIG_x86_HOST_CROSS_EXTRA_CFLAGS) - -$(clang_2nd_arch_prefix)CLANG_HOST_CROSS_GLOBAL_CONLYFLAGS := \ - $(call convert-to-host-clang-flags,$($(clang_2nd_arch_prefix)HOST_CROSS_GLOBAL_CONLYFLAGS)) \ - $(CLANG_CONFIG_x86_HOST_CROSS_EXTRA_CONLYFLAGS) - -$(clang_2nd_arch_prefix)CLANG_HOST_CROSS_GLOBAL_CPPFLAGS := \ - $(call convert-to-host-clang-flags,$($(clang_2nd_arch_prefix)HOST_CROSS_GLOBAL_CPPFLAGS)) \ - $(CLANG_CONFIG_x86_HOST_CROSS_EXTRA_CPPFLAGS) - -$(clang_2nd_arch_prefix)CLANG_HOST_CROSS_GLOBAL_LDFLAGS := \ - $(call convert-to-host-clang-flags,$($(clang_2nd_arch_prefix)HOST_CROSS_GLOBAL_LDFLAGS)) \ - $(CLANG_CONFIG_x86_HOST_CROSS_EXTRA_LDFLAGS) - $(clang_2nd_arch_prefix)HOST_CROSS_LIBPROFILE_RT := $(LLVM_RTLIB_PATH)/libclang_rt.profile-i686.a diff --git a/core/clang/HOST_CROSS_x86_64.mk b/core/clang/HOST_CROSS_x86_64.mk index cdf49a9b0..6d67a7e4c 100644 --- a/core/clang/HOST_CROSS_x86_64.mk +++ b/core/clang/HOST_CROSS_x86_64.mk @@ -36,20 +36,4 @@ CLANG_CONFIG_x86_64_HOST_CROSS_EXTRA_LDFLAGS := \ $(CLANG_CONFIG_x86_64_HOST_CROSS_COMBO_EXTRA_LDFLAGS) \ -target $(CLANG_CONFIG_x86_64_HOST_CROSS_TRIPLE) -$(clang_2nd_arch_prefix)CLANG_HOST_CROSS_GLOBAL_CFLAGS := \ - $(call convert-to-host-clang-flags,$($(clang_2nd_arch_prefix)HOST_CROSS_GLOBAL_CFLAGS)) \ - $(CLANG_CONFIG_x86_64_HOST_CROSS_EXTRA_CFLAGS) - -$(clang_2nd_arch_prefix)CLANG_HOST_CROSS_GLOBAL_CONLYFLAGS := \ - $(call convert-to-host-clang-flags,$($(clang_2nd_arch_prefix)HOST_CROSS_GLOBAL_CONLYFLAGS)) \ - $(CLANG_CONFIG_x86_64_HOST_CROSS_EXTRA_CONLYFLAGS) - -$(clang_2nd_arch_prefix)CLANG_HOST_CROSS_GLOBAL_CPPFLAGS := \ - $(call convert-to-host-clang-flags,$($(clang_2nd_arch_prefix)HOST_CROSS_GLOBAL_CPPFLAGS)) \ - $(CLANG_CONFIG_x86_64_HOST_CROSS_EXTRA_CPPFLAGS) - -$(clang_2nd_arch_prefix)CLANG_HOST_CROSS_GLOBAL_LDFLAGS := \ - $(call convert-to-host-clang-flags,$($(clang_2nd_arch_prefix)HOST_CROSS_GLOBAL_LDFLAGS)) \ - $(CLANG_CONFIG_x86_64_HOST_CROSS_EXTRA_LDFLAGS) - $(clang_2nd_arch_prefix)HOST_CROSS_LIBPROFILE_RT := $(LLVM_RTLIB_PATH)/libclang_rt.profile-x86_64.a diff --git a/core/clang/HOST_x86.mk b/core/clang/HOST_x86.mk index a2015f13e..c89fca85f 100644 --- a/core/clang/HOST_x86.mk +++ b/core/clang/HOST_x86.mk @@ -57,20 +57,4 @@ define $(clang_2nd_arch_prefix)convert-to-host-clang-flags $(1)))) endef -$(clang_2nd_arch_prefix)CLANG_HOST_GLOBAL_CFLAGS := \ - $(call $(clang_2nd_arch_prefix)convert-to-host-clang-flags,$($(clang_2nd_arch_prefix)HOST_GLOBAL_CFLAGS)) \ - $(CLANG_CONFIG_x86_HOST_EXTRA_CFLAGS) - -$(clang_2nd_arch_prefix)CLANG_HOST_GLOBAL_CONLYFLAGS := \ - $(call $(clang_2nd_arch_prefix)convert-to-host-clang-flags,$($(clang_2nd_arch_prefix)HOST_GLOBAL_CONLYFLAGS)) \ - $(CLANG_CONFIG_x86_HOST_EXTRA_CONLYFLAGS) - -$(clang_2nd_arch_prefix)CLANG_HOST_GLOBAL_CPPFLAGS := \ - $(call $(clang_2nd_arch_prefix)convert-to-host-clang-flags,$($(clang_2nd_arch_prefix)HOST_GLOBAL_CPPFLAGS)) \ - $(CLANG_CONFIG_x86_HOST_EXTRA_CPPFLAGS) - -$(clang_2nd_arch_prefix)CLANG_HOST_GLOBAL_LDFLAGS := \ - $(call $(clang_2nd_arch_prefix)convert-to-host-clang-flags,$($(clang_2nd_arch_prefix)HOST_GLOBAL_LDFLAGS)) \ - $(CLANG_CONFIG_x86_HOST_EXTRA_LDFLAGS) - $(clang_2nd_arch_prefix)HOST_LIBPROFILE_RT := $(LLVM_RTLIB_PATH)/libclang_rt.profile-i686.a diff --git a/core/clang/HOST_x86_64.mk b/core/clang/HOST_x86_64.mk index b2f83f757..ce452a3e2 100644 --- a/core/clang/HOST_x86_64.mk +++ b/core/clang/HOST_x86_64.mk @@ -57,20 +57,4 @@ define convert-to-host-clang-flags $(1)))) endef -CLANG_HOST_GLOBAL_CFLAGS := \ - $(call convert-to-host-clang-flags,$(HOST_GLOBAL_CFLAGS)) \ - $(CLANG_CONFIG_x86_64_HOST_EXTRA_CFLAGS) - -CLANG_HOST_GLOBAL_CONLYFLAGS := \ - $(call convert-to-host-clang-flags,$(HOST_GLOBAL_CONLYFLAGS)) \ - $(CLANG_CONFIG_x86_64_HOST_EXTRA_CONLYFLAGS) - -CLANG_HOST_GLOBAL_CPPFLAGS := \ - $(call convert-to-host-clang-flags,$(HOST_GLOBAL_CPPFLAGS)) \ - $(CLANG_CONFIG_x86_64_HOST_EXTRA_CPPFLAGS) - -CLANG_HOST_GLOBAL_LDFLAGS := \ - $(call convert-to-host-clang-flags,$(HOST_GLOBAL_LDFLAGS)) \ - $(CLANG_CONFIG_x86_64_HOST_EXTRA_LDFLAGS) - HOST_LIBPROFILE_RT := $(LLVM_RTLIB_PATH)/libclang_rt.profile-x86_64.a diff --git a/core/clang/TARGET_arm.mk b/core/clang/TARGET_arm.mk index 906e677ea..9ff19b4f8 100644 --- a/core/clang/TARGET_arm.mk +++ b/core/clang/TARGET_arm.mk @@ -44,22 +44,6 @@ define $(clang_2nd_arch_prefix)convert-to-clang-flags $(1)))) endef -$(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_CFLAGS := \ - $(call $(clang_2nd_arch_prefix)convert-to-clang-flags,$($(clang_2nd_arch_prefix)TARGET_GLOBAL_CFLAGS)) \ - $(CLANG_CONFIG_arm_TARGET_EXTRA_CFLAGS) - -$(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_CONLYFLAGS := \ - $(call $(clang_2nd_arch_prefix)convert-to-clang-flags,$($(clang_2nd_arch_prefix)TARGET_GLOBAL_CONLYFLAGS)) \ - $(CLANG_CONFIG_arm_TARGET_EXTRA_CONLYFLAGS) - -$(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_CPPFLAGS := \ - $(call $(clang_2nd_arch_prefix)convert-to-clang-flags,$($(clang_2nd_arch_prefix)TARGET_GLOBAL_CPPFLAGS)) \ - $(CLANG_CONFIG_arm_TARGET_EXTRA_CPPFLAGS) - -$(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_LDFLAGS := \ - $(call $(clang_2nd_arch_prefix)convert-to-clang-flags,$($(clang_2nd_arch_prefix)TARGET_GLOBAL_LDFLAGS)) \ - $(CLANG_CONFIG_arm_TARGET_EXTRA_LDFLAGS) - $(clang_2nd_arch_prefix)RS_TRIPLE := armv7-linux-androideabi $(clang_2nd_arch_prefix)RS_TRIPLE_CFLAGS := $(clang_2nd_arch_prefix)RS_COMPAT_TRIPLE := armv7-none-linux-gnueabi diff --git a/core/clang/TARGET_arm64.mk b/core/clang/TARGET_arm64.mk index 15b0172a6..77390d08b 100644 --- a/core/clang/TARGET_arm64.mk +++ b/core/clang/TARGET_arm64.mk @@ -43,22 +43,6 @@ define convert-to-clang-flags $(1)))) endef -CLANG_TARGET_GLOBAL_CFLAGS := \ - $(call convert-to-clang-flags,$(TARGET_GLOBAL_CFLAGS)) \ - $(CLANG_CONFIG_arm64_TARGET_EXTRA_CFLAGS) - -CLANG_TARGET_GLOBAL_CONLYFLAGS := \ - $(call convert-to-clang-flags,$(TARGET_GLOBAL_CONLYFLAGS)) \ - $(CLANG_CONFIG_arm64_TARGET_EXTRA_CONLYFLAGS) - -CLANG_TARGET_GLOBAL_CPPFLAGS := \ - $(call convert-to-clang-flags,$(TARGET_GLOBAL_CPPFLAGS)) \ - $(CLANG_CONFIG_arm64_TARGET_EXTRA_CPPFLAGS) - -CLANG_TARGET_GLOBAL_LDFLAGS := \ - $(call convert-to-clang-flags,$(TARGET_GLOBAL_LDFLAGS)) \ - $(CLANG_CONFIG_arm64_TARGET_EXTRA_LDFLAGS) - RS_TRIPLE := aarch64-linux-android RS_TRIPLE_CFLAGS := RS_COMPAT_TRIPLE := aarch64-linux-android diff --git a/core/clang/TARGET_mips.mk b/core/clang/TARGET_mips.mk index c3c808b8e..46a9966f7 100644 --- a/core/clang/TARGET_mips.mk +++ b/core/clang/TARGET_mips.mk @@ -44,22 +44,6 @@ define $(clang_2nd_arch_prefix)convert-to-clang-flags $(1)))) endef -$(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_CFLAGS := \ - $(call $(clang_2nd_arch_prefix)convert-to-clang-flags,$($(clang_2nd_arch_prefix)TARGET_GLOBAL_CFLAGS)) \ - $(CLANG_CONFIG_mips_TARGET_EXTRA_CFLAGS) - -$(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_CONLYFLAGS := \ - $(call $(clang_2nd_arch_prefix)convert-to-clang-flags,$($(clang_2nd_arch_prefix)TARGET_GLOBAL_CONLYFLAGS)) \ - $(CLANG_CONFIG_mips_TARGET_EXTRA_CONLYFLAGS) - -$(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_CPPFLAGS := \ - $(call $(clang_2nd_arch_prefix)convert-to-clang-flags,$($(clang_2nd_arch_prefix)TARGET_GLOBAL_CPPFLAGS)) \ - $(CLANG_CONFIG_mips_TARGET_EXTRA_CPPFLAGS) - -$(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_LDFLAGS := \ - $(call $(clang_2nd_arch_prefix)convert-to-clang-flags,$($(clang_2nd_arch_prefix)TARGET_GLOBAL_LDFLAGS)) \ - $(CLANG_CONFIG_mips_TARGET_EXTRA_LDFLAGS) - $(clang_2nd_arch_prefix)RS_TRIPLE := armv7-linux-androideabi $(clang_2nd_arch_prefix)RS_TRIPLE_CFLAGS := RS_COMPAT_TRIPLE := mipsel-linux-android diff --git a/core/clang/TARGET_mips64.mk b/core/clang/TARGET_mips64.mk index 5ea56ffa5..9f86a4805 100644 --- a/core/clang/TARGET_mips64.mk +++ b/core/clang/TARGET_mips64.mk @@ -43,22 +43,6 @@ define convert-to-clang-flags $(1)))) endef -CLANG_TARGET_GLOBAL_CFLAGS := \ - $(call convert-to-clang-flags,$(TARGET_GLOBAL_CFLAGS)) \ - $(CLANG_CONFIG_mips64_TARGET_EXTRA_CFLAGS) - -CLANG_TARGET_GLOBAL_CONLYFLAGS := \ - $(call convert-to-clang-flags,$(TARGET_GLOBAL_CONLYFLAGS)) \ - $(CLANG_CONFIG_mips64_TARGET_EXTRA_CONLYFLAGS) - -CLANG_TARGET_GLOBAL_CPPFLAGS := \ - $(call convert-to-clang-flags,$(TARGET_GLOBAL_CPPFLAGS)) \ - $(CLANG_CONFIG_mips64_TARGET_EXTRA_CPPFLAGS) - -CLANG_TARGET_GLOBAL_LDFLAGS := \ - $(call convert-to-clang-flags,$(TARGET_GLOBAL_LDFLAGS)) \ - $(CLANG_CONFIG_mips64_TARGET_EXTRA_LDFLAGS) - RS_TRIPLE := aarch64-linux-android RS_TRIPLE_CFLAGS := RS_COMPAT_TRIPLE := mips64el-linux-android diff --git a/core/clang/TARGET_x86.mk b/core/clang/TARGET_x86.mk index 741768b5e..51cf1c501 100644 --- a/core/clang/TARGET_x86.mk +++ b/core/clang/TARGET_x86.mk @@ -50,22 +50,6 @@ define $(clang_2nd_arch_prefix)convert-to-clang-flags $(1)))) endef -$(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_CFLAGS := \ - $(call $(clang_2nd_arch_prefix)convert-to-clang-flags,$($(clang_2nd_arch_prefix)TARGET_GLOBAL_CFLAGS)) \ - $(CLANG_CONFIG_x86_TARGET_EXTRA_CFLAGS) - -$(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_CONLYFLAGS := \ - $(call $(clang_2nd_arch_prefix)convert-to-clang-flags,$($(clang_2nd_arch_prefix)TARGET_GLOBAL_CONLYFLAGS)) \ - $(CLANG_CONFIG_x86_TARGET_EXTRA_CONLYFLAGS) - -$(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_CPPFLAGS := \ - $(call $(clang_2nd_arch_prefix)convert-to-clang-flags,$($(clang_2nd_arch_prefix)TARGET_GLOBAL_CPPFLAGS)) \ - $(CLANG_CONFIG_x86_TARGET_EXTRA_CPPFLAGS) - -$(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_LDFLAGS := \ - $(call $(clang_2nd_arch_prefix)convert-to-clang-flags,$($(clang_2nd_arch_prefix)TARGET_GLOBAL_LDFLAGS)) \ - $(CLANG_CONFIG_x86_TARGET_EXTRA_LDFLAGS) - $(clang_2nd_arch_prefix)RS_TRIPLE := armv7-linux-androideabi $(clang_2nd_arch_prefix)RS_TRIPLE_CFLAGS := -D__i386__ $(clang_2nd_arch_prefix)RS_COMPAT_TRIPLE := i686-linux-android diff --git a/core/clang/TARGET_x86_64.mk b/core/clang/TARGET_x86_64.mk index e44382dcb..08649592d 100644 --- a/core/clang/TARGET_x86_64.mk +++ b/core/clang/TARGET_x86_64.mk @@ -43,22 +43,6 @@ define convert-to-clang-flags $(1)))) endef -CLANG_TARGET_GLOBAL_CFLAGS := \ - $(call convert-to-clang-flags,$(TARGET_GLOBAL_CFLAGS)) \ - $(CLANG_CONFIG_x86_64_TARGET_EXTRA_CFLAGS) - -CLANG_TARGET_GLOBAL_CONLYFLAGS := \ - $(call convert-to-clang-flags,$(TARGET_GLOBAL_CONLYFLAGS)) \ - $(CLANG_CONFIG_x86_64_TARGET_EXTRA_CONLYFLAGS) - -CLANG_TARGET_GLOBAL_CPPFLAGS := \ - $(call convert-to-clang-flags,$(TARGET_GLOBAL_CPPFLAGS)) \ - $(CLANG_CONFIG_x86_64_TARGET_EXTRA_CPPFLAGS) - -CLANG_TARGET_GLOBAL_LDFLAGS := \ - $(call convert-to-clang-flags,$(TARGET_GLOBAL_LDFLAGS)) \ - $(CLANG_CONFIG_x86_64_TARGET_EXTRA_LDFLAGS) - RS_TRIPLE := aarch64-linux-android RS_TRIPLE_CFLAGS := -D__x86_64__ RS_COMPAT_TRIPLE := x86_64-linux-android diff --git a/core/combo/HOST_CROSS_windows-x86.mk b/core/combo/HOST_CROSS_windows-x86.mk index 19ff7a328..5328982e8 100644 --- a/core/combo/HOST_CROSS_windows-x86.mk +++ b/core/combo/HOST_CROSS_windows-x86.mk @@ -17,38 +17,14 @@ # Settings to use MinGW as a cross-compiler under Linux # Included by combo/select.make -$(combo_var_prefix)GLOBAL_CFLAGS += -DUSE_MINGW -DWIN32_LEAN_AND_MEAN -$(combo_var_prefix)GLOBAL_CFLAGS += -Wno-unused-parameter -$(combo_var_prefix)GLOBAL_CFLAGS += --sysroot prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8/x86_64-w64-mingw32 -$(combo_var_prefix)GLOBAL_CFLAGS += -m32 -$(combo_var_prefix)GLOBAL_LDFLAGS += -m32 -$(combo_var_prefix)GLOBAL_LDFLAGS += -Lprebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8/x86_64-w64-mingw32/lib32 $(combo_var_prefix)C_INCLUDES += prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8/x86_64-w64-mingw32/include $(combo_var_prefix)C_INCLUDES += prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8/lib/gcc/x86_64-w64-mingw32/4.8.3/include -# Workaround differences in inttypes.h between host and target. -# See bug 12708004. -$(combo_var_prefix)GLOBAL_CFLAGS += -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -# Use C99-compliant printf functions (%zd). -$(combo_var_prefix)GLOBAL_CFLAGS += -D__USE_MINGW_ANSI_STDIO=1 -# Admit to using >= Vista. Both are needed because of <_mingw.h>. -$(combo_var_prefix)GLOBAL_CFLAGS += -D_WIN32_WINNT=0x0600 -DWINVER=0x0600 -# Get 64-bit off_t and related functions. -$(combo_var_prefix)GLOBAL_CFLAGS += -D_FILE_OFFSET_BITS=64 - define $(combo_var_prefix)transform-shared-lib-to-toc $(hide) $($(PRIVATE_2ND_ARCH_VAR_PREFIX)$(PRIVATE_PREFIX)OBJDUMP) -x $(1) | grep "^Name" | cut -f3 -d" " > $(2) $(hide) $($(PRIVATE_2ND_ARCH_VAR_PREFIX)$(PRIVATE_PREFIX)NM) -g -f p $(1) | cut -f1-2 -d" " >> $(2) endef -$(combo_var_prefix)GLOBAL_LDFLAGS += \ - --enable-stdcall-fixup - -ifneq ($(strip $(BUILD_HOST_static)),) -# Statically-linked binaries are desirable for sandboxed environment -$(combo_var_prefix)GLOBAL_LDFLAGS += -static -endif # BUILD_HOST_static - $(combo_var_prefix)SHLIB_SUFFIX := .dll $(combo_var_prefix)EXECUTABLE_SUFFIX := .exe diff --git a/core/combo/HOST_CROSS_windows-x86_64.mk b/core/combo/HOST_CROSS_windows-x86_64.mk index 5302c8365..b8101f424 100644 --- a/core/combo/HOST_CROSS_windows-x86_64.mk +++ b/core/combo/HOST_CROSS_windows-x86_64.mk @@ -17,38 +17,14 @@ # Settings to use MinGW as a cross-compiler under Linux # Included by combo/select.make -$(combo_var_prefix)GLOBAL_CFLAGS += -DUSE_MINGW -DWIN32_LEAN_AND_MEAN -$(combo_var_prefix)GLOBAL_CFLAGS += -Wno-unused-parameter -$(combo_var_prefix)GLOBAL_CFLAGS += --sysroot prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8/x86_64-w64-mingw32 -$(combo_var_prefix)GLOBAL_CFLAGS += -m64 -$(combo_var_prefix)GLOBAL_LDFLAGS += -m64 -$(combo_var_prefix)GLOBAL_LDFLAGS += -Lprebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8/x86_64-w64-mingw32/lib64 $(combo_var_prefix)C_INCLUDES += prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8/x86_64-w64-mingw32/include $(combo_var_prefix)C_INCLUDES += prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8/lib/gcc/x86_64-w64-mingw32/4.8.3/include -# Workaround differences in inttypes.h between host and target. -# See bug 12708004. -$(combo_var_prefix)GLOBAL_CFLAGS += -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -# Use C99-compliant printf functions (%zd). -$(combo_var_prefix)GLOBAL_CFLAGS += -D__USE_MINGW_ANSI_STDIO=1 -# Admit to using >= Vista. Both are needed because of <_mingw.h>. -$(combo_var_prefix)GLOBAL_CFLAGS += -D_WIN32_WINNT=0x0600 -DWINVER=0x0600 -# Get 64-bit off_t and related functions. -$(combo_var_prefix)GLOBAL_CFLAGS += -D_FILE_OFFSET_BITS=64 - define $(combo_var_prefix)transform-shared-lib-to-toc $(hide) $($(PRIVATE_2ND_ARCH_VAR_PREFIX)$(PRIVATE_PREFIX)OBJDUMP) -x $(1) | grep "^Name" | cut -f3 -d" " > $(2) $(hide) $($(PRIVATE_2ND_ARCH_VAR_PREFIX)$(PRIVATE_PREFIX)NM) -g -f p $(1) | cut -f1-2 -d" " >> $(2) endef -$(combo_var_prefix)GLOBAL_LDFLAGS += \ - --enable-stdcall-fixup - -ifneq ($(strip $(BUILD_HOST_static)),) -# Statically-linked binaries are desirable for sandboxed environment -$(combo_var_prefix)GLOBAL_LDFLAGS += -static -endif # BUILD_HOST_static - $(combo_var_prefix)SHLIB_SUFFIX := .dll $(combo_var_prefix)EXECUTABLE_SUFFIX := .exe diff --git a/core/combo/HOST_darwin-x86.mk b/core/combo/HOST_darwin-x86.mk index f6200436d..7c688da42 100644 --- a/core/combo/HOST_darwin-x86.mk +++ b/core/combo/HOST_darwin-x86.mk @@ -17,29 +17,12 @@ # Configuration for Darwin (Mac OS X) on x86. # Included by combo/select.mk -$(combo_2nd_arch_prefix)HOST_GLOBAL_CFLAGS += -m32 -$(combo_2nd_arch_prefix)HOST_GLOBAL_LDFLAGS += -m32 - -ifneq ($(strip $(BUILD_HOST_static)),) -# Statically-linked binaries are desirable for sandboxed environment -$(combo_2nd_arch_prefix)HOST_GLOBAL_LDFLAGS += -static -endif # BUILD_HOST_static - -# Workaround differences in inttypes.h between host and target. -# See bug 12708004. -$(combo_2nd_arch_prefix)HOST_GLOBAL_CFLAGS += -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS - include $(BUILD_COMBOS)/mac_version.mk define $(combo_var_prefix)transform-shared-lib-to-toc $(call _gen_toc_command_for_macho,$(1),$(2)) endef -$(combo_2nd_arch_prefix)HOST_GLOBAL_CFLAGS += -isysroot $(mac_sdk_root) -mmacosx-version-min=$(mac_sdk_version) -DMACOSX_DEPLOYMENT_TARGET=$(mac_sdk_version) -$(combo_2nd_arch_prefix)HOST_GLOBAL_LDFLAGS += -isysroot $(mac_sdk_root) -Wl,-syslibroot,$(mac_sdk_root) -mmacosx-version-min=$(mac_sdk_version) - -$(combo_2nd_arch_prefix)HOST_GLOBAL_CFLAGS += -fPIC -funwind-tables - $(combo_2nd_arch_prefix)HOST_SHLIB_SUFFIX := .dylib $(combo_2nd_arch_prefix)HOST_JNILIB_SUFFIX := .jnilib diff --git a/core/combo/HOST_darwin-x86_64.mk b/core/combo/HOST_darwin-x86_64.mk index f2d47be2b..e61933e20 100644 --- a/core/combo/HOST_darwin-x86_64.mk +++ b/core/combo/HOST_darwin-x86_64.mk @@ -17,29 +17,12 @@ # Configuration for Darwin (Mac OS X) on x86_64. # Included by combo/select.mk -HOST_GLOBAL_CFLAGS += -m64 -HOST_GLOBAL_LDFLAGS += -m64 - -ifneq ($(strip $(BUILD_HOST_static)),) -# Statically-linked binaries are desirable for sandboxed environment -HOST_GLOBAL_LDFLAGS += -static -endif # BUILD_HOST_static - -# Workaround differences in inttypes.h between host and target. -# See bug 12708004. -HOST_GLOBAL_CFLAGS += -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS - include $(BUILD_COMBOS)/mac_version.mk define $(combo_var_prefix)transform-shared-lib-to-toc $(call _gen_toc_command_for_macho,$(1),$(2)) endef -HOST_GLOBAL_CFLAGS += -isysroot $(mac_sdk_root) -mmacosx-version-min=$(mac_sdk_version) -DMACOSX_DEPLOYMENT_TARGET=$(mac_sdk_version) -HOST_GLOBAL_LDFLAGS += -isysroot $(mac_sdk_root) -Wl,-syslibroot,$(mac_sdk_root) -mmacosx-version-min=$(mac_sdk_version) - -HOST_GLOBAL_CFLAGS += -fPIC -funwind-tables - HOST_SHLIB_SUFFIX := .dylib HOST_JNILIB_SUFFIX := .jnilib diff --git a/core/combo/HOST_linux-x86.mk b/core/combo/HOST_linux-x86.mk index 2213cd34b..253bac0f4 100644 --- a/core/combo/HOST_linux-x86.mk +++ b/core/combo/HOST_linux-x86.mk @@ -24,28 +24,6 @@ endef # gcc location for clang; to be updated when clang is updated $(combo_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG := prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 -# We expect SSE3 floating point math. -$(combo_2nd_arch_prefix)HOST_GLOBAL_CFLAGS += -msse3 -mfpmath=sse -m32 -Wa,--noexecstack -march=prescott -$(combo_2nd_arch_prefix)HOST_GLOBAL_LDFLAGS += -m32 -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--no-undefined-version - -ifneq ($(strip $(BUILD_HOST_static)),) -# Statically-linked binaries are desirable for sandboxed environment -$(combo_2nd_arch_prefix)HOST_GLOBAL_LDFLAGS += -static -endif # BUILD_HOST_static - -$(combo_2nd_arch_prefix)HOST_GLOBAL_CFLAGS += -fPIC \ - -no-canonical-prefixes \ - -$(combo_2nd_arch_prefix)HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector - -# Workaround differences in inttypes.h between host and target. -# See bug 12708004. -$(combo_2nd_arch_prefix)HOST_GLOBAL_CFLAGS += -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS - -# We build a 32-bit host art, and right now that also means building *all* host libraries -# both 32- and 64-bit (whether art uses them or not --- 9d59f417767991246848c3e101cb27d2dfea5988). -$(combo_2nd_arch_prefix)HOST_GLOBAL_CFLAGS += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 - ############################################################ ## Macros after this line are shared by the 64-bit config. diff --git a/core/combo/HOST_linux-x86_64.mk b/core/combo/HOST_linux-x86_64.mk index ccd2239c4..68acaff55 100644 --- a/core/combo/HOST_linux-x86_64.mk +++ b/core/combo/HOST_linux-x86_64.mk @@ -23,20 +23,3 @@ endef # gcc location for clang; to be updated when clang is updated HOST_TOOLCHAIN_FOR_CLANG := prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 - -HOST_GLOBAL_CFLAGS += -m64 -Wa,--noexecstack -HOST_GLOBAL_LDFLAGS += -m64 -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--no-undefined-version - -ifneq ($(strip $(BUILD_HOST_static)),) -# Statically-linked binaries are desirable for sandboxed environment -HOST_GLOBAL_LDFLAGS += -static -endif # BUILD_HOST_static - -HOST_GLOBAL_CFLAGS += -fPIC \ - -no-canonical-prefixes \ - -HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector - -# Workaround differences in inttypes.h between host and target. -# See bug 12708004. -HOST_GLOBAL_CFLAGS += -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS diff --git a/core/combo/TARGET_linux-arm.mk b/core/combo/TARGET_linux-arm.mk index acd43f8db..f08e088c5 100644 --- a/core/combo/TARGET_linux-arm.mk +++ b/core/combo/TARGET_linux-arm.mk @@ -77,45 +77,6 @@ ifeq ($(FORCE_ARM_DEBUGGING),true) $(combo_2nd_arch_prefix)TARGET_thumb_CFLAGS += -marm -fno-omit-frame-pointer endif -$(combo_2nd_arch_prefix)TARGET_GLOBAL_CFLAGS += \ - -msoft-float \ - -ffunction-sections \ - -fdata-sections \ - -funwind-tables \ - -fstack-protector-strong \ - -Wa,--noexecstack \ - -Werror=format-security \ - -D_FORTIFY_SOURCE=2 \ - -fno-short-enums \ - -no-canonical-prefixes \ - -fno-canonical-system-headers \ - $(arch_variant_cflags) \ - -# The "-Wunused-but-set-variable" option often breaks projects that enable -# "-Wall -Werror" due to a commom idiom "ALOGV(mesg)" where ALOGV is turned -# into no-op in some builds while mesg is defined earlier. So we explicitly -# disable "-Wunused-but-set-variable" here. -ifneq ($(filter 4.6 4.6.% 4.7 4.7.% 4.8 4.9, $($(combo_2nd_arch_prefix)TARGET_GCC_VERSION)),) -$(combo_2nd_arch_prefix)TARGET_GLOBAL_CFLAGS += -fno-builtin-sin \ - -fno-strict-volatile-bitfields -endif - -$(combo_2nd_arch_prefix)TARGET_GLOBAL_LDFLAGS += \ - -Wl,-z,noexecstack \ - -Wl,-z,relro \ - -Wl,-z,now \ - -Wl,--build-id=md5 \ - -Wl,--warn-shared-textrel \ - -Wl,--fatal-warnings \ - -Wl,--icf=safe \ - -Wl,--hash-style=gnu \ - -Wl,--no-undefined-version \ - $(arch_variant_ldflags) - -$(combo_2nd_arch_prefix)TARGET_GLOBAL_CFLAGS += -mthumb-interwork - -$(combo_2nd_arch_prefix)TARGET_GLOBAL_CPPFLAGS += -fvisibility-inlines-hidden - # More flags/options can be added here $(combo_2nd_arch_prefix)TARGET_RELEASE_CFLAGS := \ -DNDEBUG \ diff --git a/core/combo/TARGET_linux-arm64.mk b/core/combo/TARGET_linux-arm64.mk index fdb1da715..b07ea2366 100644 --- a/core/combo/TARGET_linux-arm64.mk +++ b/core/combo/TARGET_linux-arm64.mk @@ -52,50 +52,6 @@ define $(combo_var_prefix)transform-shared-lib-to-toc $(call _gen_toc_command_for_elf,$(1),$(2)) endef -TARGET_GLOBAL_CFLAGS += \ - -fno-strict-aliasing \ - -TARGET_GLOBAL_CFLAGS += \ - -fstack-protector-strong \ - -ffunction-sections \ - -fdata-sections \ - -funwind-tables \ - -Wa,--noexecstack \ - -Werror=format-security \ - -D_FORTIFY_SOURCE=2 \ - -fno-short-enums \ - -no-canonical-prefixes \ - -fno-canonical-system-headers \ - $(arch_variant_cflags) \ - -# Help catch common 32/64-bit errors. -TARGET_GLOBAL_CFLAGS += \ - -Werror=pointer-to-int-cast \ - -Werror=int-to-pointer-cast \ - -Werror=implicit-function-declaration \ - -TARGET_GLOBAL_CFLAGS += -fno-strict-volatile-bitfields - -TARGET_GLOBAL_LDFLAGS += \ - -Wl,-z,noexecstack \ - -Wl,-z,relro \ - -Wl,-z,now \ - -Wl,--build-id=md5 \ - -Wl,--warn-shared-textrel \ - -Wl,--fatal-warnings \ - -Wl,-maarch64linux \ - -Wl,--hash-style=gnu \ - -Wl,--fix-cortex-a53-843419 \ - -fuse-ld=gold \ - -Wl,--icf=safe \ - -Wl,--no-undefined-version \ - $(arch_variant_ldflags) - -# Disable transitive dependency library symbol resolving. -TARGET_GLOBAL_LDFLAGS += -Wl,--allow-shlib-undefined - -TARGET_GLOBAL_CPPFLAGS += -fvisibility-inlines-hidden - # More flags/options can be added here TARGET_RELEASE_CFLAGS := \ -DNDEBUG \ diff --git a/core/combo/TARGET_linux-mips.mk b/core/combo/TARGET_linux-mips.mk index 0a9e42c9c..4d876a61a 100644 --- a/core/combo/TARGET_linux-mips.mk +++ b/core/combo/TARGET_linux-mips.mk @@ -64,39 +64,6 @@ ifeq ($(FORCE_MIPS_DEBUGGING),true) TARGET_mips_CFLAGS += -fno-omit-frame-pointer endif -$(combo_2nd_arch_prefix)TARGET_GLOBAL_CFLAGS += \ - $(TARGET_mips_CFLAGS) \ - -U__unix -U__unix__ -Umips \ - -ffunction-sections \ - -fdata-sections \ - -funwind-tables \ - -fstack-protector-strong \ - -Wa,--noexecstack \ - -Werror=format-security \ - -D_FORTIFY_SOURCE=2 \ - -no-canonical-prefixes \ - -fno-canonical-system-headers \ - $(arch_variant_cflags) \ - -ifneq ($(ARCH_MIPS_PAGE_SHIFT),) -$(combo_2nd_arch_prefix)TARGET_GLOBAL_CFLAGS += -DPAGE_SHIFT=$(ARCH_MIPS_PAGE_SHIFT) -endif - -$(combo_2nd_arch_prefix)TARGET_GLOBAL_LDFLAGS += \ - -Wl,-z,noexecstack \ - -Wl,-z,relro \ - -Wl,-z,now \ - -Wl,--build-id=md5 \ - -Wl,--warn-shared-textrel \ - -Wl,--fatal-warnings \ - -Wl,--no-undefined-version \ - $(arch_variant_ldflags) - -# Disable transitive dependency library symbol resolving. -$(combo_2nd_arch_prefix)TARGET_GLOBAL_LDFLAGS += -Wl,--allow-shlib-undefined - -$(combo_2nd_arch_prefix)TARGET_GLOBAL_CPPFLAGS += -fvisibility-inlines-hidden - # More flags/options can be added here $(combo_2nd_arch_prefix)TARGET_RELEASE_CFLAGS := \ -DNDEBUG \ diff --git a/core/combo/TARGET_linux-mips64.mk b/core/combo/TARGET_linux-mips64.mk index 91b005724..4d77d971f 100644 --- a/core/combo/TARGET_linux-mips64.mk +++ b/core/combo/TARGET_linux-mips64.mk @@ -64,45 +64,6 @@ ifeq ($(FORCE_MIPS_DEBUGGING),true) TARGET_mips_CFLAGS += -fno-omit-frame-pointer endif -TARGET_GLOBAL_CFLAGS += \ - $(TARGET_mips_CFLAGS) \ - -U__unix -U__unix__ -Umips \ - -ffunction-sections \ - -fdata-sections \ - -funwind-tables \ - -fstack-protector-strong \ - -Wa,--noexecstack \ - -Werror=format-security \ - -D_FORTIFY_SOURCE=2 \ - -no-canonical-prefixes \ - -fno-canonical-system-headers \ - $(arch_variant_cflags) \ - -# Help catch common 32/64-bit errors. -TARGET_GLOBAL_CFLAGS += \ - -Werror=pointer-to-int-cast \ - -Werror=int-to-pointer-cast \ - -Werror=implicit-function-declaration \ - -ifneq ($(ARCH_MIPS_PAGE_SHIFT),) -TARGET_GLOBAL_CFLAGS += -DPAGE_SHIFT=$(ARCH_MIPS_PAGE_SHIFT) -endif - -TARGET_GLOBAL_LDFLAGS += \ - -Wl,-z,noexecstack \ - -Wl,-z,relro \ - -Wl,-z,now \ - -Wl,--build-id=md5 \ - -Wl,--warn-shared-textrel \ - -Wl,--fatal-warnings \ - -Wl,--no-undefined-version \ - $(arch_variant_ldflags) - -# Disable transitive dependency library symbol resolving. -TARGET_GLOBAL_LDFLAGS += -Wl,--allow-shlib-undefined - -TARGET_GLOBAL_CPPFLAGS += -fvisibility-inlines-hidden - # More flags/options can be added here TARGET_RELEASE_CFLAGS := \ -DNDEBUG \ diff --git a/core/combo/TARGET_linux-x86.mk b/core/combo/TARGET_linux-x86.mk index e8cd92db0..d1d6a319d 100644 --- a/core/combo/TARGET_linux-x86.mk +++ b/core/combo/TARGET_linux-x86.mk @@ -52,56 +52,6 @@ KERNEL_HEADERS_COMMON += $(libc_root)/kernel/common KERNEL_HEADERS_ARCH := $(libc_root)/kernel/uapi/asm-x86 # x86 covers both x86 and x86_64. KERNEL_HEADERS := $(KERNEL_HEADERS_COMMON) $(KERNEL_HEADERS_ARCH) -$(combo_2nd_arch_prefix)TARGET_GLOBAL_CFLAGS += \ - -O2 \ - -Wa,--noexecstack \ - -Werror=format-security \ - -D_FORTIFY_SOURCE=2 \ - -Wstrict-aliasing=2 \ - -ffunction-sections \ - -finline-functions \ - -finline-limit=300 \ - -fno-short-enums \ - -fstrict-aliasing \ - -funswitch-loops \ - -funwind-tables \ - -fstack-protector-strong \ - -m32 \ - -no-canonical-prefixes \ - -fno-canonical-system-headers \ - -$(combo_2nd_arch_prefix)TARGET_GLOBAL_CFLAGS += $(arch_variant_cflags) - -ifeq ($(ARCH_X86_HAVE_SSSE3),true) # yes, really SSSE3, not SSE3! - $(combo_2nd_arch_prefix)TARGET_GLOBAL_CFLAGS += -DUSE_SSSE3 -mssse3 -endif -ifeq ($(ARCH_X86_HAVE_SSE4),true) - $(combo_2nd_arch_prefix)TARGET_GLOBAL_CFLAGS += -msse4 -endif -ifeq ($(ARCH_X86_HAVE_SSE4_1),true) - $(combo_2nd_arch_prefix)TARGET_GLOBAL_CFLAGS += -msse4.1 -endif -ifeq ($(ARCH_X86_HAVE_SSE4_2),true) - $(combo_2nd_arch_prefix)TARGET_GLOBAL_CFLAGS += -msse4.2 -endif -ifeq ($(ARCH_X86_HAVE_AVX),true) - $(combo_2nd_arch_prefix)TARGET_GLOBAL_CFLAGS += -mavx -endif -ifeq ($(ARCH_X86_HAVE_AES_NI),true) - $(combo_2nd_arch_prefix)TARGET_GLOBAL_CFLAGS += -maes -endif - -$(combo_2nd_arch_prefix)TARGET_GLOBAL_LDFLAGS += -m32 - -$(combo_2nd_arch_prefix)TARGET_GLOBAL_LDFLAGS += -Wl,-z,noexecstack -$(combo_2nd_arch_prefix)TARGET_GLOBAL_LDFLAGS += -Wl,-z,relro -Wl,-z,now -$(combo_2nd_arch_prefix)TARGET_GLOBAL_LDFLAGS += -Wl,--build-id=md5 -$(combo_2nd_arch_prefix)TARGET_GLOBAL_LDFLAGS += -Wl,--warn-shared-textrel -$(combo_2nd_arch_prefix)TARGET_GLOBAL_LDFLAGS += -Wl,--fatal-warnings -$(combo_2nd_arch_prefix)TARGET_GLOBAL_LDFLAGS += -Wl,--gc-sections -$(combo_2nd_arch_prefix)TARGET_GLOBAL_LDFLAGS += -Wl,--hash-style=gnu -$(combo_2nd_arch_prefix)TARGET_GLOBAL_LDFLAGS += -Wl,--no-undefined-version - $(combo_2nd_arch_prefix)TARGET_C_INCLUDES := \ $(libc_root)/arch-x86/include \ $(libc_root)/include \ diff --git a/core/combo/TARGET_linux-x86_64.mk b/core/combo/TARGET_linux-x86_64.mk index 8b2a37f1c..350ad4839 100644 --- a/core/combo/TARGET_linux-x86_64.mk +++ b/core/combo/TARGET_linux-x86_64.mk @@ -52,65 +52,6 @@ KERNEL_HEADERS_COMMON += $(libc_root)/kernel/common KERNEL_HEADERS_ARCH := $(libc_root)/kernel/uapi/asm-x86 # x86 covers both x86 and x86_64. KERNEL_HEADERS := $(KERNEL_HEADERS_COMMON) $(KERNEL_HEADERS_ARCH) -TARGET_GLOBAL_CFLAGS += \ - -O2 \ - -Wa,--noexecstack \ - -Werror=format-security \ - -D_FORTIFY_SOURCE=2 \ - -Wstrict-aliasing=2 \ - -ffunction-sections \ - -finline-functions \ - -finline-limit=300 \ - -fno-short-enums \ - -fstrict-aliasing \ - -funswitch-loops \ - -funwind-tables \ - -fstack-protector-strong \ - -m64 \ - -no-canonical-prefixes \ - -fno-canonical-system-headers - -# Help catch common 32/64-bit errors. -TARGET_GLOBAL_CFLAGS += \ - -Werror=pointer-to-int-cast \ - -Werror=int-to-pointer-cast \ - -Werror=implicit-function-declaration \ - -TARGET_GLOBAL_CFLAGS += $(arch_variant_cflags) - -ifeq ($(ARCH_X86_HAVE_SSSE3),true) # yes, really SSSE3, not SSE3! - TARGET_GLOBAL_CFLAGS += -DUSE_SSSE3 -mssse3 -endif -ifeq ($(ARCH_X86_HAVE_SSE4),true) - TARGET_GLOBAL_CFLAGS += -msse4 -endif -ifeq ($(ARCH_X86_HAVE_SSE4_1),true) - TARGET_GLOBAL_CFLAGS += -msse4.1 -endif -ifeq ($(ARCH_X86_HAVE_SSE4_2),true) - TARGET_GLOBAL_CFLAGS += -msse4.2 -endif -ifeq ($(ARCH_X86_HAVE_POPCNT),true) - TARGET_GLOBAL_CFLAGS += -mpopcnt -endif -ifeq ($(ARCH_X86_HAVE_AVX),true) - TARGET_GLOBAL_CFLAGS += -mavx -endif -ifeq ($(ARCH_X86_HAVE_AES_NI),true) - TARGET_GLOBAL_CFLAGS += -maes -endif - -TARGET_GLOBAL_LDFLAGS += -m64 - -TARGET_GLOBAL_LDFLAGS += -Wl,-z,noexecstack -TARGET_GLOBAL_LDFLAGS += -Wl,-z,relro -Wl,-z,now -TARGET_GLOBAL_LDFLAGS += -Wl,--build-id=md5 -TARGET_GLOBAL_LDFLAGS += -Wl,--warn-shared-textrel -TARGET_GLOBAL_LDFLAGS += -Wl,--fatal-warnings -TARGET_GLOBAL_LDFLAGS += -Wl,--gc-sections -TARGET_GLOBAL_LDFLAGS += -Wl,--hash-style=gnu -TARGET_GLOBAL_LDFLAGS += -Wl,--no-undefined-version - TARGET_C_INCLUDES := \ $(libc_root)/arch-x86_64/include \ $(libc_root)/include \ diff --git a/core/combo/select.mk b/core/combo/select.mk index 54ea2dacd..7e182aedd 100644 --- a/core/combo/select.mk +++ b/core/combo/select.mk @@ -28,10 +28,7 @@ combo_var_prefix := $(combo_2nd_arch_prefix)$(combo_target) # Set reasonable defaults for the various variables -$(combo_var_prefix)GLOBAL_CFLAGS := -fno-exceptions -Wno-multichar $(combo_var_prefix)RELEASE_CFLAGS := -O2 -g -fno-strict-aliasing -$(combo_var_prefix)GLOBAL_CPPFLAGS := -$(combo_var_prefix)GLOBAL_LDFLAGS := $(combo_var_prefix)GLOBAL_ARFLAGS := crsPD $(combo_var_prefix)GLOBAL_LD_DIRS := diff --git a/core/config.mk b/core/config.mk index 894af20dc..afa23cf49 100644 --- a/core/config.mk +++ b/core/config.mk @@ -713,16 +713,12 @@ ifeq ($(OVERRIDE_C_DATE_TIME),true) COMMON_GLOBAL_CFLAGS += -Wno-builtin-macro-redefined -D__DATE__="\"$(BUILD_DATETIME_C_DATE)\"" -D__TIME__=\"$(BUILD_DATETIME_C_TIME)\" endif -HOST_GLOBAL_CFLAGS += $(COMMON_GLOBAL_CFLAGS) HOST_RELEASE_CFLAGS += $(COMMON_RELEASE_CFLAGS) -HOST_GLOBAL_CPPFLAGS += $(COMMON_GLOBAL_CPPFLAGS) HOST_RELEASE_CPPFLAGS += $(COMMON_RELEASE_CPPFLAGS) -TARGET_GLOBAL_CFLAGS += $(COMMON_GLOBAL_CFLAGS) TARGET_RELEASE_CFLAGS += $(COMMON_RELEASE_CFLAGS) -TARGET_GLOBAL_CPPFLAGS += $(COMMON_GLOBAL_CPPFLAGS) TARGET_RELEASE_CPPFLAGS += $(COMMON_RELEASE_CPPFLAGS) HOST_GLOBAL_LD_DIRS += -L$(HOST_OUT_INTERMEDIATE_LIBRARIES) @@ -733,71 +729,31 @@ TARGET_PROJECT_INCLUDES:= $(SRC_HEADERS) $(TARGET_OUT_HEADERS) \ $(TARGET_DEVICE_KERNEL_HEADERS) $(TARGET_BOARD_KERNEL_HEADERS) \ $(TARGET_PRODUCT_KERNEL_HEADERS) -# Many host compilers don't support these flags, so we have to make -# sure to only specify them for the target compilers checked in to -# the source tree. -TARGET_GLOBAL_CFLAGS += $(TARGET_ERROR_FLAGS) - -HOST_GLOBAL_CFLAGS += $(HOST_RELEASE_CFLAGS) -HOST_GLOBAL_CPPFLAGS += $(HOST_RELEASE_CPPFLAGS) - -TARGET_GLOBAL_CFLAGS += $(TARGET_RELEASE_CFLAGS) -TARGET_GLOBAL_CPPFLAGS += $(TARGET_RELEASE_CPPFLAGS) - ifdef TARGET_2ND_ARCH -$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_GLOBAL_CFLAGS += $(COMMON_GLOBAL_CFLAGS) $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_RELEASE_CFLAGS += $(COMMON_RELEASE_CFLAGS) -$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_GLOBAL_CPPFLAGS += $(COMMON_GLOBAL_CPPFLAGS) $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_RELEASE_CPPFLAGS += $(COMMON_RELEASE_CPPFLAGS) $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_GLOBAL_LD_DIRS += -L$($(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_INTERMEDIATE_LIBRARIES) $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_PROJECT_INCLUDES := $(TARGET_PROJECT_INCLUDES) -$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_GLOBAL_CFLAGS += $(TARGET_ERROR_FLAGS) -$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_GLOBAL_CFLAGS += $($(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_RELEASE_CFLAGS) -$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_GLOBAL_CPPFLAGS += $($(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_RELEASE_CPPFLAGS) endif ifdef HOST_2ND_ARCH -$(HOST_2ND_ARCH_VAR_PREFIX)HOST_GLOBAL_CFLAGS += $(COMMON_GLOBAL_CFLAGS) $(HOST_2ND_ARCH_VAR_PREFIX)HOST_RELEASE_CFLAGS += $(COMMON_RELEASE_CFLAGS) -$(HOST_2ND_ARCH_VAR_PREFIX)HOST_GLOBAL_CPPFLAGS += $(COMMON_GLOBAL_CPPFLAGS) $(HOST_2ND_ARCH_VAR_PREFIX)HOST_RELEASE_CPPFLAGS += $(COMMON_RELEASE_CPPFLAGS) $(HOST_2ND_ARCH_VAR_PREFIX)HOST_GLOBAL_LD_DIRS += -L$($(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_INTERMEDIATE_LIBRARIES) $(HOST_2ND_ARCH_VAR_PREFIX)HOST_PROJECT_INCLUDES := $(HOST_PROJECT_INCLUDES) -$(HOST_2ND_ARCH_VAR_PREFIX)HOST_GLOBAL_CFLAGS += $($(HOST_2ND_ARCH_VAR_PREFIX)HOST_RELEASE_CFLAGS) -$(HOST_2ND_ARCH_VAR_PREFIX)HOST_GLOBAL_CPPFLAGS += $($(HOST_2ND_ARCH_VAR_PREFIX)HOST_RELEASE_CPPFLAGS) endif ifdef HOST_CROSS_OS -HOST_CROSS_GLOBAL_CFLAGS += $(filter-out $(HOST_CROSS_UNKNOWN_CFLAGS),$(COMMON_GLOBAL_CFLAGS)) HOST_CROSS_RELEASE_CFLAGS += $(COMMON_RELEASE_CFLAGS) -HOST_CROSS_GLOBAL_CPPFLAGS += $(COMMON_GLOBAL_CPPFLAGS) HOST_CROSS_RELEASE_CPPFLAGS += $(COMMON_RELEASE_CPPFLAGS) HOST_CROSS_GLOBAL_LD_DIRS += -L$(HOST_CROSS_OUT_INTERMEDIATE_LIBRARIES) HOST_CROSS_PROJECT_INCLUDES:= $(SRC_HEADERS) $(HOST_CROSS_OUT_HEADERS) -HOST_CROSS_GLOBAL_CFLAGS += $(HOST_CROSS_RELEASE_CFLAGS) -HOST_CROSS_GLOBAL_CPPFLAGS += $(HOST_CROSS_RELEASE_CPPFLAGS) ifdef HOST_CROSS_2ND_ARCH -$(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_GLOBAL_CFLAGS += $(filter-out $($(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_UNKNOWN_CFLAGS),$(COMMON_GLOBAL_CFLAGS)) $(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_RELEASE_CFLAGS += $(COMMON_RELEASE_CFLAGS) -$(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_GLOBAL_CPPFLAGS += $(COMMON_GLOBAL_CPPFLAGS) $(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_RELEASE_CPPFLAGS += $(COMMON_RELEASE_CPPFLAGS) $(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_GLOBAL_LD_DIRS += -L$($(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_OUT_INTERMEDIATE_LIBRARIES) $(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_PROJECT_INCLUDES:= $(SRC_HEADERS) $($(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_OUT_HEADERS) -$(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_GLOBAL_CFLAGS += $($(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_RELEASE_CFLAGS) -$(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_GLOBAL_CPPFLAGS += $($(HOST_CROSS_2ND_ARCH_VAR_PREFIX)HOST_CROSS_RELEASE_CPPFLAGS) -endif -endif - -ifdef BRILLO -# Add a C define that identifies Brillo targets. __BRILLO__ should only be used -# to differentiate between Brillo and non-Brillo-but-Android environments. Use -# __ANDROID__ instead to test if something is being built in an Android-derived -# environment (including Brillo) as opposed to an entirely different -# environment (e.g. Chrome OS). -TARGET_GLOBAL_CFLAGS += -D__BRILLO__ -ifdef TARGET_2ND_ARCH -$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_GLOBAL_CFLAGS += -D__BRILLO__ endif endif