Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit de428e37 authored by Bernhard Rosenkränzer's avatar Bernhard Rosenkränzer Committed by Steve Kondik
Browse files

Don't use -Wl,--fix-cortex-a8 for Cortex A7, A9, A15, Krait or Denver



-Wl,--fix-cortex-a8 is a workaround for an Erratum in Cortex-A8
processors. It slightly increases code size and decreases performance,
and there's no point in using it on non-A8 CPUs.

Instead of forcing it unconditionally, use it when targeting
Cortex-A8 or generic armv7-a (which might or might not be A8).

Change-Id: I77c674eafda4089267df2dd5649e9fdb60c428ca
Signed-off-by: default avatarBernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
Signed-off-by: default avatarMaxime Poulain <maxime.poulain@student.uclouvain.be>
parent abd57a26
Loading
Loading
Loading
Loading
+13 −3
Original line number Diff line number Diff line
@@ -12,20 +12,33 @@ ifneq (,$(filter cortex-a15 denver krait,$(TARGET_$(combo_2nd_arch_prefix)CPU_VA
	# Fake an ARM compiler flag as these processors support LPAE which GCC/clang
	# don't advertise.
	arch_variant_cflags += -D__ARM_FEATURE_LPAE=1
	arch_variant_ldflags := \
		-Wl,--no-fix-cortex-a8
else
ifeq ($(strip $(TARGET_$(combo_2nd_arch_prefix)CPU_VARIANT)),cortex-a9)
	arch_variant_cflags := -mcpu=cortex-a9 -mfpu=neon
	arch_variant_ldflags := \
		-Wl,--no-fix-cortex-a8
else
ifneq (,$(filter cortex-a8 scorpion,$(TARGET_$(combo_2nd_arch_prefix)CPU_VARIANT)))
	arch_variant_cflags := -mcpu=cortex-a8 -mfpu=neon
	arch_variant_ldflags := \
		-Wl,--fix-cortex-a8
else
ifeq ($(strip $(TARGET_$(combo_2nd_arch_prefix)CPU_VARIANT)),cortex-a7)
	arch_variant_cflags := -mcpu=cortex-a7 -mfpu=neon-vfpv4
	arch_variant_ldflags := \
		-Wl,--no-fix-cortex-a8
else
ifeq ($(strip $(TARGET_$(combo_2nd_arch_prefix)CPU_VARIANT)),cortex-a5)
	arch_variant_cflags := -mcpu=cortex-a7 -mfpu=neon-vfpv4
	arch_variant_ldflags := \
		-Wl,--no-fix-cortex-a8
else
	arch_variant_cflags := -march=armv7-a -mfpu=neon
	# Generic ARM might be a Cortex A8 -- better safe than sorry
	arch_variant_ldflags := \
		-Wl,--fix-cortex-a8
endif
endif
endif
@@ -34,6 +47,3 @@ endif

arch_variant_cflags += \
    -mfloat-abi=softfp

arch_variant_ldflags := \
	-Wl,--fix-cortex-a8