summaryrefslogtreecommitdiffstats
path: root/arch/sandbox
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/sandbox
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/sandbox')
-rw-r--r--arch/sandbox/Makefile10
-rw-r--r--arch/sandbox/os/Makefile8
2 files changed, 9 insertions, 9 deletions
diff --git a/arch/sandbox/Makefile b/arch/sandbox/Makefile
index b7470c3330..c205f47ff4 100644
--- a/arch/sandbox/Makefile
+++ b/arch/sandbox/Makefile
@@ -1,6 +1,6 @@
KBUILD_DEFCONFIG := sandbox_defconfig
-CPPFLAGS += -D__SANDBOX__ -fno-strict-aliasing -fvisibility=hidden
+KBUILD_CPPFLAGS += -D__SANDBOX__ -fno-strict-aliasing -fvisibility=hidden
machine-y := sandbox
@@ -11,7 +11,7 @@ lds-y := $(BOARD)/barebox.lds
TEXT_BASE = $(CONFIG_TEXT_BASE)
-CFLAGS += -Dmalloc=barebox_malloc -Dcalloc=barebox_calloc \
+KBUILD_CFLAGS += -Dmalloc=barebox_malloc -Dcalloc=barebox_calloc \
-Dfree=barebox_free -Drealloc=barebox_realloc \
-Dread=barebox_read -Dwrite=barebox_write \
-Dopen=barebox_open -Dclose=barebox_close \
@@ -30,9 +30,9 @@ CFLAGS += -Dmalloc=barebox_malloc -Dcalloc=barebox_calloc \
machdirs := $(patsubst %,arch/sandbox/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
@@ -48,7 +48,7 @@ FTDI1_LIBS := $(shell pkg-config libftdi1 --libs)
endif
ifeq ($(CONFIG_KASAN),y)
-CPPFLAGS += -fsanitize=address
+KBUILD_CPPFLAGS += -fsanitize=address
SANITIZER_LIBS += -fsanitize=address
endif
diff --git a/arch/sandbox/os/Makefile b/arch/sandbox/os/Makefile
index 75baa34a83..40306b5ffe 100644
--- a/arch/sandbox/os/Makefile
+++ b/arch/sandbox/os/Makefile
@@ -3,14 +3,14 @@ machine-y := sandbox
machdirs := $(patsubst %,arch/sandbox/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
-CPPFLAGS += -DCONFIG_MALLOC_SIZE=$(CONFIG_MALLOC_SIZE)
+KBUILD_CPPFLAGS += -DCONFIG_MALLOC_SIZE=$(CONFIG_MALLOC_SIZE)
-CFLAGS := -Wall
+KBUILD_CFLAGS := -Wall
NOSTDINC_FLAGS :=
obj-y = common.o tap.o