summaryrefslogtreecommitdiff
path: root/arch/arm64/lib/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm64/lib/Makefile')
-rw-r--r--arch/arm64/lib/Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm64/lib/Makefile b/arch/arm64/lib/Makefile
index 9a947afaf74c..c6a638a1bb3f 100644
--- a/arch/arm64/lib/Makefile
+++ b/arch/arm64/lib/Makefile
@@ -11,7 +11,12 @@ lib-y := bitops.o clear_user.o delay.o copy_from_user.o \
# patching of the bl instruction in the caller with an atomic instruction
# when supported by the CPU. Result and argument registers are handled
# correctly, based on the function prototype.
+ifeq ($(ld-name),lld)
+# https://bugs.llvm.org/show_bug.cgi?id=35841
+obj-$(CONFIG_ARM64_LSE_ATOMICS) += atomic_ll_sc.o
+else
lib-$(CONFIG_ARM64_LSE_ATOMICS) += atomic_ll_sc.o
+endif
CFLAGS_atomic_ll_sc.o := -ffixed-x1 -ffixed-x2 \
-ffixed-x3 -ffixed-x4 -ffixed-x5 -ffixed-x6 \
-ffixed-x7 -fcall-saved-x8 -fcall-saved-x9 \