aboutsummaryrefslogtreecommitdiff
path: root/arch/blackfin
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-09-26 07:00:38 +0000
committerMike Frysinger <vapier@gentoo.org>2010-10-02 16:00:40 -0400
commit48c00fe25c77d646313b90106a945917a62c5319 (patch)
tree4df9bcc896c9bbb159106d94e3719176b27235ab /arch/blackfin
parentcec11d50140a843ed4e39feb519467e3fa985cf1 (diff)
downloadu-boot-linaro-stable-48c00fe25c77d646313b90106a945917a62c5319.tar.gz
Blackfin: propagate target cpu defines when building embedded env
Since we're no longer extracting the env from the target ELF file (since upstream wouldn't take that change), we're back to the problem of cpu defines not properly propagating to the env setup stage. So the embedded env built by the host compiler doesn't match the one that is linked into the u-boot env. Reported-by: Vivi Li <vivi.li@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin')
-rw-r--r--arch/blackfin/config.mk3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/blackfin/config.mk b/arch/blackfin/config.mk
index e531edbfa..a3300841a 100644
--- a/arch/blackfin/config.mk
+++ b/arch/blackfin/config.mk
@@ -43,6 +43,9 @@ ALL += $(obj)u-boot.ldr
endif
ifeq ($(CONFIG_ENV_IS_EMBEDDED_IN_LDR),y)
CREATE_LDR_ENV = $(obj)tools/envcrc --binary > $(obj)env-ldr.o
+HOSTCFLAGS_NOPED += \
+ $(shell $(CPP) -dD - -mcpu=$(CONFIG_BFIN_CPU) </dev/null \
+ | awk '$$2 ~ /ADSP/ { print "-D" $$2 }')
else
CREATE_LDR_ENV =
endif