Makefile (e5019b14230a0bc1f6641c9850ae39cfe76ad2aa) | Makefile (b0b8a15bb89e09e12aa6be8ae28128bb656338f1) |
---|---|
1# SPDX-License-Identifier: GPL-2.0 2# Unified Makefile for i386 and x86_64 3 4# select defconfig based on actual architecture 5ifeq ($(ARCH),x86) 6 ifeq ($(shell uname -m | sed -e 's/i.86/i386/'),i386) 7 KBUILD_DEFCONFIG := i386_defconfig 8 else --- 60 unchanged lines hidden (view full) --- 69# This must happen before we try the -mpreferred-stack-boundary, see: 70# 71# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 72# 73KBUILD_CFLAGS += -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx 74KBUILD_RUSTFLAGS += --target=$(objtree)/scripts/target.json 75KBUILD_RUSTFLAGS += -Ctarget-feature=-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-avx,-avx2 76 | 1# SPDX-License-Identifier: GPL-2.0 2# Unified Makefile for i386 and x86_64 3 4# select defconfig based on actual architecture 5ifeq ($(ARCH),x86) 6 ifeq ($(shell uname -m | sed -e 's/i.86/i386/'),i386) 7 KBUILD_DEFCONFIG := i386_defconfig 8 else --- 60 unchanged lines hidden (view full) --- 69# This must happen before we try the -mpreferred-stack-boundary, see: 70# 71# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 72# 73KBUILD_CFLAGS += -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx 74KBUILD_RUSTFLAGS += --target=$(objtree)/scripts/target.json 75KBUILD_RUSTFLAGS += -Ctarget-feature=-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-avx,-avx2 76 |
77# 78# CFLAGS for compiling floating point code inside the kernel. 79# 80CC_FLAGS_FPU := -msse -msse2 81ifdef CONFIG_CC_IS_GCC 82# Stack alignment mismatch, proceed with caution. 83# GCC < 7.1 cannot compile code using `double` and -mpreferred-stack-boundary=3 84# (8B stack alignment). 85# See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 86# 87# The "-msse" in the first argument is there so that the 88# -mpreferred-stack-boundary=3 build error: 89# 90# -mpreferred-stack-boundary=3 is not between 4 and 12 91# 92# can be triggered. Otherwise gcc doesn't complain. 93CC_FLAGS_FPU += -mhard-float 94CC_FLAGS_FPU += $(call cc-option,-msse -mpreferred-stack-boundary=3,-mpreferred-stack-boundary=4) 95endif 96 |
|
77ifeq ($(CONFIG_X86_KERNEL_IBT),y) 78# 79# Kernel IBT has S_CET.NOTRACK_EN=0, as such the compilers must not generate 80# NOTRACK prefixes. Current generation compilers unconditionally employ NOTRACK 81# for jump-tables, as such, disable jump-tables for now. 82# 83# (jump-tables are implicitly disabled by RETPOLINE) 84# --- 254 unchanged lines hidden --- | 97ifeq ($(CONFIG_X86_KERNEL_IBT),y) 98# 99# Kernel IBT has S_CET.NOTRACK_EN=0, as such the compilers must not generate 100# NOTRACK prefixes. Current generation compilers unconditionally employ NOTRACK 101# for jump-tables, as such, disable jump-tables for now. 102# 103# (jump-tables are implicitly disabled by RETPOLINE) 104# --- 254 unchanged lines hidden --- |