From: Khem Raj <raj.khem@gmail.com>
To: Bruce Ashfield <bruce.ashfield@gmail.com>
Cc: Patches and discussions about the oe-core layer
<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 5/8] [linux-libc-headers] allow overriding compiler name in KConfig
Date: Tue, 23 Aug 2016 18:06:47 -0700 [thread overview]
Message-ID: <B2BB2260-8436-4148-BD30-649D7D4899BC@gmail.com> (raw)
In-Reply-To: <CADkTA4M9zMN7tLeKfZERc3QmirsJLyAnMSVzN2AQJ2gRAkYm7g@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 4844 bytes --]
> On Aug 23, 2016, at 6:39 AM, Bruce Ashfield <bruce.ashfield@gmail.com> wrote:
>
>
>
> On Tue, Aug 23, 2016 at 3:25 AM, Jérémy Rosen <jeremy.rosen@smile.fr <mailto:jeremy.rosen@smile.fr>> wrote:
> The KConfig infrastructure hardwires the compiler name to gcc, which breaks
> the BUILD_CC feature. This is needed even when cross compiling because
> make *config rely on the kconfig infrastructure
> ---
> meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc | 7 ++++++-
> meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-Allow-overriding-host-compiler-name-from-environment.patch | 32 ++++++++++++++++++++++++++++++++
> 2 files changed, 38 insertions(+), 1 deletion(-)
> create mode 100644 meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-Allow-overriding-host-compiler-name-from-environment.patch
>
> diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
> index 92acf8a..18bd080 100644
> --- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
> +++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
> @@ -46,7 +46,9 @@ inherit kernel-arch
>
> KORG_ARCHIVE_COMPRESSION ?= "xz"
>
> -SRC_URI = "${KERNELORG_MIRROR}/linux/kernel/v${HEADER_FETCH_VER}/linux-${PV}.tar.${KORG_ARCHIVE_COMPRESSION}"
> +SRC_URI = "${KERNELORG_MIRROR}/linux/kernel/v${HEADER_FETCH_VER}/linux-${PV}.tar.${KORG_ARCHIVE_COMPRESSION} \
> + file://0001-Allow-overriding-host-compiler-name-from-environment.patch \
> + "
>
>
> We shouldn't be patching linux-libc-headers, and much less with a build patch like this. libc-headers
> are the c libraries interface to the kernel. If something is building against the kernel itself, it needs
> to go against the kernel source.
>
> If this is broken, it needs to be fixed upstream.
I agree. now a days we have more than gcc available as system C compiler perhaps your patch might be upstream worthy.
>
> But like the kernel patch, I can't tell exactly what problem you are trying to fix. Can you be more
> specific ?
>
> Bruce
>
> S = "${WORKDIR}/linux-${PV}"
>
> @@ -77,3 +79,6 @@ RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
>
> INHIBIT_DEFAULT_DEPS = "1"
> DEPENDS += "unifdef-native"
> +
> +export HOSTCC="${BUILD_CC}"
> +export HOSTCXX="${BUILD_CXX}"
> diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-Allow-overriding-host-compiler-name-from-environment.patch b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-Allow-overriding-host-compiler-name-from-environment.patch
> new file mode 100644
> index 0000000..6fcfbc8
> --- /dev/null
> +++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-Allow-overriding-host-compiler-name-from-environment.patch
> @@ -0,0 +1,32 @@
> +From 0ce4c4f29b5d456a7707e870c7affe524f7c8807 Mon Sep 17 00:00:00 2001
> +From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Rosen?= <jeremy.rosen@smile.fr <mailto:jeremy.rosen@smile.fr>>
> +Date: Tue, 16 Aug 2016 22:39:29 +0200
> +Subject: [PATCH] Allow overriding host-compiler name from environment
> + variables
> +
> +---
> + Makefile | 8 ++++----
> + 1 file changed, 4 insertions(+), 4 deletions(-)
> +
> +diff --git a/Makefile b/Makefile
> +index 70dea02..1f0d2d2 100644
> +--- a/Makefile
> ++++ b/Makefile
> +@@ -295,10 +295,10 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
> + else if [ -x /bin/bash ]; then echo /bin/bash; \
> + else echo sh; fi ; fi)
> +
> +-HOSTCC = gcc
> +-HOSTCXX = g++
> +-HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89
> +-HOSTCXXFLAGS = -O2
> ++HOSTCC ?= gcc
> ++HOSTCXX ?= g++
> ++HOSTCFLAGS ?= -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89
> ++HOSTCXXFLAGS ?= -O2
> +
> + ifeq ($(shell $(HOSTCC) -v 2>&1 | grep -c "clang version"), 1)
> + HOSTCFLAGS += -Wno-unused-value -Wno-unused-parameter \
> +--
> +2.8.1
> +
> --
> git-series 0.8.9
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org <mailto:Openembedded-core@lists.openembedded.org>
> http://lists.openembedded.org/mailman/listinfo/openembedded-core <http://lists.openembedded.org/mailman/listinfo/openembedded-core>
>
>
>
> --
> "Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
[-- Attachment #1.2: Type: text/html, Size: 8891 bytes --]
[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 211 bytes --]
next prev parent reply other threads:[~2016-08-24 1:06 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-23 7:25 [PATCH 0/8] Fix BUILD_* family of variables Jérémy Rosen
2016-08-23 7:25 ` [PATCH 1/8] [autotools] export CCLD_FOR_BUILD Jérémy Rosen
2016-08-24 0:50 ` Khem Raj
2016-08-24 11:05 ` Jérémy Rosen
2016-08-24 11:28 ` Jérémy Rosen
2016-08-24 19:56 ` Burton, Ross
2016-08-25 12:40 ` Jérémy Rosen
2016-08-25 13:27 ` Burton, Ross
2016-08-23 7:25 ` [PATCH 2/8] [cross] export CC family from BUILD_* for cross compilers Jérémy Rosen
2016-08-23 13:34 ` Peter Kjellerstedt
2016-08-23 14:46 ` Burton, Ross
2016-08-23 14:49 ` Jérémy Rosen
2016-08-23 7:25 ` [PATCH 3/8] [rpm] force a configure before make distclean Jérémy Rosen
2016-08-23 16:54 ` Burton, Ross
2016-08-23 17:16 ` Mark Hatle
2016-08-24 7:44 ` Jérémy Rosen
2016-08-24 14:13 ` Mark Hatle
2016-08-24 14:17 ` Jérémy Rosen
2016-08-24 14:42 ` Mark Hatle
2016-08-23 7:25 ` [PATCH 4/8] [linux-yocto] allow overriding compiler name in KConfig Jérémy Rosen
2016-08-23 13:36 ` Bruce Ashfield
2016-08-23 13:41 ` Bruce Ashfield
2016-08-23 13:48 ` Jérémy Rosen
2016-08-23 13:43 ` Jérémy Rosen
2016-08-23 7:25 ` [PATCH 5/8] [linux-libc-headers] " Jérémy Rosen
2016-08-23 13:39 ` Bruce Ashfield
2016-08-24 1:06 ` Khem Raj [this message]
2016-08-24 7:45 ` Jérémy Rosen
2016-08-23 7:25 ` [PATCH 6/8] [busybox] " Jérémy Rosen
2016-08-23 7:25 ` [PATCH 7/8] [sanity] fix hardcoded references to gcc Jérémy Rosen
2016-08-23 14:53 ` Burton, Ross
2016-08-23 15:11 ` Burton, Ross
2016-08-23 15:40 ` Jérémy Rosen
2016-08-24 7:47 ` Jérémy Rosen
2016-08-23 7:25 ` [PATCH 8/8] [glibc] remove hard-coded reference to gcc -E Jérémy Rosen
2016-08-23 14:03 ` Burton, Ross
2016-08-23 14:04 ` Jérémy Rosen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=B2BB2260-8436-4148-BD30-649D7D4899BC@gmail.com \
--to=raj.khem@gmail.com \
--cc=bruce.ashfield@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox