summaryrefslogtreecommitdiffstats
path: root/core/combo/TARGET_linux-x86.mk
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2013-09-19 10:15:38 -0700
committerYing Wang <wangying@google.com>2013-09-19 10:15:38 -0700
commit4a712bfb6f2e93287bacc348c8513d9b0da7cfcc (patch)
tree257daacd079eb58439f0ba714bee0c1b81f40ff0 /core/combo/TARGET_linux-x86.mk
parente77e93c6586389a9c070795ce97935ef205d87f1 (diff)
parent70190a2b0267dd9b32fbcc891459dffa5e4c718d (diff)
downloadbuild-4a712bfb6f2e93287bacc348c8513d9b0da7cfcc.zip
build-4a712bfb6f2e93287bacc348c8513d9b0da7cfcc.tar.gz
build-4a712bfb6f2e93287bacc348c8513d9b0da7cfcc.tar.bz2
resolved conflicts for merge of 70190a2b to klp-dev-plus-aosp
Change-Id: I9abcb4e258ad95912860dcae2973c4e417b05369
Diffstat (limited to 'core/combo/TARGET_linux-x86.mk')
-rw-r--r--core/combo/TARGET_linux-x86.mk41
1 files changed, 28 insertions, 13 deletions
diff --git a/core/combo/TARGET_linux-x86.mk b/core/combo/TARGET_linux-x86.mk
index 2fb45d9..5f9e46b 100644
--- a/core/combo/TARGET_linux-x86.mk
+++ b/core/combo/TARGET_linux-x86.mk
@@ -134,6 +134,7 @@ TARGET_GLOBAL_CFLAGS += \
-funswitch-loops \
-funwind-tables \
-fstack-protector \
+ -m32 \
-include $(android_config_h) \
-I $(dir $(android_config_h))
@@ -141,23 +142,37 @@ TARGET_GLOBAL_CFLAGS += \
TARGET_GLOBAL_CPPFLAGS += \
-fno-use-cxa-atexit
-# XXX: Our toolchain is normally configured to always set these flags by default
-# however, there have been reports that this is sometimes not the case. So make
-# them explicit here unless we have the time to carefully check it
-#
-TARGET_GLOBAL_CFLAGS += -mstackrealign -msse3 -mfpmath=sse -m32
+TARGET_GLOBAL_CFLAGS += $(arch_variant_cflags)
-# XXX: These flags should not be defined here anymore. Instead, the Android.mk
-# of the modules that depend on these features should instead check the
-# corresponding macros (e.g. ARCH_X86_HAVE_SSE2 and ARCH_X86_HAVE_SSSE3)
-# Keep them here until this is all cleared up.
-#
+ifeq ($(ARCH_X86_HAVE_MMX),true)
+ TARGET_GLOBAL_CFLAGS += -DUSE_MMX -mmmx
+endif
+ifeq ($(ARCH_X86_HAVE_SSE),true)
+ TARGET_GLOBAL_CFLAGS += -DUSE_SSE -msse
+endif
ifeq ($(ARCH_X86_HAVE_SSE2),true)
-TARGET_GLOBAL_CFLAGS += -DUSE_SSE2
+ TARGET_GLOBAL_CFLAGS += -DUSE_SSE2 -msse2
+endif
+ifeq ($(ARCH_X86_HAVE_SSE3),true)
+ TARGET_GLOBAL_CFLAGS += -DUSE_SSE3 -msse3
endif
-
ifeq ($(ARCH_X86_HAVE_SSSE3),true) # yes, really SSSE3, not SSE3!
-TARGET_GLOBAL_CFLAGS += -DUSE_SSSE3
+ TARGET_GLOBAL_CFLAGS += -DUSE_SSSE3 -mssse3
+endif
+ifeq ($(ARCH_X86_HAVE_SSE4),true)
+ TARGET_GLOBAL_CFLAGS += -msse4
+endif
+ifeq ($(ARCH_X86_HAVE_SSE4_1),true)
+ TARGET_GLOBAL_CFLAGS += -msse4.1
+endif
+ifeq ($(ARCH_X86_HAVE_SSE4_2),true)
+ TARGET_GLOBAL_CFLAGS += -msse4.2
+endif
+ifeq ($(ARCH_X86_HAVE_AVX),true)
+ TARGET_GLOBAL_CFLAGS += -mavx
+endif
+ifeq ($(ARCH_X86_HAVE_AES_NI),true)
+ TARGET_GLOBAL_CFLAGS += -maes
endif
# XXX: This flag is probably redundant. I believe our toolchain always sets