summaryrefslogtreecommitdiffstats
path: root/core/combo
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2015-05-01 14:53:59 -0700
committerChih-hung Hsieh <chh@google.com>2015-05-06 00:24:18 +0000
commit0ba68bafa3b465110d10da1a57a1843ff91b2f3a (patch)
tree5b15e52aa9d1bca6543893d58e0c691c84299bf7 /core/combo
parent4f5d0e60b441f009f78ef6595172ffa11dd69a2d (diff)
downloadbuild-0ba68bafa3b465110d10da1a57a1843ff91b2f3a.zip
build-0ba68bafa3b465110d10da1a57a1843ff91b2f3a.tar.gz
build-0ba68bafa3b465110d10da1a57a1843ff91b2f3a.tar.bz2
Upgrade x86 gcc to 4.9 and disable devirtualization.
Also filter out gcc-only flags -Wno-clobbered and -fno-devirtualize when compiled with clang/llvm. BUG: 19872411 Change-Id: I6de57583be04da607f569df65e93531787dbb789 (cherry picked from AOSP commit 90036610ddfe0455553a1b46bb8adbeafde0cac1)
Diffstat (limited to 'core/combo')
-rw-r--r--core/combo/TARGET_linux-x86.mk8
-rw-r--r--core/combo/TARGET_linux-x86_64.mk6
2 files changed, 11 insertions, 3 deletions
diff --git a/core/combo/TARGET_linux-x86.mk b/core/combo/TARGET_linux-x86.mk
index ed78372..958885c 100644
--- a/core/combo/TARGET_linux-x86.mk
+++ b/core/combo/TARGET_linux-x86.mk
@@ -23,10 +23,10 @@ TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT := x86
endif
# Decouple NDK library selection with platform compiler version
-$(combo_2nd_arch_prefix)TARGET_NDK_GCC_VERSION := 4.8
+$(combo_2nd_arch_prefix)TARGET_NDK_GCC_VERSION := 4.9
ifeq ($(strip $(TARGET_GCC_VERSION_EXP)),)
-$(combo_2nd_arch_prefix)TARGET_GCC_VERSION := 4.8
+$(combo_2nd_arch_prefix)TARGET_GCC_VERSION := 4.9
else
$(combo_2nd_arch_prefix)TARGET_GCC_VERSION := $(TARGET_GCC_VERSION_EXP)
endif
@@ -97,6 +97,10 @@ $(combo_2nd_arch_prefix)TARGET_GLOBAL_CFLAGS += \
-include $(android_config_h) \
-I $(dir $(android_config_h))
+# Work around gcc 4.9 devirtualization bug, https://b.corp.google.com/19872411.
+$(combo_2nd_arch_prefix)TARGET_GLOBAL_CFLAGS += \
+ -fno-devirtualize \
+
$(combo_2nd_arch_prefix)TARGET_GLOBAL_CFLAGS += $(arch_variant_cflags)
ifeq ($(ARCH_X86_HAVE_SSSE3),true) # yes, really SSSE3, not SSE3!
diff --git a/core/combo/TARGET_linux-x86_64.mk b/core/combo/TARGET_linux-x86_64.mk
index 0b2905c..adc690a 100644
--- a/core/combo/TARGET_linux-x86_64.mk
+++ b/core/combo/TARGET_linux-x86_64.mk
@@ -26,7 +26,7 @@ endif
TARGET_NDK_GCC_VERSION := 4.9
ifeq ($(strip $(TARGET_GCC_VERSION_EXP)),)
-TARGET_GCC_VERSION := 4.8
+TARGET_GCC_VERSION := 4.9
else
TARGET_GCC_VERSION := $(TARGET_GCC_VERSION_EXP)
endif
@@ -93,6 +93,10 @@ TARGET_GLOBAL_CFLAGS += \
-no-canonical-prefixes \
-fno-canonical-system-headers
+# Work around gcc 4.9 devirtualization bug, https://b.corp.google.com/19872411.
+TARGET_GLOBAL_CFLAGS += \
+ -fno-devirtualize \
+
# Help catch common 32/64-bit errors.
TARGET_GLOBAL_CFLAGS += \
-Werror=pointer-to-int-cast \