Commit 8bce81db authored by Nicholas Piggin's avatar Nicholas Piggin Committed by Michael Ellerman

powerpc/boot: Clean up Makefile after cflags and asflags separation

Tidy pass over boot Makefile. Move variables together where possible.
Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230606064657.183969-5-npiggin@gmail.com
parent 54194a2f
...@@ -32,14 +32,6 @@ else ...@@ -32,14 +32,6 @@ else
BOOTAR := $(AR) BOOTAR := $(AR)
endif endif
BOOTCPPFLAGS := -nostdinc $(LINUXINCLUDE)
BOOTCPPFLAGS += -isystem $(shell $(BOOTCC) -print-file-name=include)
BOOTCFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -O2 -msoft-float -mno-altivec -mno-vsx \
$(call cc-option,-mno-spe) $(call cc-option,-mspe=no) \
-pipe -fomit-frame-pointer -fno-builtin -fPIC
ifdef CONFIG_PPC64_BOOT_WRAPPER ifdef CONFIG_PPC64_BOOT_WRAPPER
BOOTTARGETFLAGS += -m64 BOOTTARGETFLAGS += -m64
BOOTTARGETFLAGS += -mabi=elfv2 BOOTTARGETFLAGS += -mabi=elfv2
...@@ -76,15 +68,22 @@ else ...@@ -76,15 +68,22 @@ else
BOOTTARGETFLAGS += -mlittle-endian BOOTTARGETFLAGS += -mlittle-endian
endif endif
BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTTARGETFLAGS) -pipe BOOTCPPFLAGS := -nostdinc $(LINUXINCLUDE)
BOOTCPPFLAGS += -isystem $(shell $(BOOTCC) -print-file-name=include)
BOOTARFLAGS := -crD
BOOTCFLAGS += $(call cc-option,-mno-prefixed) \ BOOTCFLAGS := -pipe $(BOOTTARGETFLAGS) \
-Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -O2 \
-msoft-float -mno-altivec -mno-vsx \
$(call cc-option,-mno-prefixed) \
$(call cc-option,-mno-pcrel) \ $(call cc-option,-mno-pcrel) \
$(call cc-option,-mno-mma) $(call cc-option,-mno-mma) \
$(call cc-option,-mno-spe) $(call cc-option,-mspe=no) \
-fomit-frame-pointer -fno-builtin -fPIC
BOOTAFLAGS := -pipe $(BOOTTARGETFLAGS) -D__ASSEMBLY__
BOOTCFLAGS += $(BOOTTARGETFLAGS) BOOTARFLAGS := -crD
ifdef CONFIG_CC_IS_CLANG ifdef CONFIG_CC_IS_CLANG
BOOTCFLAGS += $(CLANG_FLAGS) BOOTCFLAGS += $(CLANG_FLAGS)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment