Linux 5.12-rc4
[linux-block.git] / arch / x86 / Makefile
index 5857917f83eee9082bd09c2faa3aecd9e01537d5..2d6d5a28c3bf791b586d50b8bcb18039c0b62ffc 100644 (file)
@@ -50,6 +50,9 @@ export BITS
 KBUILD_CFLAGS += -mno-sse -mno-mmx -mno-sse2 -mno-3dnow
 KBUILD_CFLAGS += $(call cc-option,-mno-avx,)
 
+# Intel CET isn't enabled in the kernel
+KBUILD_CFLAGS += $(call cc-option,-fcf-protection=none)
+
 ifeq ($(CONFIG_X86_32),y)
         BITS := 32
         UTS_MACHINE := i386
@@ -120,9 +123,6 @@ else
 
         KBUILD_CFLAGS += -mno-red-zone
         KBUILD_CFLAGS += -mcmodel=kernel
-
-       # Intel CET isn't enabled in the kernel
-       KBUILD_CFLAGS += $(call cc-option,-fcf-protection=none)
 endif
 
 ifdef CONFIG_X86_X32
@@ -169,6 +169,11 @@ ifeq ($(ACCUMULATE_OUTGOING_ARGS), 1)
        KBUILD_CFLAGS += $(call cc-option,-maccumulate-outgoing-args,)
 endif
 
+ifdef CONFIG_LTO_CLANG
+KBUILD_LDFLAGS += -plugin-opt=-code-model=kernel \
+                  -plugin-opt=-stack-alignment=$(if $(CONFIG_X86_32),4,8)
+endif
+
 # Workaround for a gcc prelease that unfortunately was shipped in a suse release
 KBUILD_CFLAGS += -Wno-sign-compare
 #
@@ -232,9 +237,6 @@ core-y += arch/x86/
 drivers-$(CONFIG_MATH_EMULATION) += arch/x86/math-emu/
 drivers-$(CONFIG_PCI)            += arch/x86/pci/
 
-# must be linked after kernel/
-drivers-$(CONFIG_OPROFILE) += arch/x86/oprofile/
-
 # suspend and hibernation support
 drivers-$(CONFIG_PM) += arch/x86/power/
 
@@ -295,16 +297,20 @@ archclean:
        $(Q)$(MAKE) $(clean)=arch/x86/tools
 
 define archhelp
-  echo  '* bzImage      - Compressed kernel image (arch/x86/boot/bzImage)'
-  echo  '  install      - Install kernel using'
-  echo  '                  (your) ~/bin/$(INSTALLKERNEL) or'
-  echo  '                  (distribution) /sbin/$(INSTALLKERNEL) or'
-  echo  '                  install to $$(INSTALL_PATH) and run lilo'
-  echo  '  fdimage      - Create 1.4MB boot floppy image (arch/x86/boot/fdimage)'
-  echo  '  fdimage144   - Create 1.4MB boot floppy image (arch/x86/boot/fdimage)'
-  echo  '  fdimage288   - Create 2.8MB boot floppy image (arch/x86/boot/fdimage)'
-  echo  '  isoimage     - Create a boot CD-ROM image (arch/x86/boot/image.iso)'
-  echo  '                  bzdisk/fdimage*/isoimage also accept:'
-  echo  '                  FDARGS="..."  arguments for the booted kernel'
-  echo  '                  FDINITRD=file initrd for the booted kernel'
+  echo  '* bzImage             - Compressed kernel image (arch/x86/boot/bzImage)'
+  echo  '  install             - Install kernel using (your) ~/bin/$(INSTALLKERNEL) or'
+  echo  '                        (distribution) /sbin/$(INSTALLKERNEL) or install to '
+  echo  '                        $$(INSTALL_PATH) and run lilo'
+  echo  ''
+  echo  '  fdimage             - Create 1.4MB boot floppy image (arch/x86/boot/fdimage)'
+  echo  '  fdimage144          - Create 1.4MB boot floppy image (arch/x86/boot/fdimage)'
+  echo  '  fdimage288          - Create 2.8MB boot floppy image (arch/x86/boot/fdimage)'
+  echo  '  isoimage            - Create a boot CD-ROM image (arch/x86/boot/image.iso)'
+  echo  '                        bzdisk/fdimage*/isoimage also accept:'
+  echo  '                        FDARGS="..."  arguments for the booted kernel'
+  echo  '                        FDINITRD=file initrd for the booted kernel'
+  echo  ''
+  echo  '  kvm_guest.config    - Enable Kconfig items for running this kernel as a KVM guest'
+  echo  '  xen.config          - Enable Kconfig items for running this kernel as a Xen guest'
+
 endef