summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/Makefile
diff options
context:
space:
mode:
authorChristophe Leroy2018-05-28 08:08:34 +0200
committerMichael Ellerman2018-06-03 16:39:20 +0200
commit1c38976334c0efce1b285369a6037f205e196299 (patch)
tree6c976da4bc1f36d222062e82fbf97fc14af0b2f1 /arch/powerpc/Makefile
parentpowerpc: Implement csum_ipv6_magic in assembly (diff)
downloadkernel-qcow2-linux-1c38976334c0efce1b285369a6037f205e196299.tar.gz
kernel-qcow2-linux-1c38976334c0efce1b285369a6037f205e196299.tar.xz
kernel-qcow2-linux-1c38976334c0efce1b285369a6037f205e196299.zip
powerpc/Makefile: set -mcpu=860 flag for the 8xx
When compiled with GCC 8.1, vmlinux is significantly bigger than with GCC 4.8. When looking at the generated code with objdump, we notice that all functions and loops when a 16 bytes alignment. This significantly increases the size of the kernel. It is pointless and even counterproductive as on the 8xx 'nop' also consumes one clock cycle. Size of vmlinux with GCC 4.8: text data bss dec hex filename 5801948 1626076 457796 7885820 7853fc vmlinux Size of vmlinux with GCC 8.1: text data bss dec hex filename 6764592 1630652 456476 8851720 871108 vmlinux Size of vmlinux with GCC 8.1 and this patch: text data bss dec hex filename 6331544 1631756 456476 8419776 8079c0 vmlinux Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/Makefile')
-rw-r--r--arch/powerpc/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 6faf1d6ad9dd..9b52e42e581b 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -181,6 +181,7 @@ CFLAGS-$(CONFIG_POWER6_CPU) += $(call cc-option,-mcpu=power6)
CFLAGS-$(CONFIG_POWER7_CPU) += $(call cc-option,-mcpu=power7)
CFLAGS-$(CONFIG_POWER8_CPU) += $(call cc-option,-mcpu=power8)
CFLAGS-$(CONFIG_POWER9_CPU) += $(call cc-option,-mcpu=power9)
+CFLAGS-$(CONFIG_PPC_8xx) += $(call cc-option,-mcpu=860)
# Altivec option not allowed with e500mc64 in GCC.
ifeq ($(CONFIG_ALTIVEC),y)