Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] linuxptp: don't check host headers for target features
@ 2017-07-01 21:09 Baruch Siach
  2017-07-01 22:15 ` Petr Kulhavy
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Baruch Siach @ 2017-07-01 21:09 UTC (permalink / raw)
  To: buildroot

The incdefs.sh script runs ${CROSS_COMPILE}cpp to get a list of default
headers directories. Make sure CROSS_COMPILE is set correctly to avoid check
of host headers.

Also, drop the CC command line override. Upstream makefile sets CC to
$(CROSS_COMPILE)gcc.

Should fix:
http://autobuild.buildroot.net/results/394/394414df25b0b7261b27ca5d4901fde0f639e73c/
http://autobuild.buildroot.net/results/6ad/6adbc8c77c2ca70246b31600ab66b37c56c1e89e/
http://autobuild.buildroot.net/results/70d/70dfd05acc9d951169267f2820ecedb37f0711fe/

Cc: Petr Kulhavy <brain@jikos.cz>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 package/linuxptp/linuxptp.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/linuxptp/linuxptp.mk b/package/linuxptp/linuxptp.mk
index 5c2257c9d781..beb2591c3224 100644
--- a/package/linuxptp/linuxptp.mk
+++ b/package/linuxptp/linuxptp.mk
@@ -11,9 +11,9 @@ LINUXPTP_LICENSE = GPL-2.0+
 LINUXPTP_LICENSE_FILES = COPYING
 
 define LINUXPTP_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) KBUILD_OUTPUT=$(TARGET_DIR) \
+	$(TARGET_MAKE_ENV) CROSS_COMPILE="$(TARGET_CROSS)" \
+		$(MAKE) KBUILD_OUTPUT=$(TARGET_DIR) \
 		EXTRA_CFLAGS="$(TARGET_CFLAGS)" EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \
-		CC="$(TARGET_CC)" \
 		-C $(@D) all
 endef
 
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH] linuxptp: don't check host headers for target features
  2017-07-01 21:09 [Buildroot] [PATCH] linuxptp: don't check host headers for target features Baruch Siach
@ 2017-07-01 22:15 ` Petr Kulhavy
  2017-07-01 22:36 ` Thomas Petazzoni
  2017-07-02 13:41 ` Petr Kulhavy
  2 siblings, 0 replies; 5+ messages in thread
From: Petr Kulhavy @ 2017-07-01 22:15 UTC (permalink / raw)
  To: buildroot

Hi Baruch,

first of all thank you for the patch.
The trouble is that linuxptp overrides the build commands to gcc and cpp 
(with the CROSS_COMPILE prefix). This might be a problem if someone uses 
a different compiler.
That's why I've put the CC override there.

When porting the package into BR I was facing the same issues as you are 
seeing now in the autobuild logs. But they have been solved. Not sure 
what happened since then...
For a clean solution the problem should be addressed in the package 
itself. The package shouldn't force any particular compiler.
I've raised a question in the linuxptp devel list for that.

Regards
Petr

On 01/07/17 23:09, Baruch Siach wrote:
> The incdefs.sh script runs ${CROSS_COMPILE}cpp to get a list of default
> headers directories. Make sure CROSS_COMPILE is set correctly to avoid check
> of host headers.
>
> Also, drop the CC command line override. Upstream makefile sets CC to
> $(CROSS_COMPILE)gcc.
>
> Should fix:
> http://autobuild.buildroot.net/results/394/394414df25b0b7261b27ca5d4901fde0f639e73c/
> http://autobuild.buildroot.net/results/6ad/6adbc8c77c2ca70246b31600ab66b37c56c1e89e/
> http://autobuild.buildroot.net/results/70d/70dfd05acc9d951169267f2820ecedb37f0711fe/
>
> Cc: Petr Kulhavy <brain@jikos.cz>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
>   package/linuxptp/linuxptp.mk | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/package/linuxptp/linuxptp.mk b/package/linuxptp/linuxptp.mk
> index 5c2257c9d781..beb2591c3224 100644
> --- a/package/linuxptp/linuxptp.mk
> +++ b/package/linuxptp/linuxptp.mk
> @@ -11,9 +11,9 @@ LINUXPTP_LICENSE = GPL-2.0+
>   LINUXPTP_LICENSE_FILES = COPYING
>   
>   define LINUXPTP_BUILD_CMDS
> -	$(TARGET_MAKE_ENV) $(MAKE) KBUILD_OUTPUT=$(TARGET_DIR) \
> +	$(TARGET_MAKE_ENV) CROSS_COMPILE="$(TARGET_CROSS)" \
> +		$(MAKE) KBUILD_OUTPUT=$(TARGET_DIR) \
>   		EXTRA_CFLAGS="$(TARGET_CFLAGS)" EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \
> -		CC="$(TARGET_CC)" \
>   		-C $(@D) all
>   endef
>   

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH] linuxptp: don't check host headers for target features
  2017-07-01 21:09 [Buildroot] [PATCH] linuxptp: don't check host headers for target features Baruch Siach
  2017-07-01 22:15 ` Petr Kulhavy
@ 2017-07-01 22:36 ` Thomas Petazzoni
  2017-07-02 13:41 ` Petr Kulhavy
  2 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2017-07-01 22:36 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun,  2 Jul 2017 00:09:35 +0300, Baruch Siach wrote:
> The incdefs.sh script runs ${CROSS_COMPILE}cpp to get a list of default
> headers directories. Make sure CROSS_COMPILE is set correctly to avoid check
> of host headers.
> 
> Also, drop the CC command line override. Upstream makefile sets CC to
> $(CROSS_COMPILE)gcc.
> 
> Should fix:
> http://autobuild.buildroot.net/results/394/394414df25b0b7261b27ca5d4901fde0f639e73c/
> http://autobuild.buildroot.net/results/6ad/6adbc8c77c2ca70246b31600ab66b37c56c1e89e/
> http://autobuild.buildroot.net/results/70d/70dfd05acc9d951169267f2820ecedb37f0711fe/
> 
> Cc: Petr Kulhavy <brain@jikos.cz>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
>  package/linuxptp/linuxptp.mk | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH] linuxptp: don't check host headers for target features
  2017-07-01 21:09 [Buildroot] [PATCH] linuxptp: don't check host headers for target features Baruch Siach
  2017-07-01 22:15 ` Petr Kulhavy
  2017-07-01 22:36 ` Thomas Petazzoni
@ 2017-07-02 13:41 ` Petr Kulhavy
  2017-07-02 18:26   ` Baruch Siach
  2 siblings, 1 reply; 5+ messages in thread
From: Petr Kulhavy @ 2017-07-02 13:41 UTC (permalink / raw)
  To: buildroot

Hi Baruch,

I'm concerned about the fact that this package doesn't use the CC 
environment variable but forces the compiler to be $(COMPILER_PREFIX)gcc 
and $(COMPILER_PREFIX)cpp.

Reading the BR Makefile the generic toolchain filename consists of:
TOOLCHAIN_EXTERNAL_CC = 
$(TOOLCHAIN_EXTERNAL_CROSS)gcc$(TOOLCHAIN_EXTERNAL_SUFFIX)

In other words the TOOLCHAIN_EXTERNAL_SUFFIX will be lost and the build 
will fail with toolchains that set it non-empty.
Are there any BR toolchains what use the TOOLCHAIN_EXTERNAL_SUFFIX?

Regards
Petr


On 01/07/17 23:09, Baruch Siach wrote:
> The incdefs.sh script runs ${CROSS_COMPILE}cpp to get a list of default
> headers directories. Make sure CROSS_COMPILE is set correctly to avoid check
> of host headers.
>
> Also, drop the CC command line override. Upstream makefile sets CC to
> $(CROSS_COMPILE)gcc.
>
> Should fix:
> http://autobuild.buildroot.net/results/394/394414df25b0b7261b27ca5d4901fde0f639e73c/
> http://autobuild.buildroot.net/results/6ad/6adbc8c77c2ca70246b31600ab66b37c56c1e89e/
> http://autobuild.buildroot.net/results/70d/70dfd05acc9d951169267f2820ecedb37f0711fe/
>
> Cc: Petr Kulhavy <brain@jikos.cz>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
>   package/linuxptp/linuxptp.mk | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/package/linuxptp/linuxptp.mk b/package/linuxptp/linuxptp.mk
> index 5c2257c9d781..beb2591c3224 100644
> --- a/package/linuxptp/linuxptp.mk
> +++ b/package/linuxptp/linuxptp.mk
> @@ -11,9 +11,9 @@ LINUXPTP_LICENSE = GPL-2.0+
>   LINUXPTP_LICENSE_FILES = COPYING
>   
>   define LINUXPTP_BUILD_CMDS
> -	$(TARGET_MAKE_ENV) $(MAKE) KBUILD_OUTPUT=$(TARGET_DIR) \
> +	$(TARGET_MAKE_ENV) CROSS_COMPILE="$(TARGET_CROSS)" \
> +		$(MAKE) KBUILD_OUTPUT=$(TARGET_DIR) \
>   		EXTRA_CFLAGS="$(TARGET_CFLAGS)" EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \
> -		CC="$(TARGET_CC)" \
>   		-C $(@D) all
>   endef
>   

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH] linuxptp: don't check host headers for target features
  2017-07-02 13:41 ` Petr Kulhavy
@ 2017-07-02 18:26   ` Baruch Siach
  0 siblings, 0 replies; 5+ messages in thread
From: Baruch Siach @ 2017-07-02 18:26 UTC (permalink / raw)
  To: buildroot

Hi Petr,

On Sun, Jul 02, 2017 at 03:41:30PM +0200, Petr Kulhavy wrote:
> I'm concerned about the fact that this package doesn't use the CC
> environment variable but forces the compiler to be $(COMPILER_PREFIX)gcc and
> $(COMPILER_PREFIX)cpp.
> 
> Reading the BR Makefile the generic toolchain filename consists of:
> TOOLCHAIN_EXTERNAL_CC =
> $(TOOLCHAIN_EXTERNAL_CROSS)gcc$(TOOLCHAIN_EXTERNAL_SUFFIX)
> 
> In other words the TOOLCHAIN_EXTERNAL_SUFFIX will be lost and the build will
> fail with toolchains that set it non-empty.
> Are there any BR toolchains what use the TOOLCHAIN_EXTERNAL_SUFFIX?

As far as I understand this TOOLCHAIN_EXTERNAL_SUFFIX is only applicable to 
Buildroot toolchains that are used as external toolchains. Only the toolchain 
wrapper sees TOOLCHAIN_EXTERNAL_CC. Target packages never use it, but the 
toolchain wrapper at $(TARGET_CROSS)gcc.

Maybe one of the toolchain expert here can confirm that.

baruch

> On 01/07/17 23:09, Baruch Siach wrote:
> > The incdefs.sh script runs ${CROSS_COMPILE}cpp to get a list of default
> > headers directories. Make sure CROSS_COMPILE is set correctly to avoid check
> > of host headers.
> > 
> > Also, drop the CC command line override. Upstream makefile sets CC to
> > $(CROSS_COMPILE)gcc.
> > 
> > Should fix:
> > http://autobuild.buildroot.net/results/394/394414df25b0b7261b27ca5d4901fde0f639e73c/
> > http://autobuild.buildroot.net/results/6ad/6adbc8c77c2ca70246b31600ab66b37c56c1e89e/
> > http://autobuild.buildroot.net/results/70d/70dfd05acc9d951169267f2820ecedb37f0711fe/
> > 
> > Cc: Petr Kulhavy <brain@jikos.cz>
> > Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> > ---
> >   package/linuxptp/linuxptp.mk | 4 ++--
> >   1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/package/linuxptp/linuxptp.mk b/package/linuxptp/linuxptp.mk
> > index 5c2257c9d781..beb2591c3224 100644
> > --- a/package/linuxptp/linuxptp.mk
> > +++ b/package/linuxptp/linuxptp.mk
> > @@ -11,9 +11,9 @@ LINUXPTP_LICENSE = GPL-2.0+
> >   LINUXPTP_LICENSE_FILES = COPYING
> >   define LINUXPTP_BUILD_CMDS
> > -	$(TARGET_MAKE_ENV) $(MAKE) KBUILD_OUTPUT=$(TARGET_DIR) \
> > +	$(TARGET_MAKE_ENV) CROSS_COMPILE="$(TARGET_CROSS)" \
> > +		$(MAKE) KBUILD_OUTPUT=$(TARGET_DIR) \
> >   		EXTRA_CFLAGS="$(TARGET_CFLAGS)" EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \
> > -		CC="$(TARGET_CC)" \
> >   		-C $(@D) all
> >   endef
> 

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-07-02 18:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-01 21:09 [Buildroot] [PATCH] linuxptp: don't check host headers for target features Baruch Siach
2017-07-01 22:15 ` Petr Kulhavy
2017-07-01 22:36 ` Thomas Petazzoni
2017-07-02 13:41 ` Petr Kulhavy
2017-07-02 18:26   ` Baruch Siach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox