summaryrefslogtreecommitdiffstats
path: root/arch/ppc
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2020-04-22 15:37:32 +0900
committerSascha Hauer <s.hauer@pengutronix.de>2020-04-27 21:16:56 +0200
commitc6f95bc715c4dad2e189b8b6fcb29963c4cec1cd (patch)
treed8c443ba46336f13ffd84a7dc488f6338939783f /arch/ppc
parent331eecaa77074726cf7be045afad5eea5969f477 (diff)
downloadbarebox-c6f95bc715c4dad2e189b8b6fcb29963c4cec1cd.tar.gz
barebox-c6f95bc715c4dad2e189b8b6fcb29963c4cec1cd.tar.xz
kbuild: prefix compiler flag variables with KBUILD_
In old days, Linux also used to use well-known variables such CFLAGS, CPPFLAGS, etc. They were prefixed with KBUILD_ presumably for preventing users from overriding them accidentally. Rename as follows: CFLAGS -> KBUILD_CFLAGS AFLAGS -> KBUILD_AFLAGS CPPFLAGS -> KBUILD_CPPFLAGS LDFLAGS -> KBUILD_LDFLAGS HOSTCFLAGS -> KBUILD_HOSTCFLAGS HOSTCXXFLAGS -> KBUILD_HOSTCXXFLAGS HOSTLDFLAGS -> KBUILD_HOSTLDFLAGS HOST_LOADLIBES -> KBUILD_HOSTLDLIBS HOSTCFLAGS, HOSTCXXFLAGS, HOSTLDFLAGS, HOSTLDLIBS are re-used to allow users to pass-in additional flags to the host compiler. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/ppc')
-rw-r--r--arch/ppc/Makefile18
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/ppc/Makefile b/arch/ppc/Makefile
index 8b0c0b4758..ed5c749cd3 100644
--- a/arch/ppc/Makefile
+++ b/arch/ppc/Makefile
@@ -1,18 +1,18 @@
KBUILD_DEFCONFIG := p2020rdb_defconfig
-CPPFLAGS += -ffixed-r14 -m32 \
+KBUILD_CPPFLAGS += -ffixed-r14 -m32 \
-meabi -D __PPC__ -D CONFIG_PPC \
-fno-strict-aliasing
-CPPFLAGS += $(call cc-option,-mno-spe)
-CPPFLAGS += $(call cc-option,-mspe=no)
+KBUILD_CPPFLAGS += $(call cc-option,-mno-spe)
+KBUILD_CPPFLAGS += $(call cc-option,-mspe=no)
ifdef CONFIG_RELOCATABLE
-CPPFLAGS += -fPIC -mrelocatable
+KBUILD_CPPFLAGS += -fPIC -mrelocatable
endif
ifdef CONFIG_MPC85xx
-CPPFLAGS += -Wa,-me500x2 -msoft-float -mno-string
+KBUILD_CPPFLAGS += -Wa,-me500x2 -msoft-float -mno-string
endif
board-$(CONFIG_MACH_PHYCORE_MPC5200B_TINY) := pcm030
@@ -28,20 +28,20 @@ cpu-$(CONFIG_ARCH_MPC85XX) := 85xx
TEXT_BASE = $(CONFIG_TEXT_BASE)
-CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE)
+KBUILD_CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE)
# Add cleanup flags
ifndef CONFIG_MODULES
-CPPFLAGS += -fdata-sections -ffunction-sections
+KBUILD_CPPFLAGS += -fdata-sections -ffunction-sections
LDFLAGS_barebox += --gc-sections
endif
machdirs := $(patsubst %,arch/ppc/mach-%/,$(machine-y))
ifeq ($(KBUILD_SRC),)
-CPPFLAGS += $(patsubst %,-I%include,$(machdirs))
+KBUILD_CPPFLAGS += $(patsubst %,-I%include,$(machdirs))
else
-CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs))
+KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs))
endif
archprepare: maketools