All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] pkg-infra: make sure cross compiling is enabled when host == target
@ 2012-07-10 22:01 Arnout Vandecappelle
  2012-07-13 20:55 ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: Arnout Vandecappelle @ 2012-07-10 22:01 UTC (permalink / raw)
  To: buildroot

When compiling for the same architecture and libc as the host,
GNU_TARGET_NAME and GNU_HOST_NAME are equal.  configure scripts use
these to detect cross-compilation, and will decide that we're doing
native compilation.  This may trigger running of executables,
which fail because of missing libraries in the host environment.

To solve this, set the vendor part in GNU_HOST_NAME to buildroot_cross.

This problem exists for instance in xserver_xorg-server on x86_64.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

---
 Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index b80477f..9d1b9d6 100644
--- a/Makefile
+++ b/Makefile
@@ -200,7 +200,7 @@ unexport CXXFLAGS
 unexport GREP_OPTIONS
 unexport CONFIG_SITE
 
-GNU_HOST_NAME:=$(shell support/gnuconfig/config.guess)
+GNU_HOST_NAME:=$(shell support/gnuconfig/config.guess | sed s/-unknown-/-buildroot_cross-/)
 
 ##############################################################
 #
-- 
tg: (b8b57bb..) t/force-cross (depends on: master)

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

* [Buildroot] [PATCH] pkg-infra: make sure cross compiling is enabled when host == target
  2012-07-10 22:01 [Buildroot] [PATCH] pkg-infra: make sure cross compiling is enabled when host == target Arnout Vandecappelle
@ 2012-07-13 20:55 ` Thomas Petazzoni
  2012-07-14 21:23   ` [Buildroot] [PATCH v2] " Arnout Vandecappelle
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2012-07-13 20:55 UTC (permalink / raw)
  To: buildroot

Le Wed, 11 Jul 2012 00:01:20 +0200,
"Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be> a ?crit :

> When compiling for the same architecture and libc as the host,
> GNU_TARGET_NAME and GNU_HOST_NAME are equal.  configure scripts use
> these to detect cross-compilation, and will decide that we're doing
> native compilation.  This may trigger running of executables,
> which fail because of missing libraries in the host environment.
> 
> To solve this, set the vendor part in GNU_HOST_NAME to buildroot_cross.

Do you see a problem with setting it just to "buildroot"?
buildroot_cross looks a bit ugly to me.

Thanks,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* [Buildroot] [PATCH v2] pkg-infra: make sure cross compiling is enabled when host == target
  2012-07-13 20:55 ` Thomas Petazzoni
@ 2012-07-14 21:23   ` Arnout Vandecappelle
  2012-07-14 23:13     ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: Arnout Vandecappelle @ 2012-07-14 21:23 UTC (permalink / raw)
  To: buildroot

When compiling for the same architecture and libc as the host,
GNU_TARGET_NAME and GNU_HOST_NAME are equal.  configure scripts use
these to detect cross-compilation, and will decide that we're doing
native compilation.  This may trigger running of executables,
which fail because of missing libraries in the host environment.

To solve this, set the vendor part in GNU_HOST_NAME to buildroot.

This problem exists for instance in xserver_xorg-server on x86_64.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
v2: -buildroot- instead of -buildroot_cross-, as suggested by ThomasP.

 Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index b80477f..d1c4c2b 100644
--- a/Makefile
+++ b/Makefile
@@ -200,7 +200,7 @@ unexport CXXFLAGS
 unexport GREP_OPTIONS
 unexport CONFIG_SITE
 
-GNU_HOST_NAME:=$(shell support/gnuconfig/config.guess)
+GNU_HOST_NAME:=$(shell support/gnuconfig/config.guess | sed s/-unknown-/-buildroot-/)
 
 ##############################################################
 #
-- 
tg: (b8b57bb..) t/force-cross (depends on: master)

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

* [Buildroot] [PATCH v2] pkg-infra: make sure cross compiling is enabled when host == target
  2012-07-14 21:23   ` [Buildroot] [PATCH v2] " Arnout Vandecappelle
@ 2012-07-14 23:13     ` Thomas Petazzoni
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2012-07-14 23:13 UTC (permalink / raw)
  To: buildroot

Le Sat, 14 Jul 2012 23:23:26 +0200,
"Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be> a ?crit :

> When compiling for the same architecture and libc as the host,
> GNU_TARGET_NAME and GNU_HOST_NAME are equal.  configure scripts use
> these to detect cross-compilation, and will decide that we're doing
> native compilation.  This may trigger running of executables,
> which fail because of missing libraries in the host environment.
> 
> To solve this, set the vendor part in GNU_HOST_NAME to buildroot.
> 
> This problem exists for instance in xserver_xorg-server on x86_64.

Hum, after thinking a bit more about this, why would we change
GNU_HOST_NAME? It sounds strange to include "buildroot" in the name of
the build machine tuple. Adding it to the target machine tuple would
seem much more appropriate, no?

I.e:

GNU_TARGET_NAME=$(ARCH)-unknown-linux-$(LIBC)$(ABI)

changed to:

GNU_TARGET_NAME=$(ARCH)-buildroot-linux-$(LIBC)$(ABI)

No?

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

end of thread, other threads:[~2012-07-14 23:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-10 22:01 [Buildroot] [PATCH] pkg-infra: make sure cross compiling is enabled when host == target Arnout Vandecappelle
2012-07-13 20:55 ` Thomas Petazzoni
2012-07-14 21:23   ` [Buildroot] [PATCH v2] " Arnout Vandecappelle
2012-07-14 23:13     ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.