diff options
Diffstat (limited to 'arch/x86_64/Makefile')
-rw-r--r-- | arch/x86_64/Makefile | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/x86_64/Makefile b/arch/x86_64/Makefile index 1c0f18d4f887..b471b8550d03 100644 --- a/arch/x86_64/Makefile +++ b/arch/x86_64/Makefile | |||
@@ -30,6 +30,10 @@ cflags-y := | |||
30 | cflags-kernel-y := | 30 | cflags-kernel-y := |
31 | cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8) | 31 | cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8) |
32 | cflags-$(CONFIG_MPSC) += $(call cc-option,-march=nocona) | 32 | cflags-$(CONFIG_MPSC) += $(call cc-option,-march=nocona) |
33 | # gcc doesn't support -march=core2 yet as of gcc 4.3, but I hope it | ||
34 | # will eventually. Use -mtune=generic as fallback | ||
35 | cflags-$(CONFIG_MCORE2) += \ | ||
36 | $(call cc-option,-march=core2,$(call cc-option,-mtune=generic)) | ||
33 | cflags-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=generic) | 37 | cflags-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=generic) |
34 | 38 | ||
35 | cflags-y += -m64 | 39 | cflags-y += -m64 |
@@ -54,6 +58,10 @@ endif | |||
54 | cflags-y += $(call cc-option,-funit-at-a-time) | 58 | cflags-y += $(call cc-option,-funit-at-a-time) |
55 | # prevent gcc from generating any FP code by mistake | 59 | # prevent gcc from generating any FP code by mistake |
56 | cflags-y += $(call cc-option,-mno-sse -mno-mmx -mno-sse2 -mno-3dnow,) | 60 | cflags-y += $(call cc-option,-mno-sse -mno-mmx -mno-sse2 -mno-3dnow,) |
61 | # this works around some issues with generating unwind tables in older gccs | ||
62 | # newer gccs do it by default | ||
63 | cflags-y += -maccumulate-outgoing-args | ||
64 | |||
57 | # do binutils support CFI? | 65 | # do binutils support CFI? |
58 | cflags-y += $(call as-instr,.cfi_startproc\n.cfi_endproc,-DCONFIG_AS_CFI=1,) | 66 | cflags-y += $(call as-instr,.cfi_startproc\n.cfi_endproc,-DCONFIG_AS_CFI=1,) |
59 | AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_endproc,-DCONFIG_AS_CFI=1,) | 67 | AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_endproc,-DCONFIG_AS_CFI=1,) |
@@ -62,8 +70,8 @@ AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_endproc,-DCONFIG_AS_CFI=1,) | |||
62 | cflags-y += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) | 70 | cflags-y += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) |
63 | AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) | 71 | AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) |
64 | 72 | ||
65 | cflags-$(CONFIG_CC_STACKPROTECTOR) += $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-x86_64-has-stack-protector.sh $(CC) -fstack-protector ) | 73 | cflags-$(CONFIG_CC_STACKPROTECTOR) += $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-x86_64-has-stack-protector.sh "$(CC)" -fstack-protector ) |
66 | cflags-$(CONFIG_CC_STACKPROTECTOR_ALL) += $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-x86_64-has-stack-protector.sh $(CC) -fstack-protector-all ) | 74 | cflags-$(CONFIG_CC_STACKPROTECTOR_ALL) += $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-x86_64-has-stack-protector.sh "$(CC)" -fstack-protector-all ) |
67 | 75 | ||
68 | CFLAGS += $(cflags-y) | 76 | CFLAGS += $(cflags-y) |
69 | CFLAGS_KERNEL += $(cflags-kernel-y) | 77 | CFLAGS_KERNEL += $(cflags-kernel-y) |