1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0 274b469f2SSam Ravnborg# Unified Makefile for i386 and x86_64 374b469f2SSam Ravnborg 42266cfd5SSam Ravnborg# select defconfig based on actual architecture 5d746d647SSam Ravnborgifeq ($(ARCH),x86) 6ffee0de4SDavid Woodhouse ifeq ($(shell uname -m),x86_64) 7ffee0de4SDavid Woodhouse KBUILD_DEFCONFIG := x86_64_defconfig 8ffee0de4SDavid Woodhouse else 9d746d647SSam Ravnborg KBUILD_DEFCONFIG := i386_defconfig 10ffee0de4SDavid Woodhouse endif 11d746d647SSam Ravnborgelse 122266cfd5SSam Ravnborg KBUILD_DEFCONFIG := $(ARCH)_defconfig 13d746d647SSam Ravnborgendif 142266cfd5SSam Ravnborg 15d77698dfSMatthias Kaehlcke# For gcc stack alignment is specified with -mpreferred-stack-boundary, 16d77698dfSMatthias Kaehlcke# clang has the option -mstack-alignment for that purpose. 17d77698dfSMatthias Kaehlckeifneq ($(call cc-option, -mpreferred-stack-boundary=4),) 188f918697SMatthias Kaehlcke cc_stack_align4 := -mpreferred-stack-boundary=2 198f918697SMatthias Kaehlcke cc_stack_align8 := -mpreferred-stack-boundary=3 208f918697SMatthias Kaehlckeelse ifneq ($(call cc-option, -mstack-alignment=16),) 218f918697SMatthias Kaehlcke cc_stack_align4 := -mstack-alignment=4 228f918697SMatthias Kaehlcke cc_stack_align8 := -mstack-alignment=8 23d77698dfSMatthias Kaehlckeendif 24d77698dfSMatthias Kaehlcke 251c678da3SDavid Woodhouse# How to compile the 16-bit code. Note we always compile for -march=i386; 261c678da3SDavid Woodhouse# that way we can complain to the user if the CPU is insufficient. 27de3accdaSDavid Woodhouse# 28de3accdaSDavid Woodhouse# The -m16 option is supported by GCC >= 4.9 and clang >= 3.5. For 29a9cfcceeSH. Peter Anvin# older versions of GCC, include an *assembly* header to make sure that 30a9cfcceeSH. Peter Anvin# gcc doesn't play any games behind our back. 31a9cfcceeSH. Peter AnvinCODE16GCC_CFLAGS := -m32 -Wa,$(srctree)/arch/x86/boot/code16gcc.h 32de3accdaSDavid WoodhouseM16_CFLAGS := $(call cc-option, -m16, $(CODE16GCC_CFLAGS)) 33de3accdaSDavid Woodhouse 34d6289f36SCao jinREALMODE_CFLAGS := $(M16_CFLAGS) -g -Os -DDISABLE_BRANCH_PROFILING \ 351c678da3SDavid Woodhouse -Wall -Wstrict-prototypes -march=i386 -mregparm=3 \ 361c678da3SDavid Woodhouse -fno-strict-aliasing -fomit-frame-pointer -fno-pic \ 37032a2c4fSMatthias Kaehlcke -mno-mmx -mno-sse 38032a2c4fSMatthias Kaehlcke 39032a2c4fSMatthias KaehlckeREALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), -ffreestanding) 40032a2c4fSMatthias KaehlckeREALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), -fno-stack-protector) 41*42e0e954SLinus TorvaldsREALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), -Wno-address-of-packed-member) 429e8730b1SMatthias KaehlckeREALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), $(cc_stack_align4)) 431c678da3SDavid Woodhouseexport REALMODE_CFLAGS 441c678da3SDavid Woodhouse 450a6ef376SSam Ravnborg# BITS is used as extension for files which are available in a 32 bit 460a6ef376SSam Ravnborg# and a 64 bit version to simplify shared Makefiles. 470a6ef376SSam Ravnborg# e.g.: obj-y += foo_$(BITS).o 480a6ef376SSam Ravnborgexport BITS 4974b469f2SSam Ravnborg 50a0215061SKees Cookifdef CONFIG_X86_NEED_RELOCS 517c21383fSKees Cook LDFLAGS_vmlinux := --emit-relocs --discard-none 52a0215061SKees Cookendif 53a0215061SKees Cook 54b2c51106SAndy Lutomirski# 55b2c51106SAndy Lutomirski# Prevent GCC from generating any FP code by mistake. 56b2c51106SAndy Lutomirski# 57b2c51106SAndy Lutomirski# This must happen before we try the -mpreferred-stack-boundary, see: 58b2c51106SAndy Lutomirski# 59b2c51106SAndy Lutomirski# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 60b2c51106SAndy Lutomirski# 61b2c51106SAndy LutomirskiKBUILD_CFLAGS += -mno-sse -mno-mmx -mno-sse2 -mno-3dnow 62b2c51106SAndy LutomirskiKBUILD_CFLAGS += $(call cc-option,-mno-avx,) 63b2c51106SAndy Lutomirski 64d746d647SSam Ravnborgifeq ($(CONFIG_X86_32),y) 650a6ef376SSam Ravnborg BITS := 32 668c6531f7SAndreas Herrmann UTS_MACHINE := i386 674ba7e5cdSSam Ravnborg CHECKFLAGS += -D__i386__ 680a6ef376SSam Ravnborg 694ba7e5cdSSam Ravnborg biarch := $(call cc-option,-m32) 704ba7e5cdSSam Ravnborg KBUILD_AFLAGS += $(biarch) 714ba7e5cdSSam Ravnborg KBUILD_CFLAGS += $(biarch) 720a6ef376SSam Ravnborg 730a6ef376SSam Ravnborg KBUILD_CFLAGS += -msoft-float -mregparm=3 -freg-struct-return 740a6ef376SSam Ravnborg 75484d90eeSAndrew Boie # Never want PIC in a 32-bit kernel, prevent breakage with GCC built 76484d90eeSAndrew Boie # with nonstandard options 77484d90eeSAndrew Boie KBUILD_CFLAGS += -fno-pic 78484d90eeSAndrew Boie 79d77698dfSMatthias Kaehlcke # Align the stack to the register width instead of using the default 80d77698dfSMatthias Kaehlcke # alignment of 16 bytes. This reduces stack usage and the number of 81d77698dfSMatthias Kaehlcke # alignment instructions. 829e8730b1SMatthias Kaehlcke KBUILD_CFLAGS += $(call cc-option,$(cc_stack_align4)) 830a6ef376SSam Ravnborg 840a6ef376SSam Ravnborg # CPU-specific tuning. Anything which can be shared with UML should go here. 85a436bb7bSMasahiro Yamada include arch/x86/Makefile_32.cpu 860a6ef376SSam Ravnborg KBUILD_CFLAGS += $(cflags-y) 870a6ef376SSam Ravnborg 880a6ef376SSam Ravnborg # temporary until string.h is fixed 890a6ef376SSam Ravnborg KBUILD_CFLAGS += -ffreestanding 900a6ef376SSam Ravnborgelse 910a6ef376SSam Ravnborg BITS := 64 920a6ef376SSam Ravnborg UTS_MACHINE := x86_64 931f2f01b1SLuc Van Oostenryck CHECKFLAGS += -D__x86_64__ 940a6ef376SSam Ravnborg 9514262d67SGeorge Spelvin biarch := -m64 960a6ef376SSam Ravnborg KBUILD_AFLAGS += -m64 970a6ef376SSam Ravnborg KBUILD_CFLAGS += -m64 980a6ef376SSam Ravnborg 99be6cb027SIngo Molnar # Align jump targets to 1 byte, not the default 16 bytes: 1002c4fd1acSMatthias Kaehlcke KBUILD_CFLAGS += $(call cc-option,-falign-jumps=1) 101be6cb027SIngo Molnar 10252648e83SIngo Molnar # Pack loops tightly as well: 1032c4fd1acSMatthias Kaehlcke KBUILD_CFLAGS += $(call cc-option,-falign-loops=1) 10452648e83SIngo Molnar 1055c630089SRasmus Villemoes # Don't autogenerate traditional x87 instructions 1068f2dd677SBehan Webster KBUILD_CFLAGS += $(call cc-option,-mno-80387) 1078f2dd677SBehan Webster KBUILD_CFLAGS += $(call cc-option,-mno-fp-ret-in-387) 1085551a34eSH. Peter Anvin 109d77698dfSMatthias Kaehlcke # By default gcc and clang use a stack alignment of 16 bytes for x86. 110d77698dfSMatthias Kaehlcke # However the standard kernel entry on x86-64 leaves the stack on an 111d77698dfSMatthias Kaehlcke # 8-byte boundary. If the compiler isn't informed about the actual 112d77698dfSMatthias Kaehlcke # alignment it will generate extra alignment instructions for the 113d77698dfSMatthias Kaehlcke # default alignment which keep the stack *mis*aligned. 114d77698dfSMatthias Kaehlcke # Furthermore an alignment to the register width reduces stack usage 115d77698dfSMatthias Kaehlcke # and the number of alignment instructions. 1169e8730b1SMatthias Kaehlcke KBUILD_CFLAGS += $(call cc-option,$(cc_stack_align8)) 117d9b0cde9SH.J. Lu 118d9ee948dSH.J. Lu # Use -mskip-rax-setup if supported. 119d9ee948dSH.J. Lu KBUILD_CFLAGS += $(call cc-option,-mskip-rax-setup) 120d9ee948dSH.J. Lu 1210a6ef376SSam Ravnborg # FIXME - should be integrated in Makefile.cpu (Makefile_32.cpu) 1220a6ef376SSam Ravnborg cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8) 1230a6ef376SSam Ravnborg cflags-$(CONFIG_MPSC) += $(call cc-option,-march=nocona) 1240a6ef376SSam Ravnborg 1250a6ef376SSam Ravnborg cflags-$(CONFIG_MCORE2) += \ 1260a6ef376SSam Ravnborg $(call cc-option,-march=core2,$(call cc-option,-mtune=generic)) 127366d19e1STobias Doerffel cflags-$(CONFIG_MATOM) += $(call cc-option,-march=atom) \ 128366d19e1STobias Doerffel $(call cc-option,-mtune=atom,$(call cc-option,-mtune=generic)) 1290a6ef376SSam Ravnborg cflags-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=generic) 1300a6ef376SSam Ravnborg KBUILD_CFLAGS += $(cflags-y) 1310a6ef376SSam Ravnborg 1320a6ef376SSam Ravnborg KBUILD_CFLAGS += -mno-red-zone 1330a6ef376SSam Ravnborg KBUILD_CFLAGS += -mcmodel=kernel 1345d707e9cSTejun Heoendif 1350a6ef376SSam Ravnborg 1360bf62763SH. Peter Anvinifdef CONFIG_X86_X32 1370bf62763SH. Peter Anvin x32_ld_ok := $(call try-run,\ 1380bf62763SH. Peter Anvin /bin/echo -e '1: .quad 1b' | \ 1390bf62763SH. Peter Anvin $(CC) $(KBUILD_AFLAGS) -c -x assembler -o "$$TMP" - && \ 1400bf62763SH. Peter Anvin $(OBJCOPY) -O elf32-x86-64 "$$TMP" "$$TMPO" && \ 1410bf62763SH. Peter Anvin $(LD) -m elf32_x86_64 "$$TMPO" -o "$$TMP",y,n) 1420bf62763SH. Peter Anvin ifeq ($(x32_ld_ok),y) 1430bf62763SH. Peter Anvin CONFIG_X86_X32_ABI := y 1440bf62763SH. Peter Anvin KBUILD_AFLAGS += -DCONFIG_X86_X32_ABI 1450bf62763SH. Peter Anvin KBUILD_CFLAGS += -DCONFIG_X86_X32_ABI 1460bf62763SH. Peter Anvin else 1470bf62763SH. Peter Anvin $(warning CONFIG_X86_X32 enabled but no binutils support) 1480bf62763SH. Peter Anvin endif 1490bf62763SH. Peter Anvinendif 1500bf62763SH. Peter Anvinexport CONFIG_X86_X32_ABI 1510bf62763SH. Peter Anvin 1523f135e57SJosh Poimboeuf# 1533f135e57SJosh Poimboeuf# If the function graph tracer is used with mcount instead of fentry, 1543f135e57SJosh Poimboeuf# '-maccumulate-outgoing-args' is needed to prevent a GCC bug 1553f135e57SJosh Poimboeuf# (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42109) 1563f135e57SJosh Poimboeuf# 1573f135e57SJosh Poimboeufifdef CONFIG_FUNCTION_GRAPH_TRACER 1583f135e57SJosh Poimboeuf ifndef CONFIG_HAVE_FENTRY 1593f135e57SJosh Poimboeuf ACCUMULATE_OUTGOING_ARGS := 1 1603f135e57SJosh Poimboeuf else 1613f135e57SJosh Poimboeuf ifeq ($(call cc-option-yn, -mfentry), n) 1623f135e57SJosh Poimboeuf ACCUMULATE_OUTGOING_ARGS := 1 163a5859c6dSJosh Poimboeuf 164a5859c6dSJosh Poimboeuf # GCC ignores '-maccumulate-outgoing-args' when used with '-Os'. 165a5859c6dSJosh Poimboeuf # If '-Os' is enabled, disable it and print a warning. 166a5859c6dSJosh Poimboeuf ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE 167a5859c6dSJosh Poimboeuf undefine CONFIG_CC_OPTIMIZE_FOR_SIZE 168a5859c6dSJosh Poimboeuf $(warning Disabling CONFIG_CC_OPTIMIZE_FOR_SIZE. Your compiler does not have -mfentry so you cannot optimize for size with CONFIG_FUNCTION_GRAPH_TRACER.) 169a5859c6dSJosh Poimboeuf endif 170a5859c6dSJosh Poimboeuf 1713f135e57SJosh Poimboeuf endif 1723f135e57SJosh Poimboeuf endif 1733f135e57SJosh Poimboeufendif 1743f135e57SJosh Poimboeuf 1753f135e57SJosh Poimboeufifeq ($(ACCUMULATE_OUTGOING_ARGS), 1) 1764a1bec46SNick Desaulniers # This compiler flag is not supported by Clang: 1774a1bec46SNick Desaulniers KBUILD_CFLAGS += $(call cc-option,-maccumulate-outgoing-args,) 1783f135e57SJosh Poimboeufendif 1793f135e57SJosh Poimboeuf 1800a6ef376SSam Ravnborg# Stackpointer is addressed different for 32 bit and 64 bit x86 1810a6ef376SSam Ravnborgsp-$(CONFIG_X86_32) := esp 1820a6ef376SSam Ravnborgsp-$(CONFIG_X86_64) := rsp 1830a6ef376SSam Ravnborg 1847b956f03SAndy Lutomirski# do binutils support CFI? 1857b956f03SAndy Lutomirskicfi := $(call as-instr,.cfi_startproc\n.cfi_rel_offset $(sp-y)$(comma)0\n.cfi_endproc,-DCONFIG_AS_CFI=1) 1867b956f03SAndy Lutomirski# is .cfi_signal_frame supported too? 1877b956f03SAndy Lutomirskicfi-sigframe := $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1) 1887b956f03SAndy Lutomirskicfi-sections := $(call as-instr,.cfi_sections .debug_frame,-DCONFIG_AS_CFI_SECTIONS=1) 1897b956f03SAndy Lutomirski 190d7acb92fSH. Peter Anvin# does binutils support specific instructions? 19175aaf4c3SJan Beulichasinstr += $(call as-instr,pshufb %xmm0$(comma)%xmm0,-DCONFIG_AS_SSSE3=1) 192ea4d26aeSJim Kukunasavx_instr := $(call as-instr,vxorps %ymm0$(comma)%ymm1$(comma)%ymm2,-DCONFIG_AS_AVX=1) 1937056741fSJim Kukunasavx2_instr :=$(call as-instr,vpbroadcastb %xmm0$(comma)%ymm1,-DCONFIG_AS_AVX2=1) 194e0a491c1SGayatri Kammelaavx512_instr :=$(call as-instr,vpmovm2b %k1$(comma)%zmm5,-DCONFIG_AS_AVX512=1) 195e38b6b7fStimsha1_ni_instr :=$(call as-instr,sha1msg1 %xmm0$(comma)%xmm1,-DCONFIG_AS_SHA1_NI=1) 196e38b6b7fStimsha256_ni_instr :=$(call as-instr,sha256msg1 %xmm0$(comma)%xmm1,-DCONFIG_AS_SHA256_NI=1) 197d7acb92fSH. Peter Anvin 198e0a491c1SGayatri KammelaKBUILD_AFLAGS += $(cfi) $(cfi-sigframe) $(cfi-sections) $(asinstr) $(avx_instr) $(avx2_instr) $(avx512_instr) $(sha1_ni_instr) $(sha256_ni_instr) 199e0a491c1SGayatri KammelaKBUILD_CFLAGS += $(cfi) $(cfi-sigframe) $(cfi-sections) $(asinstr) $(avx_instr) $(avx2_instr) $(avx512_instr) $(sha1_ni_instr) $(sha256_ni_instr) 2000a6ef376SSam Ravnborg 201d503ac53SMasahiro YamadaKBUILD_LDFLAGS := -m elf_$(UTS_MACHINE) 20225dfeeb7SSam Ravnborg 203e3d03598SH.J. Lu# 204e3d03598SH.J. Lu# The 64-bit kernel must be aligned to 2MB. Pass -z max-page-size=0x200000 to 205e3d03598SH.J. Lu# the linker to force 2MB page size regardless of the default page size used 206e3d03598SH.J. Lu# by the linker. 207e3d03598SH.J. Lu# 208e3d03598SH.J. Luifdef CONFIG_X86_64 209d503ac53SMasahiro YamadaKBUILD_LDFLAGS += $(call ld-option, -z max-page-size=0x200000) 210e3d03598SH.J. Luendif 211e3d03598SH.J. Lu 21225dfeeb7SSam Ravnborg# Workaround for a gcc prelease that unfortunately was shipped in a suse release 21325dfeeb7SSam RavnborgKBUILD_CFLAGS += -Wno-sign-compare 21425dfeeb7SSam Ravnborg# 21525dfeeb7SSam RavnborgKBUILD_CFLAGS += -fno-asynchronous-unwind-tables 2160a6ef376SSam Ravnborg 21776b04384SDavid Woodhouse# Avoid indirect branches in kernel to deal with Spectre 21876b04384SDavid Woodhouseifdef CONFIG_RETPOLINE 2194cd24de3SZhenzhong Duan KBUILD_CFLAGS += $(RETPOLINE_CFLAGS) 220ce02ef06SDaniel Borkmann # Additionally, avoid generating expensive indirect jumps which 221ce02ef06SDaniel Borkmann # are subject to retpolines for small number of switch cases. 222ce02ef06SDaniel Borkmann # clang turns off jump table generation by default when under 223a9d57ef1SDaniel Borkmann # retpoline builds, however, gcc does not for x86. This has 224a9d57ef1SDaniel Borkmann # only been fixed starting from gcc stable version 8.4.0 and 225a9d57ef1SDaniel Borkmann # onwards, but not for older ones. See gcc bug #86952. 226a9d57ef1SDaniel Borkmann ifndef CONFIG_CC_IS_CLANG 227a9d57ef1SDaniel Borkmann KBUILD_CFLAGS += $(call cc-option,-fno-jump-tables) 228a9d57ef1SDaniel Borkmann endif 22976b04384SDavid Woodhouseendif 23076b04384SDavid Woodhouse 2313ce9e53eSMichal Marekarchscripts: scripts_basic 2326520fe55SH. Peter Anvin $(Q)$(MAKE) $(build)=arch/x86/tools relocs 2336520fe55SH. Peter Anvin 2340a6ef376SSam Ravnborg### 235303395acSH. Peter Anvin# Syscall table generation 236303395acSH. Peter Anvin 237303395acSH. Peter Anvinarchheaders: 2381f57d5d8SIngo Molnar $(Q)$(MAKE) $(build)=arch/x86/entry/syscalls all 239303395acSH. Peter Anvin 240303395acSH. Peter Anvin### 2410a6ef376SSam Ravnborg# Kernel objects 2420a6ef376SSam Ravnborg 2430a6ef376SSam Ravnborghead-y := arch/x86/kernel/head_$(BITS).o 244700efc1bSEric W. Biedermanhead-y += arch/x86/kernel/head$(BITS).o 245f2d85299SLuis R. Rodriguezhead-y += arch/x86/kernel/ebda.o 2468d152e7aSLuis R. Rodriguezhead-y += arch/x86/kernel/platform-quirks.o 2470a6ef376SSam Ravnborg 2480a6ef376SSam Ravnborglibs-y += arch/x86/lib/ 2490a6ef376SSam Ravnborg 250d1f0ae5eSSam Ravnborg# See arch/x86/Kbuild for content of core part of the kernel 251d1f0ae5eSSam Ravnborgcore-y += arch/x86/ 2520a6ef376SSam Ravnborg 2530a6ef376SSam Ravnborg# drivers-y are linked after core-y 2540a6ef376SSam Ravnborgdrivers-$(CONFIG_MATH_EMULATION) += arch/x86/math-emu/ 2550a6ef376SSam Ravnborgdrivers-$(CONFIG_PCI) += arch/x86/pci/ 2560a6ef376SSam Ravnborg 2570a6ef376SSam Ravnborg# must be linked after kernel/ 2580a6ef376SSam Ravnborgdrivers-$(CONFIG_OPROFILE) += arch/x86/oprofile/ 2590a6ef376SSam Ravnborg 260cf7700feSRafael J. Wysocki# suspend and hibernation support 2610a6ef376SSam Ravnborgdrivers-$(CONFIG_PM) += arch/x86/power/ 262cf7700feSRafael J. Wysocki 2630a6ef376SSam Ravnborgdrivers-$(CONFIG_FB) += arch/x86/video/ 2640a6ef376SSam Ravnborg 2650a6ef376SSam Ravnborg#### 2660a6ef376SSam Ravnborg# boot loader support. Several targets are kept for legacy purposes 2670a6ef376SSam Ravnborg 2680a6ef376SSam Ravnborgboot := arch/x86/boot 2690a6ef376SSam Ravnborg 2701648e4f8SH. Peter AnvinBOOT_TARGETS = bzlilo bzdisk fdimage fdimage144 fdimage288 isoimage 271f9c5107cSH. Peter Anvin 272f9c5107cSH. Peter AnvinPHONY += bzImage $(BOOT_TARGETS) 2730a6ef376SSam Ravnborg 2740a6ef376SSam Ravnborg# Default kernel to build 2750a6ef376SSam Ravnborgall: bzImage 2760a6ef376SSam Ravnborg 2770a6ef376SSam Ravnborg# KBUILD_IMAGE specify target image being built 2780a6ef376SSam RavnborgKBUILD_IMAGE := $(boot)/bzImage 2790a6ef376SSam Ravnborg 280f9c5107cSH. Peter AnvinbzImage: vmlinux 281ca0e9badSMasami Hiramatsuifeq ($(CONFIG_X86_DECODER_SELFTEST),y) 282ca0e9badSMasami Hiramatsu $(Q)$(MAKE) $(build)=arch/x86/tools posttest 283ca0e9badSMasami Hiramatsuendif 2840a6ef376SSam Ravnborg $(Q)$(MAKE) $(build)=$(boot) $(KBUILD_IMAGE) 2850a6ef376SSam Ravnborg $(Q)mkdir -p $(objtree)/arch/$(UTS_MACHINE)/boot 28641b3eae6SJan Beulich $(Q)ln -fsn ../../x86/boot/bzImage $(objtree)/arch/$(UTS_MACHINE)/boot/$@ 2870a6ef376SSam Ravnborg 288f9c5107cSH. Peter Anvin$(BOOT_TARGETS): vmlinux 289f9c5107cSH. Peter Anvin $(Q)$(MAKE) $(build)=$(boot) $@ 2900a6ef376SSam Ravnborg 2911648e4f8SH. Peter AnvinPHONY += install 2921648e4f8SH. Peter Anvininstall: 2931648e4f8SH. Peter Anvin $(Q)$(MAKE) $(build)=$(boot) $@ 2941648e4f8SH. Peter Anvin 2950a6ef376SSam RavnborgPHONY += vdso_install 2960a6ef376SSam Ravnborgvdso_install: 297d603c8e1SIngo Molnar $(Q)$(MAKE) $(build)=arch/x86/entry/vdso $@ 2980a6ef376SSam Ravnborg 299829fe4aaSBen Hutchingsarchprepare: checkbin 300829fe4aaSBen Hutchingscheckbin: 301e9666d10SMasahiro Yamadaifndef CONFIG_CC_HAS_ASM_GOTO 302829fe4aaSBen Hutchings @echo Compiler lacks asm-goto support. 303829fe4aaSBen Hutchings @exit 1 304829fe4aaSBen Hutchingsendif 30525896d07SMasahiro Yamadaifdef CONFIG_RETPOLINE 30625896d07SMasahiro Yamadaifeq ($(RETPOLINE_CFLAGS),) 30725896d07SMasahiro Yamada @echo "You are building kernel with non-retpoline compiler." >&2 30825896d07SMasahiro Yamada @echo "Please update your compiler." >&2 30925896d07SMasahiro Yamada @false 31025896d07SMasahiro Yamadaendif 31125896d07SMasahiro Yamadaendif 312829fe4aaSBen Hutchings 3130a6ef376SSam Ravnborgarchclean: 3140a6ef376SSam Ravnborg $(Q)rm -rf $(objtree)/arch/i386 3150a6ef376SSam Ravnborg $(Q)rm -rf $(objtree)/arch/x86_64 3160a6ef376SSam Ravnborg $(Q)$(MAKE) $(clean)=$(boot) 317b2d668daSJarkko Sakkinen $(Q)$(MAKE) $(clean)=arch/x86/tools 3180a6ef376SSam Ravnborg 3190a6ef376SSam Ravnborgdefine archhelp 3200a6ef376SSam Ravnborg echo '* bzImage - Compressed kernel image (arch/x86/boot/bzImage)' 3210a6ef376SSam Ravnborg echo ' install - Install kernel using' 322caa27b66SSam Ravnborg echo ' (your) ~/bin/$(INSTALLKERNEL) or' 323caa27b66SSam Ravnborg echo ' (distribution) /sbin/$(INSTALLKERNEL) or' 3240a6ef376SSam Ravnborg echo ' install to $$(INSTALL_PATH) and run lilo' 32537f30e21SAndi Kleen echo ' fdimage - Create 1.4MB boot floppy image (arch/x86/boot/fdimage)' 32637f30e21SAndi Kleen echo ' fdimage144 - Create 1.4MB boot floppy image (arch/x86/boot/fdimage)' 32737f30e21SAndi Kleen echo ' fdimage288 - Create 2.8MB boot floppy image (arch/x86/boot/fdimage)' 32837f30e21SAndi Kleen echo ' isoimage - Create a boot CD-ROM image (arch/x86/boot/image.iso)' 32937f30e21SAndi Kleen echo ' bzdisk/fdimage*/isoimage also accept:' 33037f30e21SAndi Kleen echo ' FDARGS="..." arguments for the booted kernel' 33137f30e21SAndi Kleen echo ' FDINITRD=file initrd for the booted kernel' 3320a6ef376SSam Ravnborgendef 333