diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86_64/Makefile | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/arch/x86_64/Makefile b/arch/x86_64/Makefile index 585fd4a559c8..e573e2ab5510 100644 --- a/arch/x86_64/Makefile +++ b/arch/x86_64/Makefile | |||
@@ -24,37 +24,37 @@ | |||
24 | LDFLAGS := -m elf_x86_64 | 24 | LDFLAGS := -m elf_x86_64 |
25 | OBJCOPYFLAGS := -O binary -R .note -R .comment -S | 25 | OBJCOPYFLAGS := -O binary -R .note -R .comment -S |
26 | LDFLAGS_vmlinux := | 26 | LDFLAGS_vmlinux := |
27 | |||
28 | CHECKFLAGS += -D__x86_64__ -m64 | 27 | CHECKFLAGS += -D__x86_64__ -m64 |
29 | 28 | ||
29 | cflags-y := | ||
30 | cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8) | 30 | cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8) |
31 | cflags-$(CONFIG_MPSC) += $(call cc-option,-march=nocona) | 31 | cflags-$(CONFIG_MPSC) += $(call cc-option,-march=nocona) |
32 | cflags-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=generic) | 32 | cflags-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=generic) |
33 | CFLAGS += $(cflags-y) | ||
34 | 33 | ||
35 | CFLAGS += -m64 | 34 | cflags-y += -m64 |
36 | CFLAGS += -mno-red-zone | 35 | cflags-y += -mno-red-zone |
37 | CFLAGS += -mcmodel=kernel | 36 | cflags-y += -mcmodel=kernel |
38 | CFLAGS += -pipe | 37 | cflags-y += -pipe |
39 | cflags-$(CONFIG_REORDER) += -ffunction-sections | 38 | cflags-$(CONFIG_REORDER) += -ffunction-sections |
40 | # this makes reading assembly source easier, but produces worse code | 39 | # this makes reading assembly source easier, but produces worse code |
41 | # actually it makes the kernel smaller too. | 40 | # actually it makes the kernel smaller too. |
42 | CFLAGS += -fno-reorder-blocks | 41 | cflags-y += -fno-reorder-blocks |
43 | CFLAGS += -Wno-sign-compare | 42 | cflags-y += -Wno-sign-compare |
44 | ifneq ($(CONFIG_UNWIND_INFO),y) | 43 | ifneq ($(CONFIG_UNWIND_INFO),y) |
45 | CFLAGS += -fno-asynchronous-unwind-tables | 44 | cflags-y += -fno-asynchronous-unwind-tables |
46 | endif | 45 | endif |
47 | ifneq ($(CONFIG_DEBUG_INFO),y) | 46 | ifneq ($(CONFIG_DEBUG_INFO),y) |
48 | # -fweb shrinks the kernel a bit, but the difference is very small | 47 | # -fweb shrinks the kernel a bit, but the difference is very small |
49 | # it also messes up debugging, so don't use it for now. | 48 | # it also messes up debugging, so don't use it for now. |
50 | #CFLAGS += $(call cc-option,-fweb) | 49 | #cflags-y += $(call cc-option,-fweb) |
51 | endif | 50 | endif |
52 | # -funit-at-a-time shrinks the kernel .text considerably | 51 | # -funit-at-a-time shrinks the kernel .text considerably |
53 | # unfortunately it makes reading oopses harder. | 52 | # unfortunately it makes reading oopses harder. |
54 | CFLAGS += $(call cc-option,-funit-at-a-time) | 53 | cflags-y += $(call cc-option,-funit-at-a-time) |
55 | # prevent gcc from generating any FP code by mistake | 54 | # prevent gcc from generating any FP code by mistake |
56 | CFLAGS += $(call cc-option,-mno-sse -mno-mmx -mno-sse2 -mno-3dnow,) | 55 | cflags-y += $(call cc-option,-mno-sse -mno-mmx -mno-sse2 -mno-3dnow,) |
57 | 56 | ||
57 | CFLAGS += $(cflags-y) | ||
58 | AFLAGS += -m64 | 58 | AFLAGS += -m64 |
59 | 59 | ||
60 | head-y := arch/x86_64/kernel/head.o arch/x86_64/kernel/head64.o arch/x86_64/kernel/init_task.o | 60 | head-y := arch/x86_64/kernel/head.o arch/x86_64/kernel/head64.o arch/x86_64/kernel/init_task.o |