Pull x86 build updates from Borislav Petkov: - Fix stack protector builds when cross compiling with Clang - Other Kbuild improvements and fixes * tag 'x86_build_for_v6.0_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/purgatory: Omit use of bin2c x86/purgatory: Hard-code obj-y in Makefile x86/build: Remove unused OBJECT_FILES_NON_STANDARD_test_nx.o x86/Kconfig: Fix CONFIG_CC_HAS_SANE_STACKPROTECTOR when cross compiling with clang
Unified · Split
| @@ -3,6 +3,4 @@ boot/compressed/vmlinux · 2 unmodified lines | ||
| 3 | 3 | tools/test_get_len |
| 4 | 4 | tools/insn_sanity |
| 5 | 5 | tools/insn_decoder_test |
| 6 | −purgatory/kexec-purgatory.c | |
| 7 | 6 | purgatory/purgatory.ro |
| 8 | − | |
| @@ -392,8 +392,8 @@ config PGTABLE_LEVELS · 391 unmodified lines | ||
| 392 | 392 | |
| 393 | 393 | config CC_HAS_SANE_STACKPROTECTOR |
| 394 | 394 | bool |
| 395 | − default $(success,$(srctree)/scripts/gcc-x86_64-has-stack-protector.sh $(CC)) if 64BIT | |
| 396 | − default $(success,$(srctree)/scripts/gcc-x86_32-has-stack-protector.sh $(CC)) | |
| 395 | + default $(success,$(srctree)/scripts/gcc-x86_64-has-stack-protector.sh $(CC) $(CLANG_FLAGS)) if 64BIT | |
| 396 | + default $(success,$(srctree)/scripts/gcc-x86_32-has-stack-protector.sh $(CC) $(CLANG_FLAGS)) | |
| 397 | 397 | help |
| 398 | 398 | We have to make sure stack protector is unconditionally disabled if |
| 399 | 399 | the compiler produces broken code or if it does not let us control |
| @@ -2010,7 +2010,6 @@ config KEXEC · 1610 unmodified lines | ||
| 2010 | 2010 | config KEXEC_FILE |
| 2011 | 2011 | bool "kexec file based system call" |
| 2012 | 2012 | select KEXEC_CORE |
| 2013 | − select BUILD_BIN2C | |
| 2014 | 2013 | depends on X86_64 |
| 2015 | 2014 | depends on CRYPTO=y |
| 2016 | 2015 | depends on CRYPTO_SHA256=y |
| @@ -34,8 +34,6 @@ KASAN_SANITIZE_sev.o := n · 33 unmodified lines | ||
| 34 | 34 | # by several compilation units. To be safe, disable all instrumentation. |
| 35 | 35 | KCSAN_SANITIZE := n |
| 36 | 36 | |
| 37 | −OBJECT_FILES_NON_STANDARD_test_nx.o := y | |
| 38 | − | |
| 39 | 37 | # If instrumentation of this dir is enabled, boot hangs during first second. |
| 40 | 38 | # Probably could be more selective here, but note that files related to irqs, |
| 41 | 39 | # boot, dumpstack/stacktrace, etc are either non-interesting or can lead to |
| @@ -73,12 +73,6 @@ $(obj)/purgatory.ro: $(PURGATORY_OBJS) FORCE · 72 unmodified lines | ||
| 73 | 73 | $(obj)/purgatory.chk: $(obj)/purgatory.ro FORCE |
| 74 | 74 | $(call if_changed,ld) |
| 75 | 75 | |
| 76 | −targets += kexec-purgatory.c | |
| 76 | +$(obj)/kexec-purgatory.o: $(obj)/purgatory.ro $(obj)/purgatory.chk | |
| 77 | 77 | |
| 78 | −quiet_cmd_bin2c = BIN2C $@ | |
| 79 | − cmd_bin2c = $(objtree)/scripts/bin2c kexec_purgatory < $< > $@ | |
| 80 | − | |
| 81 | −$(obj)/kexec-purgatory.c: $(obj)/purgatory.ro $(obj)/purgatory.chk FORCE | |
| 82 | − $(call if_changed,bin2c) | |
| 83 | − | |
| 84 | −obj-$(CONFIG_KEXEC_FILE) += kexec-purgatory.o | |
| 78 | +obj-y += kexec-purgatory.o | |
| @@ -0,0 +1,14 @@ | ||
| 1 | +/* SPDX-License-Identifier: GPL-2.0 */ | |
| 2 | + | |
| 3 | + .section .rodata, "a" | |
| 4 | + | |
| 5 | + .align 8 | |
| 6 | +kexec_purgatory: | |
| 7 | + .globl kexec_purgatory | |
| 8 | + .incbin "arch/x86/purgatory/purgatory.ro" | |
| 9 | +.Lkexec_purgatory_end: | |
| 10 | + | |
| 11 | + .align 8 | |
| 12 | +kexec_purgatory_size: | |
| 13 | + .globl kexec_purgatory_size | |
| 14 | + .quad .Lkexec_purgatory_end - kexec_purgatory | |
| @@ -41,3 +41,5 @@ if [ -n "${building_out_of_srctree}" ]; then · 40 unmodified lines | ||
| 41 | 41 | fi |
| 42 | 42 | |
| 43 | 43 | rm -f scripts/extract-cert |
| 44 | + | |
| 45 | +rm -f arch/x86/purgatory/kexec-purgatory.c | |