From 829889ac4a7d26858860c297e64051bd27ce8fbe Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Mon, 12 Nov 2018 11:35:19 +0900 Subject: x86/um: Remove -fno-unit-at-a-time workaround for pre-4.0 GCC Commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6") bumped the minimum GCC version to 4.6 for all architectures. '$(call cc-option,-fno-unit-at-a-time)' is now dead code since '$(cc-version) -lt 0400' is always false. Remove it. Signed-off-by: Masahiro Yamada Signed-off-by: Borislav Petkov Acked-by: Richard Weinberger Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Michael Ellerman Cc: Thomas Gleixner Cc: linuxppc-dev@lists.ozlabs.org Cc: x86-ml Link: https://lkml.kernel.org/r/1541990120-9643-2-git-send-email-yamada.masahiro@socionext.com --- arch/x86/Makefile.um | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'arch/x86') diff --git a/arch/x86/Makefile.um b/arch/x86/Makefile.um index 91085a08de6c..577976b7d1f8 100644 --- a/arch/x86/Makefile.um +++ b/arch/x86/Makefile.um @@ -26,12 +26,8 @@ cflags-y += $(call cc-option,-mpreferred-stack-boundary=2) # an unresolved reference. cflags-y += -ffreestanding -# Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use -# a lot more stack due to the lack of sharing of stacklots. Also, gcc -# 4.3.0 needs -funit-at-a-time for extern inline functions. -KBUILD_CFLAGS += $(shell if [ $(cc-version) -lt 0400 ] ; then \ - echo $(call cc-option,-fno-unit-at-a-time); \ - else echo $(call cc-option,-funit-at-a-time); fi ;) +# gcc 4.3.0 needs -funit-at-a-time for extern inline functions. +KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time) KBUILD_CFLAGS += $(cflags-y) -- cgit 1.4.1 From 63fea0af43af5beb3779fd2cae078d5d77b4bb11 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Mon, 12 Nov 2018 11:35:20 +0900 Subject: x86, powerpc: Remove -funit-at-a-time compiler option entirely GCC 4.6 manual says: -funit-at-a-time This option is left for compatibility reasons. -funit-at-a-time has no effect, while -fno-unit-at-a-time implies -fno-toplevel-reorder and -fno-section-anchors. Enabled by default. Remove it. Signed-off-by: Masahiro Yamada Signed-off-by: Borislav Petkov Acked-by: Ingo Molnar Acked-by: Michael Ellerman Cc: "H. Peter Anvin" Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Richard Weinberger Cc: Thomas Gleixner Cc: linuxppc-dev@lists.ozlabs.org Cc: x86-ml Link: https://lkml.kernel.org/r/1541990120-9643-3-git-send-email-yamada.masahiro@socionext.com --- arch/powerpc/Makefile | 4 ---- arch/x86/Makefile | 4 ---- arch/x86/Makefile.um | 5 ----- 3 files changed, 13 deletions(-) (limited to 'arch/x86') diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 8a2ce14d68d0..854199c9ab7e 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile @@ -228,10 +228,6 @@ KBUILD_CFLAGS += $(call cc-option,-mno-vsx) KBUILD_CFLAGS += $(call cc-option,-mno-spe) KBUILD_CFLAGS += $(call cc-option,-mspe=no) -# Enable unit-at-a-time mode when possible. It shrinks the -# kernel considerably. -KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time) - # FIXME: the module load should be taught about the additional relocs # generated by this. # revert to pre-gcc-4.4 behaviour of .eh_frame diff --git a/arch/x86/Makefile b/arch/x86/Makefile index f5d7f4134524..58d82e9dc36d 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -130,10 +130,6 @@ else KBUILD_CFLAGS += -mno-red-zone KBUILD_CFLAGS += -mcmodel=kernel - - # -funit-at-a-time shrinks the kernel .text considerably - # unfortunately it makes reading oopses harder. - KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time) endif ifdef CONFIG_X86_X32 diff --git a/arch/x86/Makefile.um b/arch/x86/Makefile.um index 577976b7d1f8..1db7913795f5 100644 --- a/arch/x86/Makefile.um +++ b/arch/x86/Makefile.um @@ -26,9 +26,6 @@ cflags-y += $(call cc-option,-mpreferred-stack-boundary=2) # an unresolved reference. cflags-y += -ffreestanding -# gcc 4.3.0 needs -funit-at-a-time for extern inline functions. -KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time) - KBUILD_CFLAGS += $(cflags-y) else @@ -50,6 +47,4 @@ ELF_FORMAT := elf64-x86-64 LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib64 LINK-y += -m64 -# Do unit-at-a-time unconditionally on x86_64, following the host -KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time) endif -- cgit 1.4.1 From e4f752dda0de351efd198f438b68e743029da68a Mon Sep 17 00:00:00 2001 From: Nick Desaulniers Date: Mon, 10 Dec 2018 14:27:16 -0800 Subject: x86/um/vdso: Drop implicit common-page-size linker flag GNU linker's -z common-page-size's default value is based on the target architecture. arch/x86/um/vdso/Makefile sets it to the architecture default, which is implicit and redundant. Drop it so that one more LLVM build issue gets addressed. Signed-off-by: Nick Desaulniers Signed-off-by: Borislav Petkov Acked-by: Richard Weinberger Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jeff Dike Cc: Masahiro Yamada Cc: Thomas Gleixner Cc: linux-um@lists.infradead.org Cc: x86-ml Link: https://lkml.kernel.org/r/20181206191231.192355-1-ndesaulniers@google.com --- arch/x86/um/vdso/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/x86') diff --git a/arch/x86/um/vdso/Makefile b/arch/x86/um/vdso/Makefile index 822ccdba93ad..bf94060fc06f 100644 --- a/arch/x86/um/vdso/Makefile +++ b/arch/x86/um/vdso/Makefile @@ -26,7 +26,7 @@ targets += vdso.so vdso.so.dbg vdso.lds $(vobjs-y) CPPFLAGS_vdso.lds += -P -C VDSO_LDFLAGS_vdso.lds = -m64 -Wl,-soname=linux-vdso.so.1 \ - -Wl,-z,max-page-size=4096 -Wl,-z,common-page-size=4096 + -Wl,-z,max-page-size=4096 $(obj)/vdso.o: $(src)/vdso.S $(obj)/vdso.so -- cgit 1.4.1