summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Muellner <christoph.muellner@theobroma-systems.com>2018-10-18 15:49:53 +0200
committerChristoph Muellner <christoph.muellner@theobroma-systems.com>2018-10-18 15:49:53 +0200
commit86d487dd63681e8329174b5d1537c268982e49c0 (patch)
tree2200af737199e2af73b02b799e897e68e2ee37ec
parentea43f24ead76d4259c290780ea65ee8a6c7da200 (diff)
arm64: retpoline: Only compile retpolines if CONFIG_RETPOLINE is set.
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
-rw-r--r--arch/arm64/lib/Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm64/lib/Makefile b/arch/arm64/lib/Makefile
index 155d5080a674..fd531a8487e1 100644
--- a/arch/arm64/lib/Makefile
+++ b/arch/arm64/lib/Makefile
@@ -2,9 +2,11 @@
lib-y := bitops.o clear_user.o delay.o copy_from_user.o \
copy_to_user.o copy_in_user.o copy_page.o \
clear_page.o memchr.o memcpy.o memmove.o memset.o \
- memcmp.o retpoline.o strcmp.o strncmp.o strlen.o \
+ memcmp.o strcmp.o strncmp.o strlen.o \
strnlen.o strchr.o strrchr.o tishift.o
+lib-$(CONFIG_RETPOLINE) := retpoline.o
+
# Tell the compiler to treat all general purpose registers (with the
# exception of the IP registers, which are already handled by the caller
# in case of a PLT) as callee-saved, which allows for efficient runtime