* [PATCH] u-boot: mkimage: fix build
@ 2016-11-04 11:06 Stefan Müller-Klieser
[not found] ` <20161104112557.2206.15124@do.openembedded.org>
2016-11-07 15:00 ` [PATCH] " Burton, Ross
0 siblings, 2 replies; 4+ messages in thread
From: Stefan Müller-Klieser @ 2016-11-04 11:06 UTC (permalink / raw)
To: openembedded-core
This fixes the mkimage build for situations where HOSTCC and friends
need to be overridden and the u-boot makefile defaults don't work.
Signed-off-by: Stefan Müller-Klieser <s.mueller-klieser@phytec.de>
---
...file-improve-cross_tools-target-usability.patch | 35 ++++++++++++++++++
...ile-add-override-statements-for-cross_too.patch | 41 ++++++++++++++++++++++
meta/recipes-bsp/u-boot/u-boot-mkimage_2016.03.bb | 8 ++++-
3 files changed, 83 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-bsp/u-boot/u-boot-mkimage/0001-tools-Makefile-improve-cross_tools-target-usability.patch
create mode 100644 meta/recipes-bsp/u-boot/u-boot-mkimage/0002-tools-Makefile-add-override-statements-for-cross_too.patch
diff --git a/meta/recipes-bsp/u-boot/u-boot-mkimage/0001-tools-Makefile-improve-cross_tools-target-usability.patch b/meta/recipes-bsp/u-boot/u-boot-mkimage/0001-tools-Makefile-improve-cross_tools-target-usability.patch
new file mode 100644
index 0000000..4b0d0e8
--- /dev/null
+++ b/meta/recipes-bsp/u-boot/u-boot-mkimage/0001-tools-Makefile-improve-cross_tools-target-usability.patch
@@ -0,0 +1,35 @@
+From ad129135402b38deeb37383c86781341cf239b6a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Stefan=20M=C3=BCller-Klieser?= <s.mueller-klieser@phytec.de>
+Date: Mon, 31 Oct 2016 10:30:18 +0100
+Subject: [PATCH 1/2] tools: Makefile: improve cross_tools target usability
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+When building the cross_tools target, HOSTCFLAGS and HOSTLDFLAGS will
+propagate to the target build. This should not happen and is easy to
+prevent.
+
+Upstream-Status: Submitted
+
+Signed-off-by: Stefan Müller-Klieser <s.mueller-klieser@phytec.de>
+---
+ tools/Makefile | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/tools/Makefile b/tools/Makefile
+index 400588c..305336c 100644
+--- a/tools/Makefile
++++ b/tools/Makefile
+@@ -263,6 +263,8 @@ subdir- += env
+
+ ifneq ($(CROSS_BUILD_TOOLS),)
+ HOSTCC = $(CC)
++HOSTCFLAGS = $(CFLAGS)
++HOSTLDFLAGS = $(LDFLAGS)
+
+ quiet_cmd_crosstools_strip = STRIP $^
+ cmd_crosstools_strip = $(STRIP) $^; touch $@
+--
+1.9.1
+
diff --git a/meta/recipes-bsp/u-boot/u-boot-mkimage/0002-tools-Makefile-add-override-statements-for-cross_too.patch b/meta/recipes-bsp/u-boot/u-boot-mkimage/0002-tools-Makefile-add-override-statements-for-cross_too.patch
new file mode 100644
index 0000000..4c7b6d0
--- /dev/null
+++ b/meta/recipes-bsp/u-boot/u-boot-mkimage/0002-tools-Makefile-add-override-statements-for-cross_too.patch
@@ -0,0 +1,41 @@
+From 2772e2ad0e097590e77fa338295d839d6ae6037c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Stefan=20M=C3=BCller-Klieser?= <s.mueller-klieser@phytec.de>
+Date: Thu, 3 Nov 2016 08:48:02 +0100
+Subject: [PATCH 2/2] tools: Makefile: add override statements for cross_tools
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This fixes the use case where one needs to override the host compiler
+flags for building the target tools. Usually the Makefile will build the
+basic tools first using the hostcc. After that cc will be assigned to
+hostcc to build the target tools. So in this scenario overriding HOSTCC
+fails to build. Using the override statement is one possible fix.
+
+Upstream-Status: Pending
+
+Signed-off-by: Stefan Müller-Klieser <s.mueller-klieser@phytec.de>
+---
+ tools/Makefile | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/tools/Makefile b/tools/Makefile
+index 305336c..9cb1607 100644
+--- a/tools/Makefile
++++ b/tools/Makefile
+@@ -262,9 +262,9 @@ $(LICENSE_H): $(obj)/bin2header $(srctree)/Licenses/gpl-2.0.txt
+ subdir- += env
+
+ ifneq ($(CROSS_BUILD_TOOLS),)
+-HOSTCC = $(CC)
+-HOSTCFLAGS = $(CFLAGS)
+-HOSTLDFLAGS = $(LDFLAGS)
++override HOSTCC = $(CC)
++override HOSTCFLAGS = $(CFLAGS)
++override HOSTLDFLAGS = $(LDFLAGS)
+
+ quiet_cmd_crosstools_strip = STRIP $^
+ cmd_crosstools_strip = $(STRIP) $^; touch $@
+--
+1.9.1
+
diff --git a/meta/recipes-bsp/u-boot/u-boot-mkimage_2016.03.bb b/meta/recipes-bsp/u-boot/u-boot-mkimage_2016.03.bb
index 5025961..0749408 100644
--- a/meta/recipes-bsp/u-boot/u-boot-mkimage_2016.03.bb
+++ b/meta/recipes-bsp/u-boot/u-boot-mkimage_2016.03.bb
@@ -3,7 +3,13 @@ require u-boot-common_${PV}.inc
SUMMARY = "U-Boot bootloader image creation tool"
DEPENDS = "openssl"
-EXTRA_OEMAKE = 'CROSS_COMPILE="${TARGET_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" STRIP=true V=1'
+SRC_URI += " \
+ file://0001-tools-Makefile-improve-cross_tools-target-usability.patch \
+ file://0002-tools-Makefile-add-override-statements-for-cross_too.patch \
+"
+
+EXTRA_OEMAKE = 'CROSS_COMPILE="${TARGET_PREFIX}" CC="${CC}" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" STRIP=true V=1'
+EXTRA_OEMAKE += 'HOSTCC="${BUILD_CC}" HOSTCFLAGS="${BUILD_CFLAGS}" HOSTLDFLAGS="${BUILD_LDFLAGS}"'
do_compile () {
oe_runmake sandbox_defconfig
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread[parent not found: <20161104112557.2206.15124@do.openembedded.org>]
* Re: ✗ patchtest: failure for u-boot: mkimage: fix build
[not found] ` <20161104112557.2206.15124@do.openembedded.org>
@ 2016-11-04 16:30 ` Leonardo Sandoval
0 siblings, 0 replies; 4+ messages in thread
From: Leonardo Sandoval @ 2016-11-04 16:30 UTC (permalink / raw)
To: openembedded-core, daniela.plascencia, richard.purdie,
paul.eggleton, joshua.g.lock, sgw, benjamin.esquivel
This is another false positive that has been fixed. Submitted is a valid
status.
On 11/04/2016 05:25 AM, Patchwork wrote:
> == Series Details ==
>
> Series: u-boot: mkimage: fix build
> URL : https://patchwork.openembedded.org/series/3768/
> State : failure
>
> == Summary ==
>
> Thank you for your patch submission of the following patch series to OpenEmbedded Core-.
> this is an automated response. Several tests have been executed on the proposed
> series (series 3768, revision 1) by patchtest and the following have failed:
>
>
> Test Name test_upstream_status_format
> Proposed Fix Fix Upstream-Status format
> Required format Upstream-Status: <status>
> Possible Status Pending, Accepted, Backport, Denied, Inappropriate
> Line Upstream-Status: Submitted
> Column 18
>
>
> If you believe any of these test results are incorrect, please reply to the mailing
> list (openembedded-core@lists.openembedded.org) raising your concerns. Otherwise we would
> appreciate you correcting the issues and submitting a new version of the patchset if
> applicable. Please ensure you add/increment the version number when sending the new
> version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...).
>
> ---
> Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
> Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] u-boot: mkimage: fix build
2016-11-04 11:06 [PATCH] u-boot: mkimage: fix build Stefan Müller-Klieser
[not found] ` <20161104112557.2206.15124@do.openembedded.org>
@ 2016-11-07 15:00 ` Burton, Ross
2016-11-10 10:01 ` Stefan Müller-Klieser
1 sibling, 1 reply; 4+ messages in thread
From: Burton, Ross @ 2016-11-07 15:00 UTC (permalink / raw)
To: Stefan Müller-Klieser; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 1493 bytes --]
On 4 November 2016 at 11:06, Stefan Müller-Klieser <
s.mueller-klieser@phytec.de> wrote:
> This fixes the mkimage build for situations where HOSTCC and friends
> need to be overridden and the u-boot makefile defaults don't work.
>
I applied this on top of the u-boot upgrades and it still breaks:
make -f ./scripts/Makefile.build obj=tools
x86_64-poky-linux-gcc -m64 -march=corei7 -mtune=corei7 -mfpmath=sse
-msse4.2 --sysroot=/data/poky-master/tmp-glibc/sysroots/intel-corei7-64
-Wp,-MD,tools/.bin2header.d -O2 -pipe -g -feliminate-unused-debug-types
-fdebug-prefix-map=/data/poky-master/tmp-glibc/work/corei7-64-poky-linux/u-boot-mkimage/2016.09.01-r0=/usr/src/debug/u-boot-mkimage/2016.09.01-r0
-fdebug-prefix-map=/data/poky-master/tmp-glibc/sysroots/x86_64-linux=
-fdebug-prefix-map=/data/poky-master/tmp-glibc/sysroots/intel-corei7-64=
-fstack-protector-strong -pie -fpie -D_FORTIFY_SOURCE=2 -Wformat
-Wformat-security -Werror=format-security -DCONFIG_FIT_SIGNATURE -include
./include/libfdt_env.h -idirafterinclude -idirafter./arch/sandbox/include
-I./lib/libfdt -I./tools -DCONFIG_SYS_TEXT_BASE=0 -DUSE_HOSTCC
-D__KERNEL_STRICT_NAMES -D_GNU_SOURCE -o tools/bin2header
tools/bin2header.c
...
cat ./Licenses/gpl-2.0.txt | gzip -9 -c | \
tools/bin2header license_gzip > ./include/license.h
/bin/sh: 2: tools/bin2header: not found
tools/Makefile:256: recipe for target 'include/license.h' failed
Looks like HOSTCC isn't being set correctly.
Ross
[-- Attachment #2: Type: text/html, Size: 2295 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] u-boot: mkimage: fix build
2016-11-07 15:00 ` [PATCH] " Burton, Ross
@ 2016-11-10 10:01 ` Stefan Müller-Klieser
0 siblings, 0 replies; 4+ messages in thread
From: Stefan Müller-Klieser @ 2016-11-10 10:01 UTC (permalink / raw)
To: Burton, Ross; +Cc: OE-core
On 07.11.2016 16:00, Burton, Ross wrote:
> On 4 November 2016 at 11:06, Stefan Müller-Klieser <
> s.mueller-klieser@phytec.de> wrote:
>
>> This fixes the mkimage build for situations where HOSTCC and friends
>> need to be overridden and the u-boot makefile defaults don't work.
>>
>
> I applied this on top of the u-boot upgrades and it still breaks:
>
> make -f ./scripts/Makefile.build obj=tools
> x86_64-poky-linux-gcc -m64 -march=corei7 -mtune=corei7 -mfpmath=sse
> -msse4.2 --sysroot=/data/poky-master/tmp-glibc/sysroots/intel-corei7-64
> -Wp,-MD,tools/.bin2header.d -O2 -pipe -g -feliminate-unused-debug-types
> -fdebug-prefix-map=/data/poky-master/tmp-glibc/work/corei7-64-poky-linux/u-boot-mkimage/2016.09.01-r0=/usr/src/debug/u-boot-mkimage/2016.09.01-r0
> -fdebug-prefix-map=/data/poky-master/tmp-glibc/sysroots/x86_64-linux=
> -fdebug-prefix-map=/data/poky-master/tmp-glibc/sysroots/intel-corei7-64=
> -fstack-protector-strong -pie -fpie -D_FORTIFY_SOURCE=2 -Wformat
> -Wformat-security -Werror=format-security -DCONFIG_FIT_SIGNATURE -include
> ./include/libfdt_env.h -idirafterinclude -idirafter./arch/sandbox/include
> -I./lib/libfdt -I./tools -DCONFIG_SYS_TEXT_BASE=0 -DUSE_HOSTCC
> -D__KERNEL_STRICT_NAMES -D_GNU_SOURCE -o tools/bin2header
> tools/bin2header.c
> ...
> cat ./Licenses/gpl-2.0.txt | gzip -9 -c | \
> tools/bin2header license_gzip > ./include/license.h
> /bin/sh: 2: tools/bin2header: not found
> tools/Makefile:256: recipe for target 'include/license.h' failed
>
> Looks like HOSTCC isn't being set correctly.
Ok, this bin2header issue seems to be unrelated, as Marek sent a v1 upstream, fixing
the execution path. I am not in a hurry with the oe-core, so please ignore the patch.
I will send it upstream first.
Stefan
>
> Ross
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-11-10 10:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-04 11:06 [PATCH] u-boot: mkimage: fix build Stefan Müller-Klieser
[not found] ` <20161104112557.2206.15124@do.openembedded.org>
2016-11-04 16:30 ` ✗ patchtest: failure for " Leonardo Sandoval
2016-11-07 15:00 ` [PATCH] " Burton, Ross
2016-11-10 10:01 ` Stefan Müller-Klieser
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox