15a67da1fSArd Biesheuvel# SPDX-License-Identifier: GPL-2.0 25a67da1fSArd Biesheuvel 34f2d1bbcSArd BiesheuvelKBUILD_AFLAGS += -D__DISABLE_EXPORTS 44cecebf2SArd BiesheuvelKBUILD_CFLAGS += -D__DISABLE_EXPORTS -mcmodel=small -fPIC \ 54cecebf2SArd Biesheuvel -Os -DDISABLE_BRANCH_PROFILING \ 64cecebf2SArd Biesheuvel $(DISABLE_STACKLEAK_PLUGIN) \ 74cecebf2SArd Biesheuvel -fno-stack-protector -D__NO_FORTIFY \ 84cecebf2SArd Biesheuvel -include $(srctree)/include/linux/hidden.h 94cecebf2SArd Biesheuvel 10498cb872SNathan Chancellor# disable ftrace hooks and LTO 114cecebf2SArd BiesheuvelKBUILD_CFLAGS := $(subst $(CC_FLAGS_FTRACE),,$(KBUILD_CFLAGS)) 12498cb872SNathan ChancellorKBUILD_CFLAGS := $(filter-out $(CC_FLAGS_LTO),$(KBUILD_CFLAGS)) 134cecebf2SArd BiesheuvelKASAN_SANITIZE := n 144cecebf2SArd BiesheuvelKCSAN_SANITIZE := n 154cecebf2SArd BiesheuvelKMSAN_SANITIZE := n 164cecebf2SArd BiesheuvelUBSAN_SANITIZE := n 174cecebf2SArd BiesheuvelKCOV_INSTRUMENT := n 184cecebf2SArd Biesheuvel 19dbe0ad77SArd Biesheuvelobj-$(CONFIG_X86_64) += gdt_idt.o map_kernel.o 20*a3cbbb47SArd Biesheuvelobj-$(CONFIG_AMD_MEM_ENCRYPT) += sme.o sev-startup.o 214f2d1bbcSArd Biesheuvel 225a67da1fSArd Biesheuvellib-$(CONFIG_X86_64) += la57toggle.o 234f2d1bbcSArd Biesheuvellib-$(CONFIG_EFI_MIXED) += efi-mixed.o 24d9fa398fSArd Biesheuvel 25d9fa398fSArd Biesheuvel# 26d9fa398fSArd Biesheuvel# Disable objtool validation for all library code, which is intended 27d9fa398fSArd Biesheuvel# to be linked into the decompressor or the EFI stub but not vmlinux 28d9fa398fSArd Biesheuvel# 29d9fa398fSArd Biesheuvel$(patsubst %.o,$(obj)/%.o,$(lib-y)): OBJECT_FILES_NON_STANDARD := y 30