xref: /linux/arch/x86/Makefile (revision b9f174c811e3ae4ae8959dc57e6adb9990e913f4)
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)
6f9bb7f6aSArnd Bergmann  ifeq ($(shell uname -m | sed -e 's/i.86/i386/'),i386)
7d746d647SSam Ravnborg        KBUILD_DEFCONFIG := i386_defconfig
8f9bb7f6aSArnd Bergmann  else
9f9bb7f6aSArnd Bergmann        KBUILD_DEFCONFIG := x86_64_defconfig
10ffee0de4SDavid Woodhouse  endif
11d746d647SSam Ravnborgelse
122266cfd5SSam Ravnborg        KBUILD_DEFCONFIG := $(ARCH)_defconfig
13d746d647SSam Ravnborgendif
142266cfd5SSam Ravnborg
15b2f825bfSPeter Zijlstraifdef CONFIG_CC_IS_GCC
16b2f825bfSPeter ZijlstraRETPOLINE_CFLAGS	:= $(call cc-option,-mindirect-branch=thunk-extern -mindirect-branch-register)
17b2f825bfSPeter ZijlstraRETPOLINE_VDSO_CFLAGS	:= $(call cc-option,-mindirect-branch=thunk-inline -mindirect-branch-register)
18b2f825bfSPeter Zijlstraendif
19b2f825bfSPeter Zijlstraifdef CONFIG_CC_IS_CLANG
20b2f825bfSPeter ZijlstraRETPOLINE_CFLAGS	:= -mretpoline-external-thunk
21b2f825bfSPeter ZijlstraRETPOLINE_VDSO_CFLAGS	:= -mretpoline
22b2f825bfSPeter Zijlstraendif
2327b5de62SNathan ChancellorRETPOLINE_CFLAGS	+= $(call cc-option,-mindirect-branch-cs-prefix)
24f43b9876SPeter Zijlstra
25f43b9876SPeter Zijlstraifdef CONFIG_RETHUNK
26f43b9876SPeter ZijlstraRETHUNK_CFLAGS		:= -mfunction-return=thunk-extern
27f43b9876SPeter ZijlstraRETPOLINE_CFLAGS	+= $(RETHUNK_CFLAGS)
28f43b9876SPeter Zijlstraendif
29f43b9876SPeter Zijlstra
30efc72a66SJosh Poimboeufexport RETHUNK_CFLAGS
31b2f825bfSPeter Zijlstraexport RETPOLINE_CFLAGS
32b2f825bfSPeter Zijlstraexport RETPOLINE_VDSO_CFLAGS
33b2f825bfSPeter Zijlstra
34d77698dfSMatthias Kaehlcke# For gcc stack alignment is specified with -mpreferred-stack-boundary,
35d77698dfSMatthias Kaehlcke# clang has the option -mstack-alignment for that purpose.
36d77698dfSMatthias Kaehlckeifneq ($(call cc-option, -mpreferred-stack-boundary=4),)
378f918697SMatthias Kaehlcke      cc_stack_align4 := -mpreferred-stack-boundary=2
388f918697SMatthias Kaehlcke      cc_stack_align8 := -mpreferred-stack-boundary=3
398f918697SMatthias Kaehlckeelse ifneq ($(call cc-option, -mstack-alignment=16),)
408f918697SMatthias Kaehlcke      cc_stack_align4 := -mstack-alignment=4
418f918697SMatthias Kaehlcke      cc_stack_align8 := -mstack-alignment=8
42d77698dfSMatthias Kaehlckeendif
43d77698dfSMatthias Kaehlcke
441c678da3SDavid Woodhouse# How to compile the 16-bit code.  Note we always compile for -march=i386;
451c678da3SDavid Woodhouse# that way we can complain to the user if the CPU is insufficient.
46156ff4a5SPeter ZijlstraREALMODE_CFLAGS	:= -m16 -g -Os -DDISABLE_BRANCH_PROFILING -D__DISABLE_EXPORTS \
471c678da3SDavid Woodhouse		   -Wall -Wstrict-prototypes -march=i386 -mregparm=3 \
481c678da3SDavid Woodhouse		   -fno-strict-aliasing -fomit-frame-pointer -fno-pic \
499fcb51c1SArnd Bergmann		   -mno-mmx -mno-sse $(call cc-option,-fcf-protection=none)
50032a2c4fSMatthias Kaehlcke
51685969e0SMasahiro YamadaREALMODE_CFLAGS += -ffreestanding
52893ab004SMasahiro YamadaREALMODE_CFLAGS += -fno-stack-protector
53989ceac7SNick DesaulniersREALMODE_CFLAGS += -Wno-address-of-packed-member
54989ceac7SNick DesaulniersREALMODE_CFLAGS += $(cc_stack_align4)
558abe7fc2SJohn MillikinREALMODE_CFLAGS += $(CLANG_FLAGS)
561c678da3SDavid Woodhouseexport REALMODE_CFLAGS
571c678da3SDavid Woodhouse
580a6ef376SSam Ravnborg# BITS is used as extension for files which are available in a 32 bit
590a6ef376SSam Ravnborg# and a 64 bit version to simplify shared Makefiles.
600a6ef376SSam Ravnborg# e.g.: obj-y += foo_$(BITS).o
610a6ef376SSam Ravnborgexport BITS
6274b469f2SSam Ravnborg
63b2c51106SAndy Lutomirski#
64b2c51106SAndy Lutomirski# Prevent GCC from generating any FP code by mistake.
65b2c51106SAndy Lutomirski#
66b2c51106SAndy Lutomirski# This must happen before we try the -mpreferred-stack-boundary, see:
67b2c51106SAndy Lutomirski#
68b2c51106SAndy Lutomirski#    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383
69b2c51106SAndy Lutomirski#
70989ceac7SNick DesaulniersKBUILD_CFLAGS += -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx
7109498135SMiguel OjedaKBUILD_RUSTFLAGS += -Ctarget-feature=-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-avx,-avx2
72b2c51106SAndy Lutomirski
73156ff4a5SPeter Zijlstraifeq ($(CONFIG_X86_KERNEL_IBT),y)
74156ff4a5SPeter Zijlstra#
75156ff4a5SPeter Zijlstra# Kernel IBT has S_CET.NOTRACK_EN=0, as such the compilers must not generate
76156ff4a5SPeter Zijlstra# NOTRACK prefixes. Current generation compilers unconditionally employ NOTRACK
77156ff4a5SPeter Zijlstra# for jump-tables, as such, disable jump-tables for now.
78156ff4a5SPeter Zijlstra#
79156ff4a5SPeter Zijlstra# (jump-tables are implicitly disabled by RETPOLINE)
80156ff4a5SPeter Zijlstra#
81156ff4a5SPeter Zijlstra#   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104816
82156ff4a5SPeter Zijlstra#
83156ff4a5SPeter ZijlstraKBUILD_CFLAGS += $(call cc-option,-fcf-protection=branch -fno-jump-tables)
84156ff4a5SPeter Zijlstraelse
85256b92afSBorislav PetkovKBUILD_CFLAGS += $(call cc-option,-fcf-protection=none)
86156ff4a5SPeter Zijlstraendif
87256b92afSBorislav Petkov
88d746d647SSam Ravnborgifeq ($(CONFIG_X86_32),y)
890a6ef376SSam Ravnborg        BITS := 32
908c6531f7SAndreas Herrmann        UTS_MACHINE := i386
914ba7e5cdSSam Ravnborg        CHECKFLAGS += -D__i386__
920a6ef376SSam Ravnborg
93989ceac7SNick Desaulniers        KBUILD_AFLAGS += -m32
94989ceac7SNick Desaulniers        KBUILD_CFLAGS += -m32
950a6ef376SSam Ravnborg
960a6ef376SSam Ravnborg        KBUILD_CFLAGS += -msoft-float -mregparm=3 -freg-struct-return
970a6ef376SSam Ravnborg
98484d90eeSAndrew Boie        # Never want PIC in a 32-bit kernel, prevent breakage with GCC built
99484d90eeSAndrew Boie        # with nonstandard options
100484d90eeSAndrew Boie        KBUILD_CFLAGS += -fno-pic
101484d90eeSAndrew Boie
102d77698dfSMatthias Kaehlcke        # Align the stack to the register width instead of using the default
103d77698dfSMatthias Kaehlcke        # alignment of 16 bytes. This reduces stack usage and the number of
104d77698dfSMatthias Kaehlcke        # alignment instructions.
105989ceac7SNick Desaulniers        KBUILD_CFLAGS += $(cc_stack_align4)
1060a6ef376SSam Ravnborg
1070a6ef376SSam Ravnborg        # CPU-specific tuning. Anything which can be shared with UML should go here.
108d8285639SMasahiro Yamada        include $(srctree)/arch/x86/Makefile_32.cpu
1090a6ef376SSam Ravnborg        KBUILD_CFLAGS += $(cflags-y)
1100a6ef376SSam Ravnborg
1110a6ef376SSam Ravnborg        # temporary until string.h is fixed
1120a6ef376SSam Ravnborg        KBUILD_CFLAGS += -ffreestanding
1133fb0fdb3SAndy Lutomirski
1143fb0fdb3SAndy Lutomirski	ifeq ($(CONFIG_STACKPROTECTOR),y)
1153fb0fdb3SAndy Lutomirski		ifeq ($(CONFIG_SMP),y)
1163fb0fdb3SAndy Lutomirski			KBUILD_CFLAGS += -mstack-protector-guard-reg=fs -mstack-protector-guard-symbol=__stack_chk_guard
1173fb0fdb3SAndy Lutomirski		else
1183fb0fdb3SAndy Lutomirski			KBUILD_CFLAGS += -mstack-protector-guard=global
1193fb0fdb3SAndy Lutomirski		endif
1203fb0fdb3SAndy Lutomirski	endif
1210a6ef376SSam Ravnborgelse
1220a6ef376SSam Ravnborg        BITS := 64
1230a6ef376SSam Ravnborg        UTS_MACHINE := x86_64
1241f2f01b1SLuc Van Oostenryck        CHECKFLAGS += -D__x86_64__
1250a6ef376SSam Ravnborg
1260a6ef376SSam Ravnborg        KBUILD_AFLAGS += -m64
1270a6ef376SSam Ravnborg        KBUILD_CFLAGS += -m64
1280a6ef376SSam Ravnborg
129be6cb027SIngo Molnar        # Align jump targets to 1 byte, not the default 16 bytes:
1302c4fd1acSMatthias Kaehlcke        KBUILD_CFLAGS += $(call cc-option,-falign-jumps=1)
131be6cb027SIngo Molnar
13252648e83SIngo Molnar        # Pack loops tightly as well:
1332c4fd1acSMatthias Kaehlcke        KBUILD_CFLAGS += $(call cc-option,-falign-loops=1)
13452648e83SIngo Molnar
1355c630089SRasmus Villemoes        # Don't autogenerate traditional x87 instructions
136989ceac7SNick Desaulniers        KBUILD_CFLAGS += -mno-80387
1378f2dd677SBehan Webster        KBUILD_CFLAGS += $(call cc-option,-mno-fp-ret-in-387)
1385551a34eSH. Peter Anvin
139d77698dfSMatthias Kaehlcke        # By default gcc and clang use a stack alignment of 16 bytes for x86.
140d77698dfSMatthias Kaehlcke        # However the standard kernel entry on x86-64 leaves the stack on an
141d77698dfSMatthias Kaehlcke        # 8-byte boundary. If the compiler isn't informed about the actual
142d77698dfSMatthias Kaehlcke        # alignment it will generate extra alignment instructions for the
143d77698dfSMatthias Kaehlcke        # default alignment which keep the stack *mis*aligned.
144d77698dfSMatthias Kaehlcke        # Furthermore an alignment to the register width reduces stack usage
145d77698dfSMatthias Kaehlcke        # and the number of alignment instructions.
146989ceac7SNick Desaulniers        KBUILD_CFLAGS += $(cc_stack_align8)
147d9b0cde9SH.J. Lu
148d9ee948dSH.J. Lu	# Use -mskip-rax-setup if supported.
149d9ee948dSH.J. Lu	KBUILD_CFLAGS += $(call cc-option,-mskip-rax-setup)
150d9ee948dSH.J. Lu
1510a6ef376SSam Ravnborg        # FIXME - should be integrated in Makefile.cpu (Makefile_32.cpu)
152989ceac7SNick Desaulniers        cflags-$(CONFIG_MK8)		+= -march=k8
153989ceac7SNick Desaulniers        cflags-$(CONFIG_MPSC)		+= -march=nocona
154989ceac7SNick Desaulniers        cflags-$(CONFIG_MCORE2)		+= -march=core2
155989ceac7SNick Desaulniers        cflags-$(CONFIG_MATOM)		+= -march=atom
156989ceac7SNick Desaulniers        cflags-$(CONFIG_GENERIC_CPU)	+= -mtune=generic
1570a6ef376SSam Ravnborg        KBUILD_CFLAGS += $(cflags-y)
1580a6ef376SSam Ravnborg
15909498135SMiguel Ojeda        rustflags-$(CONFIG_MK8)		+= -Ctarget-cpu=k8
16009498135SMiguel Ojeda        rustflags-$(CONFIG_MPSC)	+= -Ctarget-cpu=nocona
16109498135SMiguel Ojeda        rustflags-$(CONFIG_MCORE2)	+= -Ctarget-cpu=core2
16209498135SMiguel Ojeda        rustflags-$(CONFIG_MATOM)	+= -Ctarget-cpu=atom
16309498135SMiguel Ojeda        rustflags-$(CONFIG_GENERIC_CPU)	+= -Ztune-cpu=generic
16409498135SMiguel Ojeda        KBUILD_RUSTFLAGS += $(rustflags-y)
16509498135SMiguel Ojeda
1660a6ef376SSam Ravnborg        KBUILD_CFLAGS += -mno-red-zone
1670a6ef376SSam Ravnborg        KBUILD_CFLAGS += -mcmodel=kernel
16809498135SMiguel Ojeda        KBUILD_RUSTFLAGS += -Cno-redzone=y
16909498135SMiguel Ojeda        KBUILD_RUSTFLAGS += -Ccode-model=kernel
1705d707e9cSTejun Heoendif
1710a6ef376SSam Ravnborg
1723f135e57SJosh Poimboeuf#
1733f135e57SJosh Poimboeuf# If the function graph tracer is used with mcount instead of fentry,
1743f135e57SJosh Poimboeuf# '-maccumulate-outgoing-args' is needed to prevent a GCC bug
1753f135e57SJosh Poimboeuf# (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42109)
1763f135e57SJosh Poimboeuf#
1773f135e57SJosh Poimboeufifdef CONFIG_FUNCTION_GRAPH_TRACER
1783f135e57SJosh Poimboeuf  ifndef CONFIG_HAVE_FENTRY
1793f135e57SJosh Poimboeuf	ACCUMULATE_OUTGOING_ARGS := 1
1803f135e57SJosh Poimboeuf  endif
1813f135e57SJosh Poimboeufendif
1823f135e57SJosh Poimboeuf
1833f135e57SJosh Poimboeufifeq ($(ACCUMULATE_OUTGOING_ARGS), 1)
1844a1bec46SNick Desaulniers	# This compiler flag is not supported by Clang:
1854a1bec46SNick Desaulniers	KBUILD_CFLAGS += $(call cc-option,-maccumulate-outgoing-args,)
1863f135e57SJosh Poimboeufendif
1873f135e57SJosh Poimboeuf
18825dfeeb7SSam Ravnborg# Workaround for a gcc prelease that unfortunately was shipped in a suse release
18925dfeeb7SSam RavnborgKBUILD_CFLAGS += -Wno-sign-compare
19025dfeeb7SSam Ravnborg#
19125dfeeb7SSam RavnborgKBUILD_CFLAGS += -fno-asynchronous-unwind-tables
1920a6ef376SSam Ravnborg
19376b04384SDavid Woodhouse# Avoid indirect branches in kernel to deal with Spectre
19476b04384SDavid Woodhouseifdef CONFIG_RETPOLINE
1954cd24de3SZhenzhong Duan  KBUILD_CFLAGS += $(RETPOLINE_CFLAGS)
196ce02ef06SDaniel Borkmann  # Additionally, avoid generating expensive indirect jumps which
197ce02ef06SDaniel Borkmann  # are subject to retpolines for small number of switch cases.
198ce02ef06SDaniel Borkmann  # clang turns off jump table generation by default when under
199a9d57ef1SDaniel Borkmann  # retpoline builds, however, gcc does not for x86. This has
200a9d57ef1SDaniel Borkmann  # only been fixed starting from gcc stable version 8.4.0 and
201a9d57ef1SDaniel Borkmann  # onwards, but not for older ones. See gcc bug #86952.
202a9d57ef1SDaniel Borkmann  ifndef CONFIG_CC_IS_CLANG
203989ceac7SNick Desaulniers    KBUILD_CFLAGS += -fno-jump-tables
204a9d57ef1SDaniel Borkmann  endif
20576b04384SDavid Woodhouseendif
20676b04384SDavid Woodhouse
207e463a09aSPeter Zijlstraifdef CONFIG_SLS
208e463a09aSPeter Zijlstra  KBUILD_CFLAGS += -mharden-sls=all
209e463a09aSPeter Zijlstraendif
210e463a09aSPeter Zijlstra
211931ab636SPeter Zijlstraifdef CONFIG_CALL_PADDING
212bea75b33SThomas GleixnerPADDING_CFLAGS := -fpatchable-function-entry=$(CONFIG_FUNCTION_PADDING_BYTES),$(CONFIG_FUNCTION_PADDING_BYTES)
213bea75b33SThomas GleixnerKBUILD_CFLAGS += $(PADDING_CFLAGS)
214bea75b33SThomas Gleixnerexport PADDING_CFLAGS
215bea75b33SThomas Gleixnerendif
216bea75b33SThomas Gleixner
2170024430eSNathan ChancellorKBUILD_LDFLAGS += -m elf_$(UTS_MACHINE)
2180024430eSNathan Chancellor
2190024430eSNathan Chancellorifdef CONFIG_LTO_CLANG
220fccb3d3eSMasahiro Yamadaifeq ($(call test-lt, $(CONFIG_LLD_VERSION), 130000),y)
2212398ce80STor VicKBUILD_LDFLAGS	+= -plugin-opt=-stack-alignment=$(if $(CONFIG_X86_32),4,8)
2222398ce80STor Vicendif
2230024430eSNathan Chancellorendif
224587af649SArvind Sankar
225587af649SArvind Sankarifdef CONFIG_X86_NEED_RELOCS
226587af649SArvind SankarLDFLAGS_vmlinux := --emit-relocs --discard-none
227587af649SArvind Sankarelse
228587af649SArvind SankarLDFLAGS_vmlinux :=
229587af649SArvind Sankarendif
230587af649SArvind Sankar
231587af649SArvind Sankar#
232587af649SArvind Sankar# The 64-bit kernel must be aligned to 2MB.  Pass -z max-page-size=0x200000 to
233587af649SArvind Sankar# the linker to force 2MB page size regardless of the default page size used
234587af649SArvind Sankar# by the linker.
235587af649SArvind Sankar#
236587af649SArvind Sankarifdef CONFIG_X86_64
237587af649SArvind SankarLDFLAGS_vmlinux += -z max-page-size=0x200000
238587af649SArvind Sankarendif
239587af649SArvind Sankar
24083109d5dSKees Cook
2413ce9e53eSMichal Marekarchscripts: scripts_basic
2426520fe55SH. Peter Anvin	$(Q)$(MAKE) $(build)=arch/x86/tools relocs
2436520fe55SH. Peter Anvin
2440a6ef376SSam Ravnborg###
245303395acSH. Peter Anvin# Syscall table generation
246303395acSH. Peter Anvin
247303395acSH. Peter Anvinarchheaders:
2481f57d5d8SIngo Molnar	$(Q)$(MAKE) $(build)=arch/x86/entry/syscalls all
249303395acSH. Peter Anvin
250303395acSH. Peter Anvin###
2510a6ef376SSam Ravnborg# Kernel objects
2520a6ef376SSam Ravnborg
2530a6ef376SSam Ravnborglibs-y  += arch/x86/lib/
2540a6ef376SSam Ravnborg
2550a6ef376SSam Ravnborg# drivers-y are linked after core-y
2560a6ef376SSam Ravnborgdrivers-$(CONFIG_MATH_EMULATION) += arch/x86/math-emu/
2570a6ef376SSam Ravnborgdrivers-$(CONFIG_PCI)            += arch/x86/pci/
2580a6ef376SSam Ravnborg
259cf7700feSRafael J. Wysocki# suspend and hibernation support
2600a6ef376SSam Ravnborgdrivers-$(CONFIG_PM) += arch/x86/power/
261cf7700feSRafael J. Wysocki
2620a6ef376SSam Ravnborgdrivers-$(CONFIG_FB) += arch/x86/video/
2630a6ef376SSam Ravnborg
2640a6ef376SSam Ravnborg####
2650a6ef376SSam Ravnborg# boot loader support. Several targets are kept for legacy purposes
2660a6ef376SSam Ravnborg
2670a6ef376SSam Ravnborgboot := arch/x86/boot
2680a6ef376SSam Ravnborg
269f279b49fSH. Peter Anvin (Intel)BOOT_TARGETS = bzdisk fdimage fdimage144 fdimage288 hdimage isoimage
270f9c5107cSH. Peter Anvin
271f9c5107cSH. Peter AnvinPHONY += bzImage $(BOOT_TARGETS)
2720a6ef376SSam Ravnborg
2730a6ef376SSam Ravnborg# Default kernel to build
2740a6ef376SSam Ravnborgall: bzImage
2750a6ef376SSam Ravnborg
2760a6ef376SSam Ravnborg# KBUILD_IMAGE specify target image being built
2770a6ef376SSam RavnborgKBUILD_IMAGE := $(boot)/bzImage
2780a6ef376SSam Ravnborg
279f9c5107cSH. Peter AnvinbzImage: vmlinux
280ca0e9badSMasami Hiramatsuifeq ($(CONFIG_X86_DECODER_SELFTEST),y)
281ca0e9badSMasami Hiramatsu	$(Q)$(MAKE) $(build)=arch/x86/tools posttest
282ca0e9badSMasami Hiramatsuendif
2830a6ef376SSam Ravnborg	$(Q)$(MAKE) $(build)=$(boot) $(KBUILD_IMAGE)
2840a6ef376SSam Ravnborg	$(Q)mkdir -p $(objtree)/arch/$(UTS_MACHINE)/boot
28541b3eae6SJan Beulich	$(Q)ln -fsn ../../x86/boot/bzImage $(objtree)/arch/$(UTS_MACHINE)/boot/$@
2860a6ef376SSam Ravnborg
287f9c5107cSH. Peter Anvin$(BOOT_TARGETS): vmlinux
288f9c5107cSH. Peter Anvin	$(Q)$(MAKE) $(build)=$(boot) $@
2890a6ef376SSam Ravnborg
2906d61b8e6SMasahiro YamadaPHONY += install
2916d61b8e6SMasahiro Yamadainstall:
292f774f5bbSMasahiro Yamada	$(call cmd,install)
2931648e4f8SH. Peter Anvin
2940a6ef376SSam RavnborgPHONY += vdso_install
2950a6ef376SSam Ravnborgvdso_install:
296d603c8e1SIngo Molnar	$(Q)$(MAKE) $(build)=arch/x86/entry/vdso $@
2970a6ef376SSam Ravnborg
298829fe4aaSBen Hutchingsarchprepare: checkbin
299829fe4aaSBen Hutchingscheckbin:
30025896d07SMasahiro Yamadaifdef CONFIG_RETPOLINE
30125896d07SMasahiro Yamadaifeq ($(RETPOLINE_CFLAGS),)
30225896d07SMasahiro Yamada	@echo "You are building kernel with non-retpoline compiler." >&2
30325896d07SMasahiro Yamada	@echo "Please update your compiler." >&2
30425896d07SMasahiro Yamada	@false
30525896d07SMasahiro Yamadaendif
30625896d07SMasahiro Yamadaendif
307829fe4aaSBen Hutchings
308*b9f174c8SOmar Sandovalifdef CONFIG_UNWINDER_ORC
309*b9f174c8SOmar Sandovalorc_hash_h := arch/$(SRCARCH)/include/generated/asm/orc_hash.h
310*b9f174c8SOmar Sandovalorc_hash_sh := $(srctree)/scripts/orc_hash.sh
311*b9f174c8SOmar Sandovaltargets += $(orc_hash_h)
312*b9f174c8SOmar Sandovalquiet_cmd_orc_hash = GEN     $@
313*b9f174c8SOmar Sandoval      cmd_orc_hash = mkdir -p $(dir $@); \
314*b9f174c8SOmar Sandoval		     $(CONFIG_SHELL) $(orc_hash_sh) < $< > $@
315*b9f174c8SOmar Sandoval$(orc_hash_h): $(srctree)/arch/x86/include/asm/orc_types.h $(orc_hash_sh) FORCE
316*b9f174c8SOmar Sandoval	$(call if_changed,orc_hash)
317*b9f174c8SOmar Sandovalarchprepare: $(orc_hash_h)
318*b9f174c8SOmar Sandovalendif
319*b9f174c8SOmar Sandoval
3200a6ef376SSam Ravnborgarchclean:
3210a6ef376SSam Ravnborg	$(Q)rm -rf $(objtree)/arch/i386
3220a6ef376SSam Ravnborg	$(Q)rm -rf $(objtree)/arch/x86_64
3230a6ef376SSam Ravnborg
3240a6ef376SSam Ravnborgdefine archhelp
3250a6ef376SSam Ravnborg  echo  '* bzImage		- Compressed kernel image (arch/x86/boot/bzImage)'
326ac5d0887SBorislav Petkov  echo  '  install		- Install kernel using (your) ~/bin/$(INSTALLKERNEL) or'
327ac5d0887SBorislav Petkov  echo  '			  (distribution) /sbin/$(INSTALLKERNEL) or install to '
328ac5d0887SBorislav Petkov  echo  '			  $$(INSTALL_PATH) and run lilo'
329ac5d0887SBorislav Petkov  echo  ''
33037f30e21SAndi Kleen  echo  '  fdimage		- Create 1.4MB boot floppy image (arch/x86/boot/fdimage)'
33137f30e21SAndi Kleen  echo  '  fdimage144		- Create 1.4MB boot floppy image (arch/x86/boot/fdimage)'
33237f30e21SAndi Kleen  echo  '  fdimage288		- Create 2.8MB boot floppy image (arch/x86/boot/fdimage)'
333f279b49fSH. Peter Anvin (Intel)  echo  '  hdimage		- Create a BIOS/EFI hard disk image (arch/x86/boot/hdimage)'
33437f30e21SAndi Kleen  echo  '  isoimage		- Create a boot CD-ROM image (arch/x86/boot/image.iso)'
335f279b49fSH. Peter Anvin (Intel)  echo  '			  bzdisk/fdimage*/hdimage/isoimage also accept:'
33637f30e21SAndi Kleen  echo  '			  FDARGS="..."  arguments for the booted kernel'
33737f30e21SAndi Kleen  echo  '			  FDINITRD=file initrd for the booted kernel'
338ac5d0887SBorislav Petkov  echo  ''
339fbaf0aa8SBorislav Petkov  echo  '  kvm_guest.config	- Enable Kconfig items for running this kernel as a KVM guest'
340fbaf0aa8SBorislav Petkov  echo  '  xen.config		- Enable Kconfig items for running this kernel as a Xen guest'
3419b5a7f4aSDave Hansen  echo  '  x86_debug.config	- Enable tip tree debugging options for testing'
342fbaf0aa8SBorislav Petkov
3430a6ef376SSam Ravnborgendef
344