Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <yamada.masahiro@socionext.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Richard Weinberger <richard@sigma-star.at>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: x86-ml <x86@kernel.org>
Link: https://lkml.kernel.org/r/1541990120-9643-3-git-send-email-yamada.masahiro@socionext.com

authored by

Masahiro Yamada and committed by
Borislav Petkov
63fea0af 829889ac

-13
-4
arch/powerpc/Makefile
··· 228 228 KBUILD_CFLAGS += $(call cc-option,-mno-spe) 229 229 KBUILD_CFLAGS += $(call cc-option,-mspe=no) 230 230 231 - # Enable unit-at-a-time mode when possible. It shrinks the 232 - # kernel considerably. 233 - KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time) 234 - 235 231 # FIXME: the module load should be taught about the additional relocs 236 232 # generated by this. 237 233 # revert to pre-gcc-4.4 behaviour of .eh_frame
-4
arch/x86/Makefile
··· 130 130 131 131 KBUILD_CFLAGS += -mno-red-zone 132 132 KBUILD_CFLAGS += -mcmodel=kernel 133 - 134 - # -funit-at-a-time shrinks the kernel .text considerably 135 - # unfortunately it makes reading oopses harder. 136 - KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time) 137 133 endif 138 134 139 135 ifdef CONFIG_X86_X32
-5
arch/x86/Makefile.um
··· 26 26 # an unresolved reference. 27 27 cflags-y += -ffreestanding 28 28 29 - # gcc 4.3.0 needs -funit-at-a-time for extern inline functions. 30 - KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time) 31 - 32 29 KBUILD_CFLAGS += $(cflags-y) 33 30 34 31 else ··· 47 50 LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib64 48 51 LINK-y += -m64 49 52 50 - # Do unit-at-a-time unconditionally on x86_64, following the host 51 - KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time) 52 53 endif