summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2020-05-19 16:13:45 +0900
committerSascha Hauer <s.hauer@pengutronix.de>2020-05-20 13:16:56 +0200
commitff047395b9746aee1fe24e9c3f122c3706e72781 (patch)
treea8718b43f9d97c8bd0ad9a351ce23e35d5840851
parentc6aea1e9a377de5e67ce5c71d7487525af633a0b (diff)
downloadbarebox-ff047395b9746aee1fe24e9c3f122c3706e72781.tar.gz
kbuild: rename pbl object pbl-*.o to *.pbl.o
Currently, pbl objects are output to: <directory-path>/pbl-<basename>.o This commit changes as follows: <directory-path>/<basename>.pbl.o The motivation is not only to get rid of the ugly code introduced by commit 257abdaa36c8 ("Do not rm the path from pbl-y target"), but also to make it easier to remove obj-dtb-y, pbl-dtb-y, lwl-dtb-y syntax in the next commit. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--arch/arm/boards/nvidia-beaver/Makefile2
-rw-r--r--arch/arm/boards/nvidia-jetson-tk1/Makefile2
-rw-r--r--arch/arm/boards/toradex-colibri-t20/Makefile2
-rw-r--r--arch/arm/boards/toshiba-ac100/Makefile2
-rw-r--r--arch/arm/cpu/Makefile12
-rw-r--r--arch/arm/mach-tegra/Makefile2
-rw-r--r--lib/Makefile5
-rw-r--r--scripts/Makefile.build4
-rw-r--r--scripts/Makefile.lib4
9 files changed, 17 insertions, 18 deletions
diff --git a/arch/arm/boards/nvidia-beaver/Makefile b/arch/arm/boards/nvidia-beaver/Makefile
index f0eb7b2..1b90eb1 100644
--- a/arch/arm/boards/nvidia-beaver/Makefile
+++ b/arch/arm/boards/nvidia-beaver/Makefile
@@ -1,4 +1,4 @@
-CFLAGS_pbl-entry.o := -mcpu=arm7tdmi -march=armv4t
+CFLAGS_entry.pbl.o := -mcpu=arm7tdmi -march=armv4t
soc := tegra30
lwl-y += entry.o
obj-y += board.o
diff --git a/arch/arm/boards/nvidia-jetson-tk1/Makefile b/arch/arm/boards/nvidia-jetson-tk1/Makefile
index 5487f02..d38001c 100644
--- a/arch/arm/boards/nvidia-jetson-tk1/Makefile
+++ b/arch/arm/boards/nvidia-jetson-tk1/Makefile
@@ -1,4 +1,4 @@
-CFLAGS_pbl-entry.o := -mcpu=arm7tdmi -march=armv4t
+CFLAGS_entry.pbl.o := -mcpu=arm7tdmi -march=armv4t
soc := tegra124
lwl-y += entry.o
obj-y += board.o
diff --git a/arch/arm/boards/toradex-colibri-t20/Makefile b/arch/arm/boards/toradex-colibri-t20/Makefile
index 644a8e5..cdce48d 100644
--- a/arch/arm/boards/toradex-colibri-t20/Makefile
+++ b/arch/arm/boards/toradex-colibri-t20/Makefile
@@ -1,4 +1,4 @@
-CFLAGS_pbl-entry.o := -mcpu=arm7tdmi -march=armv4t
+CFLAGS_entry.pbl.o := -mcpu=arm7tdmi -march=armv4t
soc := tegra20
lwl-y += entry.o
obj-y += board.o
diff --git a/arch/arm/boards/toshiba-ac100/Makefile b/arch/arm/boards/toshiba-ac100/Makefile
index 4ef18c0..e8158cb 100644
--- a/arch/arm/boards/toshiba-ac100/Makefile
+++ b/arch/arm/boards/toshiba-ac100/Makefile
@@ -1,3 +1,3 @@
-CFLAGS_pbl-entry.o := -mcpu=arm7tdmi -march=armv4t
+CFLAGS_entry.pbl.o := -mcpu=arm7tdmi -march=armv4t
lwl-y += entry.o
obj-y += board.o
diff --git a/arch/arm/cpu/Makefile b/arch/arm/cpu/Makefile
index 63cf35c..f7f9c30 100644
--- a/arch/arm/cpu/Makefile
+++ b/arch/arm/cpu/Makefile
@@ -6,7 +6,7 @@ obj-pbl-y += lowlevel$(S64).o
obj-pbl-$(CONFIG_MMU) += mmu-early$(S64).o
obj-pbl-$(CONFIG_CPU_32v7) += hyp.o
AFLAGS_hyp.o :=-Wa,-march=armv7-a -Wa,-mcpu=all
-AFLAGS_pbl-hyp.o :=-Wa,-march=armv7-a -Wa,-mcpu=all
+AFLAGS_hyp.pbl.o :=-Wa,-march=armv7-a -Wa,-mcpu=all
obj-y += start.o entry.o entry_ll$(S64).o
@@ -32,20 +32,20 @@ obj-$(CONFIG_ARM_PSCI) += psci.o
obj-$(CONFIG_ARM_PSCI_OF) += psci-of.o
obj-pbl-$(CONFIG_ARM_SMCCC) += smccc-call$(S64).o
AFLAGS_smccc-call$(S64).o :=-Wa,-march=armv$(if $(S64),8,7)-a
-AFLAGS_pbl-smccc-call$(S64).o :=-Wa,-march=armv$(if $(S64),8,7)-a
+AFLAGS_smccc-call$(S64).pbl.o :=-Wa,-march=armv$(if $(S64),8,7)-a
obj-$(CONFIG_ARM_SECURE_MONITOR) += sm.o sm_as.o
AFLAGS_sm_as.o :=-Wa,-march=armv7-a
obj-pbl-$(CONFIG_CPU_32v4T) += cache-armv4.o
obj-pbl-$(CONFIG_CPU_32v5) += cache-armv5.o
obj-pbl-$(CONFIG_CPU_32v6) += cache-armv6.o
-AFLAGS_cache-armv7.o :=-Wa,-march=armv7-a
obj-pbl-$(CONFIG_CPU_32v7) += cache-armv7.o
-AFLAGS_pbl-cache-armv7.o :=-Wa,-march=armv7-a
+AFLAGS_cache-armv7.o :=-Wa,-march=armv7-a
+AFLAGS_cache-armv7.pbl.o :=-Wa,-march=armv7-a
obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o
-AFLAGS_cache-armv8.o :=-Wa,-march=armv8-a
obj-pbl-$(CONFIG_CPU_64v8) += cache-armv8.o
-AFLAGS_pbl-cache-armv8.o :=-Wa,-march=armv8-a
+AFLAGS_cache-armv8.o :=-Wa,-march=armv8-a
+AFLAGS-cache-armv8.pbl.o :=-Wa,-march=armv8-a
pbl-y += entry.o entry_ll$(S64).o
pbl-y += uncompress.o
diff --git a/arch/arm/mach-tegra/Makefile b/arch/arm/mach-tegra/Makefile
index 7547951..60aae41 100644
--- a/arch/arm/mach-tegra/Makefile
+++ b/arch/arm/mach-tegra/Makefile
@@ -1,5 +1,5 @@
CFLAGS_tegra_avp_init.o := -mcpu=arm7tdmi -march=armv4t
-CFLAGS_pbl-tegra_avp_init.o := -mcpu=arm7tdmi -march=armv4t
+CFLAGS_tegra_avp_init.pbl.o := -mcpu=arm7tdmi -march=armv4t
lwl-y += tegra_avp_init.o
lwl-y += tegra_maincomplex_init.o
obj-y += tegra20.o
diff --git a/lib/Makefile b/lib/Makefile
index 56040a0..f370d16 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -86,8 +86,7 @@ UBSAN_SANITIZE_ubsan.o := n
libfdt_files = fdt.o fdt_ro.o fdt_wip.o fdt_rw.o fdt_sw.o fdt_strerror.o \
fdt_empty_tree.o
$(foreach file, $(libfdt_files), \
- $(eval CFLAGS_$(file) = -I $(srctree)/scripts/dtc/libfdt))
-$(foreach file, $(libfdt_files), \
- $(eval CFLAGS_pbl-$(file) = -I $(srctree)/scripts/dtc/libfdt))
+ $(eval CFLAGS_$(file) = -I $(srctree)/scripts/dtc/libfdt) \
+ $(eval CFLAGS_$(file:%.o=%.pbl.o) = -I $(srctree)/scripts/dtc/libfdt))
obj-pbl-$(CONFIG_LIBFDT) += $(libfdt_files)
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 0232158..956df9e 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -158,7 +158,7 @@ endef
# Built-in and composite module parts
-pbl-%.o: %.c FORCE
+%.pbl.o: %.c FORCE
$(call cmd,force_checksrc)
$(call if_changed_rule,pbl_cc_o_c)
@@ -201,7 +201,7 @@ cmd_as_o_S = $(CC) $(a_flags) -c -o $@ $<
quiet_cmd_pbl_as_o_S = PBLAS $@
cmd_pbl_as_o_S = $(CC) -D__PBL__ $(a_flags) $(PBL_CPPFLAGS) -c -o $@ $<
-pbl-%.o: %.S FORCE
+%.pbl.o: %.S FORCE
$(call if_changed_dep,pbl_as_o_S)
%.o: %.S FORCE
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 39cc24b..273113f 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -48,8 +48,8 @@ endif
obj-y += $(obj-pbl-y)
pbl-y += $(obj-pbl-y)
-# add pbl- prefix to the target
-pbl-y := $(shell echo $(pbl-y) | sed -e 's%\(\([^ \t]\+/\)*\)\([^ \t]*\.o\)%\2pbl-\3%g')
+# pbl objects are suffixed with .pbl.o
+pbl-y := $(patsubst %.o,%.pbl.o,$(pbl-y))
# add subdir from $(obj-y) too so we do not need to have the dir define in
# both $(obj-y) and $(pbl-y)