Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'x86_build_for_v6.18_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 build updates from Borislav Petkov:

- Remove and simplify a bunch of cc-option and compiler version checks
in the build machinery now that the minimal version of both compilers
supports them

* tag 'x86_build_for_v6.18_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/Kconfig: Clean up LLVM version checks in IBT configurations
x86/build: Remove cc-option from -mskip-rax-setup
x86/build: Remove cc-option from -mno-fp-ret-in-387
x86/build: Clean up stack alignment flags in CC_FLAGS_FPU
x86/build: Remove cc-option from stack alignment flags
x86/build: Remove cc-option for GCC retpoline flags

+8 -25
+1 -7
arch/x86/Kconfig
··· 1734 1734 config CC_HAS_IBT 1735 1735 # GCC >= 9 and binutils >= 2.29 1736 1736 # Retpoline check to work around https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93654 1737 - # Clang/LLVM >= 14 1738 - # https://github.com/llvm/llvm-project/commit/e0b89df2e0f0130881bf6c39bf31d7f6aac00e0f 1739 - # https://github.com/llvm/llvm-project/commit/dfcf69770bc522b9e411c66454934a37c1f35332 1740 - def_bool ((CC_IS_GCC && $(cc-option, -fcf-protection=branch -mindirect-branch-register)) || \ 1741 - (CC_IS_CLANG && CLANG_VERSION >= 140000)) && \ 1737 + def_bool ((CC_IS_GCC && $(cc-option, -fcf-protection=branch -mindirect-branch-register)) || CC_IS_CLANG) && \ 1742 1738 $(as-instr,endbr64) 1743 1739 1744 1740 config X86_CET ··· 1746 1750 prompt "Indirect Branch Tracking" 1747 1751 def_bool y 1748 1752 depends on X86_64 && CC_HAS_IBT && HAVE_OBJTOOL 1749 - # https://github.com/llvm/llvm-project/commit/9d7001eba9c4cb311e03cd8cdc231f9e579f2d0f 1750 - depends on !LD_IS_LLD || LLD_VERSION >= 140000 1751 1753 select OBJTOOL 1752 1754 select X86_CET 1753 1755 help
+7 -18
arch/x86/Makefile
··· 13 13 endif 14 14 15 15 ifdef CONFIG_CC_IS_GCC 16 - RETPOLINE_CFLAGS := $(call cc-option,-mindirect-branch=thunk-extern -mindirect-branch-register) 17 - RETPOLINE_VDSO_CFLAGS := $(call cc-option,-mindirect-branch=thunk-inline -mindirect-branch-register) 16 + RETPOLINE_CFLAGS := -mindirect-branch=thunk-extern -mindirect-branch-register 17 + RETPOLINE_VDSO_CFLAGS := -mindirect-branch=thunk-inline -mindirect-branch-register 18 18 endif 19 19 ifdef CONFIG_CC_IS_CLANG 20 20 RETPOLINE_CFLAGS := -mretpoline-external-thunk ··· 37 37 38 38 # For gcc stack alignment is specified with -mpreferred-stack-boundary, 39 39 # clang has the option -mstack-alignment for that purpose. 40 - ifneq ($(call cc-option, -mpreferred-stack-boundary=4),) 40 + ifdef CONFIG_CC_IS_GCC 41 41 cc_stack_align4 := -mpreferred-stack-boundary=2 42 42 cc_stack_align8 := -mpreferred-stack-boundary=3 43 - else ifneq ($(call cc-option, -mstack-alignment=16),) 43 + endif 44 + ifdef CONFIG_CC_IS_CLANG 44 45 cc_stack_align4 := -mstack-alignment=4 45 46 cc_stack_align8 := -mstack-alignment=8 46 47 endif ··· 84 83 # 85 84 CC_FLAGS_FPU := -msse -msse2 86 85 ifdef CONFIG_CC_IS_GCC 87 - # Stack alignment mismatch, proceed with caution. 88 - # GCC < 7.1 cannot compile code using `double` and -mpreferred-stack-boundary=3 89 - # (8B stack alignment). 90 - # See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 91 - # 92 - # The "-msse" in the first argument is there so that the 93 - # -mpreferred-stack-boundary=3 build error: 94 - # 95 - # -mpreferred-stack-boundary=3 is not between 4 and 12 96 - # 97 - # can be triggered. Otherwise gcc doesn't complain. 98 86 CC_FLAGS_FPU += -mhard-float 99 - CC_FLAGS_FPU += $(call cc-option,-msse -mpreferred-stack-boundary=3,-mpreferred-stack-boundary=4) 100 87 endif 101 88 102 89 ifeq ($(CONFIG_X86_KERNEL_IBT),y) ··· 148 159 149 160 # Don't autogenerate traditional x87 instructions 150 161 KBUILD_CFLAGS += -mno-80387 151 - KBUILD_CFLAGS += $(call cc-option,-mno-fp-ret-in-387) 162 + KBUILD_CFLAGS += -mno-fp-ret-in-387 152 163 153 164 # By default gcc and clang use a stack alignment of 16 bytes for x86. 154 165 # However the standard kernel entry on x86-64 leaves the stack on an ··· 160 171 KBUILD_CFLAGS += $(cc_stack_align8) 161 172 162 173 # Use -mskip-rax-setup if supported. 163 - KBUILD_CFLAGS += $(call cc-option,-mskip-rax-setup) 174 + KBUILD_CFLAGS += -mskip-rax-setup 164 175 165 176 ifdef CONFIG_X86_NATIVE_CPU 166 177 KBUILD_CFLAGS += -march=native