From 26c78057816654eb7da7df343a934981b4327e19 Mon Sep 17 00:00:00 2001 From: Andrew Hsieh Date: Tue, 28 Aug 2012 10:49:05 +0800 Subject: [PATCH] Add pattern to check for GCC 4.6 GCC 4.6 --version can return 4.6.x-google but also simply 4.6 as of https://android-review.googlesource.com/#/c/42028. Add more pattern to detect it. Change-Id: Ibf34fba9afdf01bd3eafc011cc4d059b59f25d3d --- core/combo/TARGET_linux-arm.mk | 2 +- core/combo/TARGET_linux-mips.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/combo/TARGET_linux-arm.mk b/core/combo/TARGET_linux-arm.mk index cd36197bd..75b2742f3 100644 --- a/core/combo/TARGET_linux-arm.mk +++ b/core/combo/TARGET_linux-arm.mk @@ -118,7 +118,7 @@ TARGET_GLOBAL_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.%, $(shell $(TARGET_CC) --version)),) +ifneq ($(filter 4.6 4.6.%, $(shell $(TARGET_CC) --version)),) TARGET_GLOBAL_CFLAGS += -Wno-unused-but-set-variable -fno-builtin-sin \ -fno-strict-volatile-bitfields endif diff --git a/core/combo/TARGET_linux-mips.mk b/core/combo/TARGET_linux-mips.mk index a3a891e7e..0a7e20fad 100644 --- a/core/combo/TARGET_linux-mips.mk +++ b/core/combo/TARGET_linux-mips.mk @@ -96,7 +96,7 @@ TARGET_GLOBAL_CFLAGS += \ # This warning causes dalvik not to build with gcc 4.6.x and -Werror. # We cannot turn it off blindly since the option is not available # in gcc-4.4.x. -ifneq ($(filter 4.6.%, $(shell $(TARGET_CC) --version)),) +ifneq ($(filter 4.6 4.6.%, $(shell $(TARGET_CC) --version)),) TARGET_GLOBAL_CFLAGS += -Wno-unused-but-set-variable \ -fno-strict-volatile-bitfields endif