diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2023-06-06 16:46:55 +1000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2023-06-14 12:46:41 +1000 |
commit | d1b7d40d4ffa02d59e72abf31ee2119778c6673e (patch) | |
tree | 577790d65605cb6ba65f7341cd8bd4abdd5f8155 /arch/powerpc/boot | |
parent | 689d592e406983debe919acb87855cab0f25b7bc (diff) |
powerpc/boot: Separate CPP flags from BOOTCFLAGS
Add BOOTCPPFLAGS variable for the CPP options required by C and AS.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230606064657.183969-3-npiggin@gmail.com
Diffstat (limited to 'arch/powerpc/boot')
-rw-r--r-- | arch/powerpc/boot/Makefile | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index ae80f7f1774e..9445ec442512 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -32,11 +32,13 @@ else BOOTAR := $(AR) 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 -nostdinc \ - $(LINUXINCLUDE) + -pipe -fomit-frame-pointer -fno-builtin -fPIC ifdef CONFIG_PPC64_BOOT_WRAPPER BOOTTARGETFLAGS += -m64 @@ -68,15 +70,13 @@ $(obj)/treeboot-iss4xx.o: BOOTTARGETFLAGS += -mcpu=405 $(obj)/treeboot-currituck.o: BOOTTARGETFLAGS += -mcpu=405 $(obj)/treeboot-akebono.o: BOOTTARGETFLAGS += -mcpu=405 -BOOTCFLAGS += -isystem $(shell $(BOOTCC) -print-file-name=include) - ifdef CONFIG_CPU_BIG_ENDIAN BOOTTARGETFLAGS += -mbig-endian else BOOTTARGETFLAGS += -mlittle-endian endif -BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTTARGETFLAGS) $(BOOTCFLAGS) -nostdinc +BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTTARGETFLAGS) $(BOOTCFLAGS) BOOTARFLAGS := -crD @@ -227,10 +227,10 @@ clean-files := $(zlib-) $(zlibheader-) $(zliblinuxheader-) \ empty.c zImage.coff.lds zImage.ps3.lds zImage.lds quiet_cmd_bootcc = BOOTCC $@ - cmd_bootcc = $(BOOTCC) -Wp,-MD,$(depfile) $(BOOTCFLAGS) -c -o $@ $< + cmd_bootcc = $(BOOTCC) -Wp,-MD,$(depfile) $(BOOTCPPFLAGS) $(BOOTCFLAGS) -c -o $@ $< quiet_cmd_bootas = BOOTAS $@ - cmd_bootas = $(BOOTCC) -Wp,-MD,$(depfile) $(BOOTAFLAGS) -c -o $@ $< + cmd_bootas = $(BOOTCC) -Wp,-MD,$(depfile) $(BOOTCPPFLAGS) $(BOOTAFLAGS) -c -o $@ $< quiet_cmd_bootar = BOOTAR $@ cmd_bootar = $(BOOTAR) $(BOOTARFLAGS) $@.$$$$ $(real-prereqs); mv $@.$$$$ $@ |