3 # This file is included by the global makefile so that you can add your own
4 # architecture-specific flags and dependencies. Remember to do have actions
5 # for "archclean" and "archdep" for cleaning up and making dependencies for
8 # This file is subject to the terms and conditions of the GNU General Public
9 # License. See the file "COPYING" in the main directory of this archive
12 # Copyright (C) 1994 by Linus Torvalds
14 # 19990713 Artur Skawina <skawina@geocities.com>
15 # Added '-march' and '-mpreferred-stack-boundary' support
16 # 20000913 Pavel Machek <pavel@suse.cz>
17 # Converted for x86_64 architecture
18 # 20010105 Andi Kleen, add IA32 compiler.
19 # ....and later removed it again....
20 # 20070816 Kevin Pedretti <ktpedre@sandia.gov>
21 # Modifications for Kitten. Remove unneeded stuff.
24 LDFLAGS := -m elf_x86_64
25 OBJCOPYFLAGS := -O binary -R .note -R .comment -S
27 CHECKFLAGS += -D__x86_64__ -m64
30 cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8)
31 cflags-$(CONFIG_MPSC) += $(call cc-option,-march=nocona)
32 cflags-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=generic)
35 cflags-y += -mno-red-zone
36 cflags-y += -mcmodel=kernel
38 cflags-y += -ffunction-sections
39 # this makes reading assembly source easier, but produces worse code
40 # actually it makes the kernel smaller too.
41 cflags-y += -fno-reorder-blocks
42 cflags-y += -Wno-sign-compare
43 cflags-y += -Wno-unused-parameter
44 # -funit-at-a-time shrinks the kernel .text considerably
45 # unfortunately it makes reading oopses harder.
46 cflags-y += $(call cc-option,-funit-at-a-time)
47 # prevent gcc from generating any FP code by mistake
48 cflags-y += $(call cc-option,-mno-sse -mno-mmx -mno-sse2 -mno-3dnow,)
53 head-y := arch/x86_64/kernel/head.o arch/x86_64/kernel/head64.o arch/x86_64/kernel/init_task.o
55 libs-y += arch/x86_64/lib/
56 core-y += arch/x86_64/kernel/ \
59 boot := arch/x86_64/boot
61 PHONY += bzImage archmrproper isoimage archclean
63 #Default target when executing "make"
66 BOOTIMAGE := arch/x86_64/boot/bzImage
67 KBUILD_IMAGE := $(BOOTIMAGE)
69 bzImage: vmlwk $(DEFAULT_EXTRA_TARGETS)
70 $(Q)$(MAKE) $(build)=$(boot) $(BOOTIMAGE)
72 isoimage: vmlwk $(DEFAULT_EXTRA_TARGETS)
73 $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) $@
76 $(Q)$(MAKE) $(clean)=$(boot)
79 echo '* bzImage - Compressed kernel image (arch/$(ARCH)/boot/bzImage)'
80 echo ' isoimage - Create a boot CD-ROM image'
83 CLEAN_FILES += arch/$(ARCH)/boot/image.iso