@@ -297,7 +297,7 @@ PAT_BASE = $(word 1,$(PAT_SPLIT))
PAT_N = $(word 2,$(PAT_SPLIT))
PAT_S = $(word 3,$(PAT_SPLIT))
IFUNC_DEF = -DIFUNC_ALT=$(PAT_S)
-IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS))
+IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS)) $(word $(PAT_S),$(EXTRA_OVERRIDE))
M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
M_SIZE = -DN=$(PAT_N)
M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT))
@@ -313,7 +313,13 @@ M_SRC = $(firstword $(filter %/$(M_FILE), $(all_c_files)))
libatomic_la_LIBADD = $(foreach s,$(SIZES),$(addsuffix \
_$(s)_.lo,$(SIZEOBJS))) $(am__append_1) $(am__append_2) \
$(am__append_3)
+# For ARM, the -march option by itself conflicts with any -mcpu option that
+# we might end up passing to the build, causing an error.
+# Therefore we override the -mcpu option as well.
+# This shouldn't affect tuning much because the affected code is mostly
+# in inline assembly anyway.
@ARCH_ARM_LINUX_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=armv7-a -DHAVE_KERNEL64
+@ARCH_ARM_LINUX_TRUE@@HAVE_IFUNC_TRUE@EXTRA_OVERRIDE = -mcpu=generic-armv7-a
@ARCH_I386_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=i586
@ARCH_X86_64_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -mcx16
libatomic_convenience_la_SOURCES = $(libatomic_la_SOURCES)