summaryrefslogtreecommitdiff
path: root/arch/um/Makefile
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2021-03-08 14:02:37 +0100
committerRichard Weinberger <richard@nod.at>2021-06-17 21:54:15 +0200
commit386093c68ba3e8bcfe7f46deba901e0e80713c29 (patch)
tree30d50917cbe514bff2ebf8d9180e6c4193a02b7b /arch/um/Makefile
parent43c590cb86665be702c0af0231a10ec813df9cfd (diff)
downloadlinux-rpi-386093c68ba3e8bcfe7f46deba901e0e80713c29.tar.gz
linux-rpi-386093c68ba3e8bcfe7f46deba901e0e80713c29.tar.bz2
linux-rpi-386093c68ba3e8bcfe7f46deba901e0e80713c29.zip
um: allow not setting extra rpaths in the linux binary
There doesn't seem to be any reason for the rpath being set in the binaries, at on systems that I tested on. On the other hand, setting rpath is actually harming binaries in some cases, e.g. if using nix-based compilation environments where /lib & /lib64 are not part of the actual environment. Add a new Kconfig option (under EXPERT, for less user confusion) that allows disabling the rpath additions. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um/Makefile')
-rw-r--r--arch/um/Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/um/Makefile b/arch/um/Makefile
index 1cea46ff9bb7..12a7acef0357 100644
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -118,7 +118,8 @@ archprepare:
$(Q)$(MAKE) $(build)=$(HOST_DIR)/um include/generated/user_constants.h
LINK-$(CONFIG_LD_SCRIPT_STATIC) += -static
-LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib $(call cc-option, -no-pie)
+LINK-$(CONFIG_LD_SCRIPT_DYN) += $(call cc-option, -no-pie)
+LINK-$(CONFIG_LD_SCRIPT_DYN_RPATH) += -Wl,-rpath,/lib
CFLAGS_NO_HARDENING := $(call cc-option, -fno-PIC,) $(call cc-option, -fno-pic,) \
-fno-stack-protector $(call cc-option, -fno-stack-protector-all)