OSDN Git Service

am db4113fd: am d58df2de: Merge "Re-tighten default compiler options."
authorBen Cheng <bccheng@google.com>
Wed, 28 Aug 2013 18:32:25 +0000 (11:32 -0700)
committerAndroid Git Automerger <android-git-automerger@android.com>
Wed, 28 Aug 2013 18:32:25 +0000 (11:32 -0700)
* commit 'db4113fdcce77872cc4657d74ac4136b356de928':
  Re-tighten default compiler options.

1  2 
core/combo/TARGET_linux-arm.mk

@@@ -105,18 -103,19 +105,17 @@@ TARGET_GLOBAL_CFLAGS += 
                        -Werror=format-security \
                        -D_FORTIFY_SOURCE=2 \
                        -fno-short-enums \
 -                      $(arch_variant_cflags)
 -
 -android_config_h := $(call select-android-config-h,linux-arm)
 -TARGET_ANDROID_CONFIG_CFLAGS := -include $(android_config_h) -I $(dir $(android_config_h))
 -TARGET_GLOBAL_CFLAGS += $(TARGET_ANDROID_CONFIG_CFLAGS)
 +                      $(arch_variant_cflags) \
 +                      -include $(android_config_h) \
 +                      -I $(dir $(android_config_h))
  
- # This warning causes dalvik not to build with gcc 4.6+ and -Werror.
- # 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.
+ # 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, $(TARGET_GCC_VERSION)),)
  TARGET_GLOBAL_CFLAGS += -Wno-unused-but-set-variable -fno-builtin-sin \
-                       -fno-strict-volatile-bitfields \
-                       -Wno-unused-parameter -Wno-unused-but-set-parameter
+                       -fno-strict-volatile-bitfields
  endif
  
  # This is to avoid the dreaded warning compiler message: