<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 23, 2016 at 3:25 AM, Jérémy Rosen <span dir="ltr"><<a href="mailto:jeremy.rosen@smile.fr" target="_blank">jeremy.rosen@smile.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">The KConfig infrastructure hardwires the compiler name to gcc, which breaks<br>
the BUILD_CC feature. This is needed even when cross compiling because<br>
make *config rely on the kconfig infrastructure<br>
---<br>
</span> meta/recipes-kernel/linux-<wbr>libc-headers/linux-libc-<wbr>headers.inc | 7 ++++++-<br>
meta/recipes-kernel/linux-<wbr>libc-headers/linux-libc-<wbr>headers/0001-Allow-overriding-<wbr>host-compiler-name-from-<wbr>environment.patch | 32 ++++++++++++++++++++++++++++++<wbr>++<br>
2 files changed, 38 insertions(+), 1 deletion(-)<br>
create mode 100644 meta/recipes-kernel/linux-<wbr>libc-headers/linux-libc-<wbr>headers/0001-Allow-overriding-<wbr>host-compiler-name-from-<wbr>environment.patch<br>
<br>
diff --git a/meta/recipes-kernel/linux-<wbr>libc-headers/linux-libc-<wbr>headers.inc b/meta/recipes-kernel/linux-<wbr>libc-headers/linux-libc-<wbr>headers.inc<br>
index 92acf8a..18bd080 100644<br>
--- a/meta/recipes-kernel/linux-<wbr>libc-headers/linux-libc-<wbr>headers.inc<br>
+++ b/meta/recipes-kernel/linux-<wbr>libc-headers/linux-libc-<wbr>headers.inc<br>
@@ -46,7 +46,9 @@ inherit kernel-arch<br>
<br>
KORG_ARCHIVE_COMPRESSION ?= "xz"<br>
<br>
-SRC_URI = "${KERNELORG_MIRROR}/linux/<wbr>kernel/v${HEADER_FETCH_VER}/<wbr>linux-${PV}.tar.${KORG_<wbr>ARCHIVE_COMPRESSION}"<br>
+SRC_URI = "${KERNELORG_MIRROR}/linux/<wbr>kernel/v${HEADER_FETCH_VER}/<wbr>linux-${PV}.tar.${KORG_<wbr>ARCHIVE_COMPRESSION} \<br>
+ file://0001-Allow-overriding-<wbr>host-compiler-name-from-<wbr>environment.patch \<br>
+ "<br>
<br></blockquote><div><br></div><div>We shouldn't be patching linux-libc-headers, and much less with a build patch like this. libc-headers<br></div><div>are the c libraries interface to the kernel. If something is building against the kernel itself, it needs<br></div><div>to go against the kernel source.<br><br></div><div>If this is broken, it needs to be fixed upstream.<br><br></div><div>But like the kernel patch, I can't tell exactly what problem you are trying to fix. Can you be more<br></div><div>specific ?<br><br></div><div>Bruce<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
S = "${WORKDIR}/linux-${PV}"<br>
<br>
@@ -77,3 +79,6 @@ RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"<br>
<br>
INHIBIT_DEFAULT_DEPS = "1"<br>
DEPENDS += "unifdef-native"<br>
+<br>
+export HOSTCC="${BUILD_CC}"<br>
+export HOSTCXX="${BUILD_CXX}"<br>
diff --git a/meta/recipes-kernel/linux-<wbr>libc-headers/linux-libc-<wbr>headers/0001-Allow-overriding-<wbr>host-compiler-name-from-<wbr>environment.patch b/meta/recipes-kernel/linux-<wbr>libc-headers/linux-libc-<wbr>headers/0001-Allow-overriding-<wbr>host-compiler-name-from-<wbr>environment.patch<br>
new file mode 100644<br>
index 0000000..6fcfbc8<br>
--- /dev/null<br>
+++ b/meta/recipes-kernel/linux-<wbr>libc-headers/linux-libc-<wbr>headers/0001-Allow-overriding-<wbr>host-compiler-name-from-<wbr>environment.patch<br>
@@ -0,0 +1,32 @@<br>
+From 0ce4c4f29b5d456a7707e870c7affe<wbr>524f7c8807 Mon Sep 17 00:00:00 2001<br>
+From: =?UTF-8?q?J=C3=A9r=C3=A9my=<wbr>20Rosen?= <<a href="mailto:jeremy.rosen@smile.fr">jeremy.rosen@smile.fr</a>><br>
<span class="">+Date: Tue, 16 Aug 2016 22:39:29 +0200<br>
+Subject: [PATCH] Allow overriding host-compiler name from environment<br>
+ variables<br>
+<br>
+---<br>
+ Makefile | 8 ++++----<br>
</span>+ 1 file changed, 4 insertions(+), 4 deletions(-)<br>
<span class="">+<br>
+diff --git a/Makefile b/Makefile<br>
</span>+index 70dea02..1f0d2d2 100644<br>
+--- a/Makefile<br>
++++ b/Makefile<br>
<span class="im HOEnZb">+@@ -295,10 +295,10 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \<br>
+ else if [ -x /bin/bash ]; then echo /bin/bash; \<br>
+ else echo sh; fi ; fi)<br>
</span><span class="im HOEnZb">+<br>
+-HOSTCC = gcc<br>
+-HOSTCXX = g++<br>
</span><span class="im HOEnZb">+-HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89<br>
+-HOSTCXXFLAGS = -O2<br>
</span><span class="im HOEnZb">++HOSTCC ?= gcc<br>
++HOSTCXX ?= g++<br>
</span><span class="im HOEnZb">++HOSTCFLAGS ?= -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89<br>
++HOSTCXXFLAGS ?= -O2<br>
+<br>
+ ifeq ($(shell $(HOSTCC) -v 2>&1 | grep -c "clang version"), 1)<br>
+ HOSTCFLAGS += -Wno-unused-value -Wno-unused-parameter \<br>
</span><div class="HOEnZb"><div class="h5">+--<br>
+2.8.1<br>
+<br>
--<br>
git-series 0.8.9<br>
--<br>
______________________________<wbr>_________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.<wbr>openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/<wbr>mailman/listinfo/openembedded-<wbr>core</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"</div>
</div></div>