2014-02-07 03:08:44 +01:00
|
|
|
# Clang flags for arm arch, target or host.
|
|
|
|
|
2014-10-22 18:21:53 +02:00
|
|
|
CLANG_CONFIG_arm_EXTRA_ASFLAGS :=
|
2014-02-07 03:08:44 +01:00
|
|
|
|
2014-10-22 18:21:53 +02:00
|
|
|
CLANG_CONFIG_arm_EXTRA_CFLAGS :=
|
2014-02-07 03:08:44 +01:00
|
|
|
|
2014-10-28 23:50:02 +01:00
|
|
|
ifneq (,$(filter krait,$(TARGET_$(combo_2nd_arch_prefix)CPU_VARIANT)))
|
|
|
|
# Android's clang support's krait as a CPU whereas GCC doesn't. Specify
|
|
|
|
# -mcpu here rather than the more normal core/combo/arch/arm/armv7-a-neon.mk.
|
|
|
|
CLANG_CONFIG_arm_EXTRA_CFLAGS += -mcpu=krait
|
|
|
|
endif
|
|
|
|
|
2014-10-22 18:21:53 +02:00
|
|
|
CLANG_CONFIG_arm_EXTRA_CPPFLAGS :=
|
2014-04-04 01:06:59 +02:00
|
|
|
|
2014-10-22 18:21:53 +02:00
|
|
|
CLANG_CONFIG_arm_EXTRA_LDFLAGS :=
|
2014-02-07 03:08:44 +01:00
|
|
|
|
|
|
|
# Include common unknown flags
|
|
|
|
CLANG_CONFIG_arm_UNKNOWN_CFLAGS := \
|
|
|
|
$(CLANG_CONFIG_UNKNOWN_CFLAGS) \
|
|
|
|
-mthumb-interwork \
|
|
|
|
-fgcse-after-reload \
|
|
|
|
-frerun-cse-after-loop \
|
|
|
|
-frename-registers \
|
2014-08-25 22:57:57 +02:00
|
|
|
-fno-align-jumps \
|
2014-02-07 03:08:44 +01:00
|
|
|
-fno-builtin-sin \
|
2014-08-25 22:57:57 +02:00
|
|
|
-fno-caller-saves \
|
|
|
|
-fno-early-inlining \
|
|
|
|
-fno-move-loop-invariants \
|
|
|
|
-fno-partial-inlining \
|
2014-02-07 03:08:44 +01:00
|
|
|
-fno-strict-volatile-bitfields \
|
2014-08-25 22:57:57 +02:00
|
|
|
-fno-tree-copy-prop \
|
|
|
|
-fno-tree-loop-optimize \
|
2014-02-07 03:08:44 +01:00
|
|
|
-Wa,--noexecstack
|
|
|
|
|
|
|
|
define subst-clang-incompatible-arm-flags
|
|
|
|
$(subst -march=armv5te,-march=armv5t,\
|
|
|
|
$(subst -march=armv5e,-march=armv5,\
|
|
|
|
$(subst -mcpu=cortex-a15,-march=armv7-a,\
|
|
|
|
$(1))))
|
|
|
|
endef
|