linux/arch
Petr Pavlu 5270316c9f kbuild: Use -fmin-function-alignment when available
GCC recently added option -fmin-function-alignment, which should appear
in GCC 14. Unlike -falign-functions, this option causes all functions to
be aligned at the specified value, including the cold ones.

In particular, when an arm64 kernel is built with
DYNAMIC_FTRACE_WITH_CALL_OPS=y, the 8-byte function alignment is
required for correct functionality. This was done by -falign-functions=8
and having workarounds in the kernel to force the compiler to follow
this alignment. The new -fmin-function-alignment option directly
guarantees it.

Detect availability of -fmin-function-alignment and use it instead of
-falign-functions when present. Introduce CC_HAS_SANE_FUNCTION_ALIGNMENT
and enable __cold to work as expected when it is set.

Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2024-02-25 18:04:26 +09:00
..
alpha alpha: merge two entries for CONFIG_ALPHA_GAMMA 2024-02-23 21:08:08 +09:00
arc work around gcc bugs with 'asm goto' with outputs 2024-02-09 15:57:48 -08:00
arm 21 hotfixes. 12 are cc:stable and the remainder pertain to post-6.7 2024-02-10 15:28:07 -08:00
arm64 ARM: 2024-02-16 10:48:14 -08:00
csky work around gcc bugs with 'asm goto' with outputs 2024-02-09 15:57:48 -08:00
hexagon hexagon: select GENERIC_IRQ_PROBE instead of redefining it 2024-02-20 20:47:45 +09:00
loongarch work around gcc bugs with 'asm goto' with outputs 2024-02-09 15:57:48 -08:00
m68k kbuild: use 4-space indentation when followed by conditionals 2024-02-15 06:05:44 +09:00
microblaze Microblaze patches for 6.8-rc1 2024-01-17 11:27:23 -08:00
mips MIPS: Clear Cause.BD in instruction_pointer_set 2024-02-12 23:04:40 +01:00
nios2 percpu: 2024-01-18 15:01:28 -08:00
openrisc
parisc treewide: replace or remove redundant def_bool in Kconfig files 2024-02-20 20:47:45 +09:00
powerpc powerpc fixes for 6.8 #3 2024-02-17 16:59:31 -08:00
riscv treewide: replace or remove redundant def_bool in Kconfig files 2024-02-20 20:47:45 +09:00
s390 work around gcc bugs with 'asm goto' with outputs 2024-02-09 15:57:48 -08:00
sh sh updates for v6.8 2024-01-20 09:24:06 -08:00
sparc work around gcc bugs with 'asm goto' with outputs 2024-02-09 15:57:48 -08:00
um work around gcc bugs with 'asm goto' with outputs 2024-02-09 15:57:48 -08:00
x86 kbuild: change tool coverage variables to take the path relative to $(obj) 2024-02-23 21:06:21 +09:00
xtensa work around gcc bugs with 'asm goto' with outputs 2024-02-09 15:57:48 -08:00
.gitignore
Kconfig kbuild: Use -fmin-function-alignment when available 2024-02-25 18:04:26 +09:00