]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop queue-5.15/um-fix-adding-no-pie-for-clang.patch
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Feb 2024 07:53:34 +0000 (08:53 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Feb 2024 07:53:34 +0000 (08:53 +0100)
queue-5.15/series
queue-5.15/um-fix-adding-no-pie-for-clang.patch [deleted file]

index fd3a61003201ad52d8c731eb58a13ff9b007d4d5..3625f2808f36f4d0393a6f9fd094f7403e6ead83 100644 (file)
@@ -391,7 +391,6 @@ kbuild-fix-changing-elf-file-type-for-output-of-gen_btf-for-big-endian.patch
 nfc-nci-free-rx_data_reassembly-skb-on-nci-device-cleanup.patch
 net-hsr-remove-warn_once-in-send_hsr_supervision_frame.patch
 xen-netback-properly-sync-tx-responses.patch
-um-fix-adding-no-pie-for-clang.patch
 alsa-hda-realtek-enable-headset-mic-on-vaio-vjfe-adl.patch
 asoc-codecs-wcd938x-handle-deferred-probe.patch
 alsa-hda-cs8409-suppress-vmaster-control-for-dolphin-models.patch
diff --git a/queue-5.15/um-fix-adding-no-pie-for-clang.patch b/queue-5.15/um-fix-adding-no-pie-for-clang.patch
deleted file mode 100644 (file)
index b8ca0fa..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-From 846cfbeed09b45d985079a9173cf390cc053715b Mon Sep 17 00:00:00 2001
-From: Nathan Chancellor <nathan@kernel.org>
-Date: Tue, 23 Jan 2024 15:59:54 -0700
-Subject: um: Fix adding '-no-pie' for clang
-
-From: Nathan Chancellor <nathan@kernel.org>
-
-commit 846cfbeed09b45d985079a9173cf390cc053715b upstream.
-
-The kernel builds with -fno-PIE, so commit 883354afbc10 ("um: link
-vmlinux with -no-pie") added the compiler linker flag '-no-pie' via
-cc-option because '-no-pie' was only supported in GCC 6.1.0 and newer.
-
-While this works for GCC, this does not work for clang because cc-option
-uses '-c', which stops the pipeline right before linking, so '-no-pie'
-is unconsumed and clang warns, causing cc-option to fail just as it
-would if the option was entirely unsupported:
-
-  $ clang -Werror -no-pie -c -o /dev/null -x c /dev/null
-  clang-16: error: argument unused during compilation: '-no-pie' [-Werror,-Wunused-command-line-argument]
-
-A recent version of clang exposes this because it generates a relocation
-under '-mcmodel=large' that is not supported in PIE mode:
-
-  /usr/sbin/ld: init/main.o: relocation R_X86_64_32 against symbol `saved_command_line' can not be used when making a PIE object; recompile with -fPIE
-  /usr/sbin/ld: failed to set dynamic section sizes: bad value
-  clang: error: linker command failed with exit code 1 (use -v to see invocation)
-
-Remove the cc-option check altogether. It is wasteful to invoke the
-compiler to check for '-no-pie' because only one supported compiler
-version does not support it, GCC 5.x (as it is supported with the
-minimum version of clang and GCC 6.1.0+). Use a combination of the
-gcc-min-version macro and CONFIG_CC_IS_CLANG to unconditionally add
-'-no-pie' with CONFIG_LD_SCRIPT_DYN=y, so that it is enabled with all
-compilers that support this. Furthermore, using gcc-min-version can help
-turn this back into
-
-  LINK-$(CONFIG_LD_SCRIPT_DYN) += -no-pie
-
-when the minimum version of GCC is bumped past 6.1.0.
-
-Cc: stable@vger.kernel.org
-Closes: https://github.com/ClangBuiltLinux/linux/issues/1982
-Signed-off-by: Nathan Chancellor <nathan@kernel.org>
-Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- arch/um/Makefile |    4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
---- a/arch/um/Makefile
-+++ b/arch/um/Makefile
-@@ -118,7 +118,9 @@ archprepare:
-       $(Q)$(MAKE) $(build)=$(HOST_DIR)/um include/generated/user_constants.h
- LINK-$(CONFIG_LD_SCRIPT_STATIC) += -static
--LINK-$(CONFIG_LD_SCRIPT_DYN) += $(call cc-option, -no-pie)
-+ifdef CONFIG_LD_SCRIPT_DYN
-+LINK-$(call gcc-min-version, 60100)$(CONFIG_CC_IS_CLANG) += -no-pie
-+endif
- LINK-$(CONFIG_LD_SCRIPT_DYN_RPATH) += -Wl,-rpath,/lib
- CFLAGS_NO_HARDENING := $(call cc-option, -fno-PIC,) $(call cc-option, -fno-pic,) \