diff options
Diffstat (limited to 'arch/x86/Makefile')
| -rw-r--r-- | arch/x86/Makefile | 43 |
1 files changed, 10 insertions, 33 deletions
diff --git a/arch/x86/Makefile b/arch/x86/Makefile index d1a47adb5aec..1836191839ee 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile | |||
| @@ -70,14 +70,17 @@ else | |||
| 70 | # this works around some issues with generating unwind tables in older gccs | 70 | # this works around some issues with generating unwind tables in older gccs |
| 71 | # newer gccs do it by default | 71 | # newer gccs do it by default |
| 72 | KBUILD_CFLAGS += -maccumulate-outgoing-args | 72 | KBUILD_CFLAGS += -maccumulate-outgoing-args |
| 73 | endif | ||
| 73 | 74 | ||
| 74 | stackp := $(CONFIG_SHELL) $(srctree)/scripts/gcc-x86_64-has-stack-protector.sh | 75 | ifdef CONFIG_CC_STACKPROTECTOR |
| 75 | stackp-$(CONFIG_CC_STACKPROTECTOR) := $(shell $(stackp) \ | 76 | cc_has_sp := $(srctree)/scripts/gcc-x86_$(BITS)-has-stack-protector.sh |
| 76 | "$(CC)" -fstack-protector ) | 77 | ifeq ($(shell $(CONFIG_SHELL) $(cc_has_sp) $(CC)),y) |
| 77 | stackp-$(CONFIG_CC_STACKPROTECTOR_ALL) += $(shell $(stackp) \ | 78 | stackp-y := -fstack-protector |
| 78 | "$(CC)" -fstack-protector-all ) | 79 | stackp-$(CONFIG_CC_STACKPROTECTOR_ALL) += -fstack-protector-all |
| 79 | 80 | KBUILD_CFLAGS += $(stackp-y) | |
| 80 | KBUILD_CFLAGS += $(stackp-y) | 81 | else |
| 82 | $(warning stack protector enabled but no compiler support) | ||
| 83 | endif | ||
| 81 | endif | 84 | endif |
| 82 | 85 | ||
| 83 | # Stackpointer is addressed different for 32 bit and 64 bit x86 | 86 | # Stackpointer is addressed different for 32 bit and 64 bit x86 |
| @@ -102,29 +105,6 @@ KBUILD_CFLAGS += -fno-asynchronous-unwind-tables | |||
| 102 | # prevent gcc from generating any FP code by mistake | 105 | # prevent gcc from generating any FP code by mistake |
| 103 | KBUILD_CFLAGS += $(call cc-option,-mno-sse -mno-mmx -mno-sse2 -mno-3dnow,) | 106 | KBUILD_CFLAGS += $(call cc-option,-mno-sse -mno-mmx -mno-sse2 -mno-3dnow,) |
| 104 | 107 | ||
| 105 | ### | ||
| 106 | # Sub architecture support | ||
| 107 | # fcore-y is linked before mcore-y files. | ||
| 108 | |||
| 109 | # Default subarch .c files | ||
| 110 | mcore-y := arch/x86/mach-default/ | ||
| 111 | |||
| 112 | # Voyager subarch support | ||
| 113 | mflags-$(CONFIG_X86_VOYAGER) := -Iarch/x86/include/asm/mach-voyager | ||
| 114 | mcore-$(CONFIG_X86_VOYAGER) := arch/x86/mach-voyager/ | ||
| 115 | |||
| 116 | # generic subarchitecture | ||
| 117 | mflags-$(CONFIG_X86_GENERICARCH):= -Iarch/x86/include/asm/mach-generic | ||
| 118 | fcore-$(CONFIG_X86_GENERICARCH) += arch/x86/mach-generic/ | ||
| 119 | mcore-$(CONFIG_X86_GENERICARCH) := arch/x86/mach-default/ | ||
| 120 | |||
| 121 | # default subarch .h files | ||
| 122 | mflags-y += -Iarch/x86/include/asm/mach-default | ||
| 123 | |||
| 124 | # 64 bit does not support subarch support - clear sub arch variables | ||
| 125 | fcore-$(CONFIG_X86_64) := | ||
| 126 | mcore-$(CONFIG_X86_64) := | ||
| 127 | |||
| 128 | KBUILD_CFLAGS += $(mflags-y) | 108 | KBUILD_CFLAGS += $(mflags-y) |
| 129 | KBUILD_AFLAGS += $(mflags-y) | 109 | KBUILD_AFLAGS += $(mflags-y) |
| 130 | 110 | ||
| @@ -150,9 +130,6 @@ core-$(CONFIG_LGUEST_GUEST) += arch/x86/lguest/ | |||
| 150 | core-y += arch/x86/kernel/ | 130 | core-y += arch/x86/kernel/ |
| 151 | core-y += arch/x86/mm/ | 131 | core-y += arch/x86/mm/ |
| 152 | 132 | ||
| 153 | # Remaining sub architecture files | ||
| 154 | core-y += $(mcore-y) | ||
| 155 | |||
| 156 | core-y += arch/x86/crypto/ | 133 | core-y += arch/x86/crypto/ |
| 157 | core-y += arch/x86/vdso/ | 134 | core-y += arch/x86/vdso/ |
| 158 | core-$(CONFIG_IA32_EMULATION) += arch/x86/ia32/ | 135 | core-$(CONFIG_IA32_EMULATION) += arch/x86/ia32/ |
