u-boot: Update patch to match upstream

After discussions with upstream this version of the patch was proposed
and is being submitted to upstream u-boot. Update to that version
(which is better than my workaround).

(From OE-Core rev: 048af2455aa65b25fd74bfe0e6d3a0af7562b42f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2017-03-13 07:29:23 +00:00
parent 3dadb9722e
commit 4ca2fff32c
2 changed files with 29 additions and 15 deletions

View File

@ -3,23 +3,37 @@ through the make command, it overwrites not only this setting but also the
setting in tools/Makefile wrapped in ifneq ($(CROSS_BUILD_TOOLS),) which
breaks the build.
We therefore add a way of changing the default in the top level Makefile
without interfering with the other setting.
We therefore use override to ensure the value of HOSTCC is overwritten when
needed.
RP: Updated the patch to the version being submitted to upstream u-boot
Upstream-Status: Submitted [emailed to Masahiro Yamada for discussion]
RP 2017/3/11
Index: git/Makefile
Index: git/tools/Makefile
===================================================================
--- git.orig/Makefile
+++ git/Makefile
@@ -254,7 +254,8 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH"
else if [ -x /bin/bash ]; then echo /bin/bash; \
else echo sh; fi ; fi)
--- git.orig/tools/Makefile
+++ git/tools/Makefile
@@ -262,7 +262,7 @@ $(LICENSE_H): $(obj)/bin2header $(srctre
subdir- += env
-HOSTCC = cc
+DEFAULTHOSTCC = cc
+HOSTCC = $(DEFAULTHOSTCC)
HOSTCXX = c++
HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer \
$(if $(CONFIG_TOOLS_DEBUG),-g)
ifneq ($(CROSS_BUILD_TOOLS),)
-HOSTCC = $(CC)
+override HOSTCC = $(CC)
quiet_cmd_crosstools_strip = STRIP $^
cmd_crosstools_strip = $(STRIP) $^; touch $@
Index: git/tools/env/Makefile
===================================================================
--- git.orig/tools/env/Makefile
+++ git/tools/env/Makefile
@@ -8,7 +8,7 @@
# fw_printenv is supposed to run on the target system, which means it should be
# built with cross tools. Although it may look weird, we only replace "HOSTCC"
# with "CC" here for the maximum code reuse of scripts/Makefile.host.
-HOSTCC = $(CC)
+override HOSTCC = $(CC)
# Compile for a hosted environment on the target
HOST_EXTRACFLAGS = $(patsubst -I%,-idirafter%, $(filter -I%, $(UBOOTINCLUDE))) \

View File

@ -5,7 +5,7 @@ SRC_URI += "file://default-gcc.patch"
SUMMARY = "U-Boot bootloader image creation tool"
DEPENDS = "openssl"
EXTRA_OEMAKE_class-target = 'CROSS_COMPILE="${TARGET_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" DEFAULTHOSTCC="${BUILD_CC}" STRIP=true V=1'
EXTRA_OEMAKE_class-target = 'CROSS_COMPILE="${TARGET_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1'
EXTRA_OEMAKE_class-native = 'CC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1'
EXTRA_OEMAKE_class-nativesdk = 'CC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1'