diff options
author | Ying Wang <wangying@google.com> | 2013-02-13 15:46:25 -0800 |
---|---|---|
committer | Ying Wang <wangying@google.com> | 2013-02-13 16:05:12 -0800 |
commit | d93b236e4e3e6a8edb912507b9d66e5fad46f07f (patch) | |
tree | a90301ff61684a4af1bf94f2a05d697777f7beef | |
parent | acd93c7f6df7cd70d12622bf9fdb4af5d8f0eb24 (diff) | |
download | build-gingerbread.tar.gz |
[DO NOT MERGE] filter -Werror if host gcc version doesn't matchgingerbread
Change-Id: I180bb48b1c64888f8c01881acffde8e22cbdee9a
-rw-r--r-- | core/binary.mk | 7 | ||||
-rw-r--r-- | core/combo/HOST_linux-x86.mk | 3 |
2 files changed, 10 insertions, 0 deletions
diff --git a/core/binary.mk b/core/binary.mk index 51207063e0..f6c4dc49be 100644 --- a/core/binary.mk +++ b/core/binary.mk @@ -477,6 +477,13 @@ installed_static_library_notice_file_targets := \ $(foreach lib,$(LOCAL_STATIC_LIBRARIES) $(LOCAL_WHOLE_STATIC_LIBRARIES), \ NOTICE-$(if $(LOCAL_IS_HOST_MODULE),HOST,TARGET)-STATIC_LIBRARIES-$(lib)) +# filter out -Werror if the host gcc doesn't have the expected version +ifdef LOCAL_IS_HOST_MODULE +ifndef IS_EXPECTED_HOST_GCC +LOCAL_CFLAGS := $(filter-out -Werror, $(LOCAL_CFLAGS)) +endif +endif + ########################################################### # Rule-specific variable definitions ########################################################### diff --git a/core/combo/HOST_linux-x86.mk b/core/combo/HOST_linux-x86.mk index c871613fe0..445c12f4e0 100644 --- a/core/combo/HOST_linux-x86.mk +++ b/core/combo/HOST_linux-x86.mk @@ -42,6 +42,9 @@ HOST_AR := $(HOST_SDK_TOOLCHAIN_PREFIX)-ar endif # $(HOST_SDK_TOOLCHAIN_PREFIX)-gcc exists endif # TARGET_PRODUCT == sdk +# Does the build machine have the expected gcc version? +IS_EXPECTED_HOST_GCC := $(filter 4.4.%, $(shell $(HOST_CC) --version)) + # We build everything in 32-bit, because some host tools are # 32-bit-only anyway (emulator, acc), and because it gives us # more consistency between the host tools and the target. |