ff9a79307f
- Avoid 'constexpr', which is a keyword in C23 - Allow 'dtbs_check' and 'dt_compatible_check' run independently of 'dt_binding_check' - Fix weak references to avoid GOT entries in position-independent code generation - Convert the last use of 'optional' property in arch/sh/Kconfig - Remove support for the 'optional' property in Kconfig - Remove support for Clang's ThinLTO caching, which does not work with the .incbin directive - Change the semantics of $(src) so it always points to the source directory, which fixes Makefile inconsistencies between upstream and downstream - Fix 'make tar-pkg' for RISC-V to produce a consistent package - Provide reasonable default coverage for objtool, sanitizers, and profilers - Remove redundant OBJECT_FILES_NON_STANDARD, KASAN_SANITIZE, etc. - Remove the last use of tristate choice in drivers/rapidio/Kconfig - Various cleanups and fixes in Kconfig -----BEGIN PGP SIGNATURE----- iQJJBAABCgAzFiEEbmPs18K1szRHjPqEPYsBB53g2wYFAmZFlGcVHG1hc2FoaXJv eUBrZXJuZWwub3JnAAoJED2LAQed4NsG8voQALC8NtFpduWVfLRj2Qg6Ll/xf1vX 2igcTJEOFHkeqXLGoT8dTDKLEipUBUvKyguPq66CGwVTe2g6zy/nUSXeVtFrUsIa msLTi8FqhqUo5lodNvGMRf8qqmuqcvnXoiQwIocF92jtsFy14bhiFY+n4HfcFNjj GOKwqBZYQUwY/VVb090efc7RfS9c7uwABJSBelSoxg3AGZriwjGy7Pw5aSKGgVYi inqL1eR6qwPP6z7CgQWM99soP+zwybFZmnQrsD9SniRBI4rtAat8Ih5jQFaSUFUQ lk2w0NQBRFN88/uR2IJ2GWuIlQ74WeJ+QnCqVuQ59tV5zw90wqSmLzngfPD057Dv JjNuhk0UyXVtpIg3lRtd4810ppNSTe33b9OM4O2H846W/crju5oDRNDHcflUXcwm Rmn5ho1rb5QVzDVejJbgwidnUInSgJ9PZcvXQ/RJVZPhpgsBzAY9pQexG1G3hviw y9UDrt6KP6bF9tHjmolmtdIes9Pj0c4dN6/Rdj4HS4hIQ/GDar0tnwvOvtfUctNL orJlBsA6GeMmDVXKkR0ytOCWRYqWWbyt8g70RVKQJfuHX7/hGyAQPaQ2/u4mQhC2 aevYfbNJMj0VDfGz81HDBKFtkc5n+Ite8l157dHEl2LEabkOkRdNVcn7SNbOvZmd ZCSnZ31h7woGfNho =D5B/ -----END PGP SIGNATURE----- Merge tag 'kbuild-v6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild updates from Masahiro Yamada: - Avoid 'constexpr', which is a keyword in C23 - Allow 'dtbs_check' and 'dt_compatible_check' run independently of 'dt_binding_check' - Fix weak references to avoid GOT entries in position-independent code generation - Convert the last use of 'optional' property in arch/sh/Kconfig - Remove support for the 'optional' property in Kconfig - Remove support for Clang's ThinLTO caching, which does not work with the .incbin directive - Change the semantics of $(src) so it always points to the source directory, which fixes Makefile inconsistencies between upstream and downstream - Fix 'make tar-pkg' for RISC-V to produce a consistent package - Provide reasonable default coverage for objtool, sanitizers, and profilers - Remove redundant OBJECT_FILES_NON_STANDARD, KASAN_SANITIZE, etc. - Remove the last use of tristate choice in drivers/rapidio/Kconfig - Various cleanups and fixes in Kconfig * tag 'kbuild-v6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (46 commits) kconfig: use sym_get_choice_menu() in sym_check_prop() rapidio: remove choice for enumeration kconfig: lxdialog: remove initialization with A_NORMAL kconfig: m/nconf: merge two item_add_str() calls kconfig: m/nconf: remove dead code to display value of bool choice kconfig: m/nconf: remove dead code to display children of choice members kconfig: gconf: show checkbox for choice correctly kbuild: use GCOV_PROFILE and KCSAN_SANITIZE in scripts/Makefile.modfinal Makefile: remove redundant tool coverage variables kbuild: provide reasonable defaults for tool coverage modules: Drop the .export_symbol section from the final modules kconfig: use menu_list_for_each_sym() in sym_check_choice_deps() kconfig: use sym_get_choice_menu() in conf_write_defconfig() kconfig: add sym_get_choice_menu() helper kconfig: turn defaults and additional prompt for choice members into error kconfig: turn missing prompt for choice members into error kconfig: turn conf_choice() into void function kconfig: use linked list in sym_set_changed() kconfig: gconf: use MENU_CHANGED instead of SYMBOL_CHANGED kconfig: gconf: remove debug code ...
84 lines
2.8 KiB
Makefile
84 lines
2.8 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
purgatory-y := purgatory.o stack.o setup-x86_$(BITS).o sha256.o entry64.o string.o
|
|
|
|
targets += $(purgatory-y)
|
|
PURGATORY_OBJS = $(addprefix $(obj)/,$(purgatory-y))
|
|
|
|
$(obj)/string.o: $(srctree)/arch/x86/boot/compressed/string.c FORCE
|
|
$(call if_changed_rule,cc_o_c)
|
|
|
|
$(obj)/sha256.o: $(srctree)/lib/crypto/sha256.c FORCE
|
|
$(call if_changed_rule,cc_o_c)
|
|
|
|
CFLAGS_sha256.o := -D__DISABLE_EXPORTS -D__NO_FORTIFY
|
|
|
|
# When profile-guided optimization is enabled, llvm emits two different
|
|
# overlapping text sections, which is not supported by kexec. Remove profile
|
|
# optimization flags.
|
|
KBUILD_CFLAGS := $(filter-out -fprofile-sample-use=% -fprofile-use=%,$(KBUILD_CFLAGS))
|
|
|
|
# When LTO is enabled, llvm emits many text sections, which is not supported
|
|
# by kexec. Remove -flto=* flags.
|
|
KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_LTO),$(KBUILD_CFLAGS))
|
|
|
|
# When linking purgatory.ro with -r unresolved symbols are not checked,
|
|
# also link a purgatory.chk binary without -r to check for unresolved symbols.
|
|
PURGATORY_LDFLAGS := -e purgatory_start -z nodefaultlib
|
|
LDFLAGS_purgatory.ro := -r $(PURGATORY_LDFLAGS)
|
|
LDFLAGS_purgatory.chk := $(PURGATORY_LDFLAGS)
|
|
targets += purgatory.ro purgatory.chk
|
|
|
|
# These are adjustments to the compiler flags used for objects that
|
|
# make up the standalone purgatory.ro
|
|
|
|
PURGATORY_CFLAGS_REMOVE := -mcmodel=kernel
|
|
PURGATORY_CFLAGS := -mcmodel=small -ffreestanding -fno-zero-initialized-in-bss -g0
|
|
PURGATORY_CFLAGS += -fpic -fvisibility=hidden
|
|
PURGATORY_CFLAGS += $(DISABLE_STACKLEAK_PLUGIN) -DDISABLE_BRANCH_PROFILING
|
|
PURGATORY_CFLAGS += -fno-stack-protector
|
|
|
|
# Default KBUILD_CFLAGS can have -pg option set when FTRACE is enabled. That
|
|
# in turn leaves some undefined symbols like __fentry__ in purgatory and not
|
|
# sure how to relocate those.
|
|
ifdef CONFIG_FUNCTION_TRACER
|
|
PURGATORY_CFLAGS_REMOVE += $(CC_FLAGS_FTRACE)
|
|
endif
|
|
|
|
ifdef CONFIG_STACKPROTECTOR
|
|
PURGATORY_CFLAGS_REMOVE += -fstack-protector
|
|
endif
|
|
|
|
ifdef CONFIG_STACKPROTECTOR_STRONG
|
|
PURGATORY_CFLAGS_REMOVE += -fstack-protector-strong
|
|
endif
|
|
|
|
ifdef CONFIG_MITIGATION_RETPOLINE
|
|
PURGATORY_CFLAGS_REMOVE += $(RETPOLINE_CFLAGS)
|
|
endif
|
|
|
|
ifdef CONFIG_CFI_CLANG
|
|
PURGATORY_CFLAGS_REMOVE += $(CC_FLAGS_CFI)
|
|
endif
|
|
|
|
CFLAGS_REMOVE_purgatory.o += $(PURGATORY_CFLAGS_REMOVE)
|
|
CFLAGS_purgatory.o += $(PURGATORY_CFLAGS)
|
|
|
|
CFLAGS_REMOVE_sha256.o += $(PURGATORY_CFLAGS_REMOVE)
|
|
CFLAGS_sha256.o += $(PURGATORY_CFLAGS)
|
|
|
|
CFLAGS_REMOVE_string.o += $(PURGATORY_CFLAGS_REMOVE)
|
|
CFLAGS_string.o += $(PURGATORY_CFLAGS)
|
|
|
|
asflags-remove-y += $(foreach x, -g -gdwarf-4 -gdwarf-5, $(x) -Wa,$(x))
|
|
|
|
$(obj)/purgatory.ro: $(PURGATORY_OBJS) FORCE
|
|
$(call if_changed,ld)
|
|
|
|
$(obj)/purgatory.chk: $(obj)/purgatory.ro FORCE
|
|
$(call if_changed,ld)
|
|
|
|
$(obj)/kexec-purgatory.o: $(obj)/purgatory.ro $(obj)/purgatory.chk
|
|
|
|
obj-y += kexec-purgatory.o
|