diff options
-rw-r--r-- | arch/um/Makefile | 1 | ||||
-rw-r--r-- | arch/um/Makefile-i386 | 7 | ||||
-rw-r--r-- | arch/um/Makefile-x86_64 | 3 |
3 files changed, 10 insertions, 1 deletions
diff --git a/arch/um/Makefile b/arch/um/Makefile index dbeab15e7bb7..ca40397017b9 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile | |||
@@ -77,7 +77,6 @@ include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS) | |||
77 | KERNEL_DEFINES = $(strip -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask \ | 77 | KERNEL_DEFINES = $(strip -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask \ |
78 | -Dmktime=kernel_mktime $(ARCH_KERNEL_DEFINES)) | 78 | -Dmktime=kernel_mktime $(ARCH_KERNEL_DEFINES)) |
79 | KBUILD_CFLAGS += $(KERNEL_DEFINES) | 79 | KBUILD_CFLAGS += $(KERNEL_DEFINES) |
80 | KBUILD_CFLAGS += $(call cc-option,-fno-unit-at-a-time,) | ||
81 | 80 | ||
82 | PHONY += linux | 81 | PHONY += linux |
83 | 82 | ||
diff --git a/arch/um/Makefile-i386 b/arch/um/Makefile-i386 index 561e373bd850..302cbe504543 100644 --- a/arch/um/Makefile-i386 +++ b/arch/um/Makefile-i386 | |||
@@ -32,4 +32,11 @@ cflags-y += $(call cc-option,-mpreferred-stack-boundary=2) | |||
32 | # an unresolved reference. | 32 | # an unresolved reference. |
33 | cflags-y += -ffreestanding | 33 | cflags-y += -ffreestanding |
34 | 34 | ||
35 | # Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use | ||
36 | # a lot more stack due to the lack of sharing of stacklots. Also, gcc | ||
37 | # 4.3.0 needs -funit-at-a-time for extern inline functions. | ||
38 | KBUILD_CFLAGS += $(shell if [ $(call cc-version) -lt 0400 ] ; then \ | ||
39 | echo $(call cc-option,-fno-unit-at-a-time); \ | ||
40 | else echo $(call cc-option,-funit-at-a-time); fi ;) | ||
41 | |||
35 | KBUILD_CFLAGS += $(cflags-y) | 42 | KBUILD_CFLAGS += $(cflags-y) |
diff --git a/arch/um/Makefile-x86_64 b/arch/um/Makefile-x86_64 index 8ed362f93582..a9cd7e77a7ab 100644 --- a/arch/um/Makefile-x86_64 +++ b/arch/um/Makefile-x86_64 | |||
@@ -21,3 +21,6 @@ HEADER_ARCH := x86 | |||
21 | 21 | ||
22 | LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib64 | 22 | LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib64 |
23 | LINK-y += -m64 | 23 | LINK-y += -m64 |
24 | |||
25 | # Do unit-at-a-time unconditionally on x86_64, following the host | ||
26 | KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time) | ||