From a1224cbda2227a10cc86bc7b1c0442df7015f26c Mon Sep 17 00:00:00 2001 From: Sedat Dilek Date: Mon, 4 Jan 2016 11:41:51 +0100 Subject: [PATCH 2/3] x86: llvmlinux: Use OPTIMIZATION_CFLAGS Signed-off-by: Sedat Dilek --- arch/x86/Makefile | 4 +++- arch/x86/purgatory/Makefile | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 5fa41ffe15e2..a88d0d490191 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -20,7 +20,9 @@ endif CODE16GCC_CFLAGS := -m32 -Wa,$(srctree)/arch/x86/boot/code16gcc.h M16_CFLAGS := $(call cc-option, -m16, $(CODE16GCC_CFLAGS)) -REALMODE_CFLAGS := $(M16_CFLAGS) -g -Os -D__KERNEL__ \ +OPTIMIZATION_CFLAGS := $(call cc-option,-Oz,-Os) + +REALMODE_CFLAGS := $(M16_CFLAGS) -g $(OPTIMIZATION_CFLAGS) -D__KERNEL__ \ -DDISABLE_BRANCH_PROFILING \ -Wall -Wstrict-prototypes -march=i386 -mregparm=3 \ -fno-strict-aliasing -fomit-frame-pointer -fno-pic \ diff --git a/arch/x86/purgatory/Makefile b/arch/x86/purgatory/Makefile index 2c835e356349..c9ffc07f9fa3 100644 --- a/arch/x86/purgatory/Makefile +++ b/arch/x86/purgatory/Makefile @@ -10,7 +10,9 @@ targets += purgatory.ro # in turn leaves some undefined symbols like __fentry__ in purgatory and not # sure how to relocate those. Like kexec-tools, use custom flags. -KBUILD_CFLAGS := -fno-strict-aliasing -Wall -Wstrict-prototypes -fno-zero-initialized-in-bss -fno-builtin -ffreestanding -c -MD -Os -mcmodel=large +OPTIMIZATION_CFLAGS := $(call cc-option,-Oz,-Os) + +KBUILD_CFLAGS := -fno-strict-aliasing -Wall -Wstrict-prototypes -fno-zero-initialized-in-bss -fno-builtin -ffreestanding -c -MD $(OPTIMIZATION_CFLAGS) -mcmodel=large KBUILD_CFLAGS += -m$(BITS) $(obj)/purgatory.ro: $(PURGATORY_OBJS) FORCE -- 2.6.4