diff options
author | Ben Cheng <bccheng@google.com> | 2013-08-13 14:38:15 -0700 |
---|---|---|
committer | Ben Cheng <bccheng@google.com> | 2013-08-13 14:52:31 -0700 |
commit | aac3f81657b9111b3680c370083c01879612c443 (patch) | |
tree | b12b911396c23dc6df156bbc34556aaec62af17f | |
parent | 2863fa7a9650fa6df38da61329e2f49d5233c3df (diff) | |
download | build-aac3f81657b9111b3680c370083c01879612c443.tar.gz |
Prepare upcoming GCC 4.8 release.
o Add -Wno-unused-parameter -Wno-unused-but-set-parameter to suppress
new warnings.
o Define GCC_COLORS to enable colorful diagnostic messages.
Change-Id: Icbd62300b0e6f39d4e514edec2431a06b4d72421
(cherry picked from internal commit ccd8e6082b5b1e519a75068fa6c887a1a85b53c4)
-rw-r--r-- | core/combo/TARGET_linux-arm.mk | 5 | ||||
-rw-r--r-- | core/llvm_config.mk | 4 | ||||
-rw-r--r-- | envsetup.sh | 2 |
3 files changed, 8 insertions, 3 deletions
diff --git a/core/combo/TARGET_linux-arm.mk b/core/combo/TARGET_linux-arm.mk index 5319868581..c31fe59385 100644 --- a/core/combo/TARGET_linux-arm.mk +++ b/core/combo/TARGET_linux-arm.mk @@ -113,9 +113,10 @@ TARGET_GLOBAL_CFLAGS += $(TARGET_ANDROID_CONFIG_CFLAGS) # We cannot turn it off blindly since the option is not available # in gcc-4.4.x. We also want to disable sincos optimization globally # by turning off the builtin sin function. -ifneq ($(filter 4.6 4.6.% 4.7 4.7.%, $(TARGET_GCC_VERSION)),) +ifneq ($(filter 4.6 4.6.% 4.7 4.7.% 4.8, $(TARGET_GCC_VERSION)),) TARGET_GLOBAL_CFLAGS += -Wno-unused-but-set-variable -fno-builtin-sin \ - -fno-strict-volatile-bitfields + -fno-strict-volatile-bitfields \ + -Wno-unused-parameter -Wno-unused-but-set-parameter endif # This is to avoid the dreaded warning compiler message: diff --git a/core/llvm_config.mk b/core/llvm_config.mk index 18e689e8ce..0fe9f93889 100644 --- a/core/llvm_config.mk +++ b/core/llvm_config.mk @@ -97,9 +97,11 @@ TARGET_thumb_CLANG_CFLAGS += $(filter-out $(CLANG_CONFIG_UNKNOWN_CFLAGS),$(TARGE $(call clang-flags-subst,-march=armv5te,-march=armv5t) $(call clang-flags-subst,-march=armv5e,-march=armv5) -# clang does not support -Wno-psabi and -Wno-unused-but-set-variable +# clang does not support -Wno-psabi, -Wno-unused-but-set-variable, and +# -Wno-unused-but-set-parameter $(call clang-flags-subst,-Wno-psabi,) $(call clang-flags-subst,-Wno-unused-but-set-variable,) +$(call clang-flags-subst,-Wno-unused-but-set-parameter,) # clang does not support -mcpu=cortex-a15 yet - fall back to armv7-a for now $(call clang-flags-subst,-mcpu=cortex-a15,-march=armv7-a) diff --git a/envsetup.sh b/envsetup.sh index d64bd29c1a..3639db97f6 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -205,6 +205,8 @@ function set_stuff_for_environment() set_sequence_number export ANDROID_BUILD_TOP=$(gettop) + # With this environment variable new GCC can apply colors to warnings/errors + export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' } function set_sequence_number() |