Skip to content

Commit 63fea0a

Browse files
masahir0ysuryasaimadhu
authored andcommitted
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
1 parent 829889a commit 63fea0a

File tree

3 files changed

+0
-13
lines changed

3 files changed

+0
-13
lines changed

arch/powerpc/Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,10 +228,6 @@ KBUILD_CFLAGS += $(call cc-option,-mno-vsx)
228228
KBUILD_CFLAGS += $(call cc-option,-mno-spe)
229229
KBUILD_CFLAGS += $(call cc-option,-mspe=no)
230230

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-
235231
# FIXME: the module load should be taught about the additional relocs
236232
# generated by this.
237233
# revert to pre-gcc-4.4 behaviour of .eh_frame

arch/x86/Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,6 @@ else
130130

131131
KBUILD_CFLAGS += -mno-red-zone
132132
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)
137133
endif
138134

139135
ifdef CONFIG_X86_X32

arch/x86/Makefile.um

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ cflags-y += $(call cc-option,-mpreferred-stack-boundary=2)
2626
# an unresolved reference.
2727
cflags-y += -ffreestanding
2828

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-
3229
KBUILD_CFLAGS += $(cflags-y)
3330

3431
else
@@ -50,6 +47,4 @@ ELF_FORMAT := elf64-x86-64
5047
LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib64
5148
LINK-y += -m64
5249

53-
# Do unit-at-a-time unconditionally on x86_64, following the host
54-
KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)
5550
endif

0 commit comments

Comments
 (0)