]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Drop um-fix-adding-no-pie-for-clang.patch from older trees
authorSasha Levin <sashal@kernel.org>
Wed, 13 Mar 2024 14:58:14 +0000 (10:58 -0400)
committerSasha Levin <sashal@kernel.org>
Wed, 13 Mar 2024 14:58:14 +0000 (10:58 -0400)
queue-4.19/series
queue-4.19/um-fix-adding-no-pie-for-clang.patch [deleted file]
queue-5.10/series
queue-5.10/um-fix-adding-no-pie-for-clang.patch [deleted file]
queue-5.15/series
queue-5.15/um-fix-adding-no-pie-for-clang.patch [deleted file]
queue-5.4/series
queue-5.4/um-fix-adding-no-pie-for-clang.patch [deleted file]

index 727b4df6a9aa1a82a109a51f8fc7289c33233e95..6da763d9197b45d25a60a4a513d7c54f6622550d 100644 (file)
@@ -25,7 +25,6 @@ btrfs-ref-verify-free-ref-cache-before-clearing-moun.patch
 tools-selftest-vm-allow-choosing-mem-size-and-page-s.patch
 selftests-mm-fix-map_hugetlb-failure-on-64k-page-siz.patch
 um-allow-not-setting-extra-rpaths-in-the-linux-binar.patch
-um-fix-adding-no-pie-for-clang.patch
 input-i8042-fix-strange-behavior-of-touchpad-on-clev.patch
 hv_netvsc-make-netvsc-vf-binding-check-both-mac-and-.patch
 hv_netvsc-use-netif_is_bond_master-instead-of-open-c.patch
diff --git a/queue-4.19/um-fix-adding-no-pie-for-clang.patch b/queue-4.19/um-fix-adding-no-pie-for-clang.patch
deleted file mode 100644 (file)
index a55a744..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-From 639b65dc8b8fa707d56b378ab98e284a9bd12ad0 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@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>
-
-[ Upstream commit 846cfbeed09b45d985079a9173cf390cc053715b ]
-
-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: Sasha Levin <sashal@kernel.org>
----
- arch/um/Makefile | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/arch/um/Makefile b/arch/um/Makefile
-index 439edee0b2878..5ac1b16ce3c10 100644
---- a/arch/um/Makefile
-+++ b/arch/um/Makefile
-@@ -119,7 +119,9 @@ archheaders:
- archprepare: 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,) \
--- 
-2.43.0
-
index eb02355417bd49f8c771ed6a2d15f82ebf2ff327..3b125e409ec67d2ffbf84a7e7f51dd7e89080ea8 100644 (file)
@@ -31,7 +31,6 @@ netrom-fix-data-races-around-sysctl_net_busy_read.patch
 selftests-mm-switch-to-bash-from-sh.patch
 selftests-mm-fix-map_hugetlb-failure-on-64k-page-siz.patch
 um-allow-not-setting-extra-rpaths-in-the-linux-binar.patch
-um-fix-adding-no-pie-for-clang.patch
 xhci-remove-extra-loop-in-interrupt-context.patch
 xhci-prevent-double-fetch-of-transfer-and-transfer-e.patch
 xhci-process-isoc-td-properly-when-there-was-a-trans.patch
diff --git a/queue-5.10/um-fix-adding-no-pie-for-clang.patch b/queue-5.10/um-fix-adding-no-pie-for-clang.patch
deleted file mode 100644 (file)
index 5e2a36c..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-From e9d85964ffc6c7b86d09408ccde4e85c228101ef Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@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>
-
-[ Upstream commit 846cfbeed09b45d985079a9173cf390cc053715b ]
-
-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: Sasha Levin <sashal@kernel.org>
----
- arch/um/Makefile | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/arch/um/Makefile b/arch/um/Makefile
-index 4211e23a2f68f..81d35b1f315ae 100644
---- 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,) \
--- 
-2.43.0
-
index a4186f6b30613c15d6cb2502c4ee9ce87dd6a12a..34e1d23395e2e1c318278ba75ccf6a16dbb7e2cc 100644 (file)
@@ -42,7 +42,6 @@ nfp-flower-add-goto_chain_index-for-ct-entry.patch
 nfp-flower-add-hardware-offload-check-for-post-ct-en.patch
 selftests-mm-switch-to-bash-from-sh.patch
 selftests-mm-fix-map_hugetlb-failure-on-64k-page-siz.patch
-um-fix-adding-no-pie-for-clang.patch
 modpost-include-.text.-in-text_sections.patch
 modpost-add-.ltext-and-.ltext.-to-text_sections.patch
 xhci-process-isoc-td-properly-when-there-was-a-trans.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 ea92616..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-From 0332f68bfb32f980bd2385d853d957c2f9e41460 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@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>
-
-[ Upstream commit 846cfbeed09b45d985079a9173cf390cc053715b ]
-
-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: Sasha Levin <sashal@kernel.org>
----
- arch/um/Makefile | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/arch/um/Makefile b/arch/um/Makefile
-index 3dbd0e3b660ea..778c50f273992 100644
---- 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,) \
--- 
-2.43.0
-
index 08030342a33cd299aa98a1ebfe5bb2aebf0e1a65..e3d826d00b50a56384c38a4eee924430c52e94ef 100644 (file)
@@ -24,7 +24,6 @@ netrom-fix-a-data-race-around-sysctl_netrom_link_fai.patch
 netrom-fix-data-races-around-sysctl_net_busy_read.patch
 selftests-mm-fix-map_hugetlb-failure-on-64k-page-siz.patch
 um-allow-not-setting-extra-rpaths-in-the-linux-binar.patch
-um-fix-adding-no-pie-for-clang.patch
 serial-max310x-use-devm_clk_get_optional-to-get-the-.patch
 serial-max310x-try-to-get-crystal-clock-rate-from-pr.patch
 serial-max310x-fail-probe-if-clock-crystal-is-unstab.patch
diff --git a/queue-5.4/um-fix-adding-no-pie-for-clang.patch b/queue-5.4/um-fix-adding-no-pie-for-clang.patch
deleted file mode 100644 (file)
index 8437f4b..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-From 8ea84d1ab02214ad66ba8d958fdb4697065eb362 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@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>
-
-[ Upstream commit 846cfbeed09b45d985079a9173cf390cc053715b ]
-
-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: Sasha Levin <sashal@kernel.org>
----
- arch/um/Makefile | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/arch/um/Makefile b/arch/um/Makefile
-index 94cea8d46b222..4125bf63f5275 100644
---- 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,) \
--- 
-2.43.0
-