summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/imx-common/Makefile2
-rw-r--r--arch/blackfin/cpu/Makefile5
-rw-r--r--arch/blackfin/lib/Makefile5
-rw-r--r--arch/m68k/cpu/mcf5227x/Makefile2
-rw-r--r--arch/m68k/cpu/mcf523x/Makefile2
-rw-r--r--arch/m68k/cpu/mcf52x2/Makefile2
-rw-r--r--arch/m68k/cpu/mcf532x/Makefile2
-rw-r--r--arch/m68k/cpu/mcf5445x/Makefile2
-rw-r--r--arch/m68k/cpu/mcf547x_8x/Makefile2
-rw-r--r--arch/powerpc/cpu/mpc8xx/Makefile2
-rw-r--r--arch/powerpc/lib/Makefile4
-rw-r--r--arch/sandbox/cpu/Makefile11
12 files changed, 23 insertions, 18 deletions
diff --git a/arch/arm/imx-common/Makefile b/arch/arm/imx-common/Makefile
index ee5c872f51..9dda59df04 100644
--- a/arch/arm/imx-common/Makefile
+++ b/arch/arm/imx-common/Makefile
@@ -25,7 +25,7 @@ obj-$(CONFIG_CMD_HDMIDETECT) += cmd_hdmidet.o
$(OBJTREE)/$(patsubst "%",%,$(CONFIG_IMX_CONFIG)).cfgtmp: $(OBJTREE)/%.cfgtmp : $(SRCTREE)/%
mkdir -p $(dir $@)
- $(CC) -E -x c $< $(CPPFLAGS) -o $@
+ $(CPP) $(cpp_flags) -x c -o $@ $<
$(OBJTREE)/u-boot.imx: $(OBJTREE)/u-boot.bin $(OBJTREE)/$(patsubst "%",%,$(CONFIG_IMX_CONFIG)).cfgtmp
$(OBJTREE)/tools/mkimage -n $(filter-out %.bin,$^) -T imximage \
diff --git a/arch/blackfin/cpu/Makefile b/arch/blackfin/cpu/Makefile
index 369dc74e94..dd4d2d13e0 100644
--- a/arch/blackfin/cpu/Makefile
+++ b/arch/blackfin/cpu/Makefile
@@ -25,7 +25,7 @@ extra-y += check_initcode
# make sure our initcode (which goes into LDR) does not
# have relocs or external references
-$(obj)/initcode.o: CFLAGS += -fno-function-sections -fno-data-sections
+CFLAGS_REMOVE_initcode.o := -ffunction-sections -fdata-sections
READINIT = env LC_ALL=C $(CROSS_COMPILE)readelf -s $<
$(obj)/check_initcode: $(obj)/initcode.o
ifneq ($(CONFIG_BFIN_BOOT_MODE),BFIN_BOOT_BYPASS)
@@ -35,7 +35,6 @@ ifneq ($(CONFIG_BFIN_BOOT_MODE),BFIN_BOOT_BYPASS)
fi
endif
-$(obj)/init.lds: $(src)/init.lds.S
- $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P $^ -o $@
+CPPFLAGS_init.lds := -ansi
$(obj)/init.elf: $(obj)/init.lds $(obj)/init.o $(obj)/initcode.o
$(LD) $(LDFLAGS) -T $^ -o $@
diff --git a/arch/blackfin/lib/Makefile b/arch/blackfin/lib/Makefile
index a5c552f38a..4ba7bf6949 100644
--- a/arch/blackfin/lib/Makefile
+++ b/arch/blackfin/lib/Makefile
@@ -9,7 +9,10 @@
# SPDX-License-Identifier: GPL-2.0+
#
-CFLAGS += -DBFIN_BOARD_NAME='"$(BOARD)"'
+# Unnecessary.
+# Use CONFIG_SYS_BOARD instead of BFIN_BOARD_NAME
+# and delete this.
+ccflags-y += -DBFIN_BOARD_NAME='"$(BOARD)"'
obj-y += ins.o
obj-y += memcmp.o
diff --git a/arch/m68k/cpu/mcf5227x/Makefile b/arch/m68k/cpu/mcf5227x/Makefile
index a47fd56739..e0c5db60f4 100644
--- a/arch/m68k/cpu/mcf5227x/Makefile
+++ b/arch/m68k/cpu/mcf5227x/Makefile
@@ -5,7 +5,7 @@
# SPDX-License-Identifier: GPL-2.0+
#
-# CFLAGS += -DET_DEBUG
+# ccflags-y += -DET_DEBUG
extra-y = start.o
obj-y = cpu.o speed.o cpu_init.o interrupts.o
diff --git a/arch/m68k/cpu/mcf523x/Makefile b/arch/m68k/cpu/mcf523x/Makefile
index a47fd56739..e0c5db60f4 100644
--- a/arch/m68k/cpu/mcf523x/Makefile
+++ b/arch/m68k/cpu/mcf523x/Makefile
@@ -5,7 +5,7 @@
# SPDX-License-Identifier: GPL-2.0+
#
-# CFLAGS += -DET_DEBUG
+# ccflags-y += -DET_DEBUG
extra-y = start.o
obj-y = cpu.o speed.o cpu_init.o interrupts.o
diff --git a/arch/m68k/cpu/mcf52x2/Makefile b/arch/m68k/cpu/mcf52x2/Makefile
index d9bf9008ec..b92fd864c4 100644
--- a/arch/m68k/cpu/mcf52x2/Makefile
+++ b/arch/m68k/cpu/mcf52x2/Makefile
@@ -5,7 +5,7 @@
# SPDX-License-Identifier: GPL-2.0+
#
-# CFLAGS += -DET_DEBUG
+# ccflags-y += -DET_DEBUG
extra-y = start.o
obj-y = interrupts.o cpu.o speed.o cpu_init.o
diff --git a/arch/m68k/cpu/mcf532x/Makefile b/arch/m68k/cpu/mcf532x/Makefile
index 97aa3f16a9..9c53c50c48 100644
--- a/arch/m68k/cpu/mcf532x/Makefile
+++ b/arch/m68k/cpu/mcf532x/Makefile
@@ -5,7 +5,7 @@
# SPDX-License-Identifier: GPL-2.0+
#
-# CFLAGS += -DET_DEBUG
+# ccflags-y += -DET_DEBUG
extra-y := start.o
obj-y = cpu.o speed.o cpu_init.o interrupts.o
diff --git a/arch/m68k/cpu/mcf5445x/Makefile b/arch/m68k/cpu/mcf5445x/Makefile
index b506719c8f..9be91ed157 100644
--- a/arch/m68k/cpu/mcf5445x/Makefile
+++ b/arch/m68k/cpu/mcf5445x/Makefile
@@ -5,7 +5,7 @@
# SPDX-License-Identifier: GPL-2.0+
#
-# CFLAGS += -DET_DEBUG
+# ccflags-y += -DET_DEBUG
extra-y = start.o
obj-y = cpu.o speed.o cpu_init.o interrupts.o pci.o
diff --git a/arch/m68k/cpu/mcf547x_8x/Makefile b/arch/m68k/cpu/mcf547x_8x/Makefile
index 0fa50bfccd..4f82099b6b 100644
--- a/arch/m68k/cpu/mcf547x_8x/Makefile
+++ b/arch/m68k/cpu/mcf547x_8x/Makefile
@@ -5,7 +5,7 @@
# SPDX-License-Identifier: GPL-2.0+
#
-# CFLAGS += -DET_DEBUG
+# ccflags-y += -DET_DEBUG
extra-y = start.o
obj-y = cpu.o speed.o cpu_init.o pci.o interrupts.o slicetimer.o
diff --git a/arch/powerpc/cpu/mpc8xx/Makefile b/arch/powerpc/cpu/mpc8xx/Makefile
index d40bdab1e1..f83fd5ecf4 100644
--- a/arch/powerpc/cpu/mpc8xx/Makefile
+++ b/arch/powerpc/cpu/mpc8xx/Makefile
@@ -5,7 +5,7 @@
# SPDX-License-Identifier: GPL-2.0+
#
-# CFLAGS += -DET_DEBUG
+# ccflags-y += -DET_DEBUG
extra-y += start.o
extra-y += traps.o
diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile
index ac780d4077..e6d8be51ca 100644
--- a/arch/powerpc/lib/Makefile
+++ b/arch/powerpc/lib/Makefile
@@ -54,11 +54,11 @@ ifndef CONFIG_SPL_BUILD
# Workaround for local bus unaligned access problems
# on MPC512x and MPC5200
ifdef CONFIG_MPC512X
-$(obj)/ppcstring.o: AFLAGS += -Dmemcpy=__memcpy
+AFLAGS_ppcstring.o += -Dmemcpy=__memcpy
obj-y += memcpy_mpc5200.o
endif
ifdef CONFIG_MPC5200
-$(obj)/ppcstring.o: AFLAGS += -Dmemcpy=__memcpy
+AFLAGS_ppcstring.o += -Dmemcpy=__memcpy
obj-y += memcpy_mpc5200.o
endif
endif
diff --git a/arch/sandbox/cpu/Makefile b/arch/sandbox/cpu/Makefile
index c5f5426b05..63dededf70 100644
--- a/arch/sandbox/cpu/Makefile
+++ b/arch/sandbox/cpu/Makefile
@@ -10,7 +10,10 @@
obj-y := cpu.o os.o start.o state.o
# os.c is build in the system environment, so needs standard includes
-$(obj)/os.o: CFLAGS := $(filter-out -nostdinc,\
- $(patsubst -I%,-idirafter%,$(CFLAGS)))
-$(obj)/.depend.os: CPPFLAGS := $(filter-out -nostdinc,\
- $(patsubst -I%,-idirafter%,$(CPPFLAGS)))
+# CFLAGS_REMOVE_os.o cannot be used to drop header include path
+quiet_cmd_cc_os.o = CC $(quiet_modtag) $@
+cmd_cc_os.o = $(CC) $(filter-out -nostdinc, \
+ $(patsubst -I%,-idirafter%,$(c_flags))) -c -o $@ $<
+
+$(obj)/os.o: $(src)/os.c FORCE
+ $(call if_changed_dep,cc_os.o)
OpenPOWER on IntegriCloud