diff options
author | Max Krummenacher <max.krummenacher@toradex.com> | 2017-11-08 23:14:21 +0100 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2017-12-20 17:04:20 +0100 |
commit | d90986dcafdd04db05f693836b991b31a16ea35a (patch) | |
tree | 8e6ba69db5f9a2a736cb05051616ef92bdca0375 /recipes-bsp/u-boot/files/default-gcc.patch | |
parent | e0552c1372df66faa9f8080a1524ffdf2b84e07d (diff) |
u-boot-fw-utils: follow the compile fixes for native/cross used in oe-core
The U-Boot Makefile has a unusual way of compiling the user space tools which
results in the wrong toolchain (native vs. target) being used.
Drop our downstream fix in favour of how openembedded-core does this now.
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Diffstat (limited to 'recipes-bsp/u-boot/files/default-gcc.patch')
-rw-r--r-- | recipes-bsp/u-boot/files/default-gcc.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/recipes-bsp/u-boot/files/default-gcc.patch b/recipes-bsp/u-boot/files/default-gcc.patch new file mode 100644 index 0000000..04184df --- /dev/null +++ b/recipes-bsp/u-boot/files/default-gcc.patch @@ -0,0 +1,39 @@ +OE needs to be able to change the default compiler. If we pass in HOSTCC +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 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/tools/Makefile +=================================================================== +--- git.orig/tools/Makefile ++++ git/tools/Makefile +@@ -262,7 +262,7 @@ $(LICENSE_H): $(obj)/bin2header $(srctre + subdir- += env + + 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))) \ |