* [Buildroot] [PATCH v3 RESEND] pkg-infra: make sure cross compiling is enabled when host == target
@ 2012-09-25 22:42 Arnout Vandecappelle
2012-09-26 7:25 ` Thomas Petazzoni
0 siblings, 1 reply; 6+ messages in thread
From: Arnout Vandecappelle @ 2012-09-25 22:42 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_TARGET_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>
---
RESEND I hit this again while compiling xserver_xorg-server...
v3: modify GNU_TARGET_NAME instead of GNU_HOST_NAME, which makes a lot
more sense of course. Thank you ThomasP!
I only tested this one with xserver_xorg-server on a Sourcery
x86_64 toolchain and with a simple config and an internal toolchain.
v2: -buildroot- instead of -buildroot_cross-, as suggested by ThomasP.
package/Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/Makefile.in b/package/Makefile.in
index 64508b2..30a542a 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -20,7 +20,7 @@ MAKE1:=$(HOSTMAKE) -j1
MAKE:=$(HOSTMAKE) -j$(PARALLEL_JOBS)
# Compute GNU_TARGET_NAME
-GNU_TARGET_NAME=$(ARCH)-unknown-linux-$(LIBC)$(ABI)
+GNU_TARGET_NAME=$(ARCH)-buildroot-linux-$(LIBC)$(ABI)
ifeq ($(BR2_TOOLCHAIN_BUILDROOT)$(BR2_TOOLCHAIN_CTNG_uClibc)$(BR2_TOOLCHAIN_EXTERNAL_UCLIBC),y)
LIBC=uclibc
--
tg: (919dca5..) t/force-cross (depends on: master)
^ permalink raw reply related [flat|nested] 6+ messages in thread* [Buildroot] [PATCH v3 RESEND] pkg-infra: make sure cross compiling is enabled when host == target
2012-09-25 22:42 [Buildroot] [PATCH v3 RESEND] pkg-infra: make sure cross compiling is enabled when host == target Arnout Vandecappelle
@ 2012-09-26 7:25 ` Thomas Petazzoni
2012-10-03 9:26 ` [Buildroot] [PATCH v3 RESEND-2] " Arnout Vandecappelle
0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2012-09-26 7:25 UTC (permalink / raw)
To: buildroot
Dear Arnout Vandecappelle (Essensium/Mind),
On Wed, 26 Sep 2012 00:42:42 +0200, Arnout Vandecappelle
(Essensium/Mind) wrote:
> 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_TARGET_NAME to buildroot.
>
> This problem exists for instance in xserver_xorg-server on x86_64.
I confirm the problem, and I think this is the right solution, but I
haven't had the time to test it. But anyway:
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
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] 6+ messages in thread
* [Buildroot] [PATCH v3 RESEND-2] pkg-infra: make sure cross compiling is enabled when host == target
2012-09-26 7:25 ` Thomas Petazzoni
@ 2012-10-03 9:26 ` Arnout Vandecappelle
2012-10-04 19:57 ` Thomas Petazzoni
2012-10-04 20:50 ` Peter Korsgaard
0 siblings, 2 replies; 6+ messages in thread
From: Arnout Vandecappelle @ 2012-10-03 9:26 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_TARGET_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>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
RESEND I hit this again while compiling xserver_xorg-server...
RESEND-2 And again, after testing the xorg updates.
Added ThomasP's Acked-by as well.
v3: modify GNU_TARGET_NAME instead of GNU_HOST_NAME, which makes a lot
more sense of course. Thank you ThomasP!
I only tested this one with xserver_xorg-server on a Sourcery
x86_64 toolchain and with a simple config and an internal toolchain.
v2: -buildroot- instead of -buildroot_cross-, as suggested by ThomasP.
package/Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/Makefile.in b/package/Makefile.in
index 64508b2..30a542a 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -20,7 +20,7 @@ MAKE1:=$(HOSTMAKE) -j1
MAKE:=$(HOSTMAKE) -j$(PARALLEL_JOBS)
# Compute GNU_TARGET_NAME
-GNU_TARGET_NAME=$(ARCH)-unknown-linux-$(LIBC)$(ABI)
+GNU_TARGET_NAME=$(ARCH)-buildroot-linux-$(LIBC)$(ABI)
ifeq ($(BR2_TOOLCHAIN_BUILDROOT)$(BR2_TOOLCHAIN_CTNG_uClibc)$(BR2_TOOLCHAIN_EXTERNAL_UCLIBC),y)
LIBC=uclibc
--
tg: (b2e0d96..) t/force-cross (depends on: master)
^ permalink raw reply related [flat|nested] 6+ messages in thread* [Buildroot] [PATCH v3 RESEND-2] pkg-infra: make sure cross compiling is enabled when host == target
2012-10-03 9:26 ` [Buildroot] [PATCH v3 RESEND-2] " Arnout Vandecappelle
@ 2012-10-04 19:57 ` Thomas Petazzoni
2012-10-04 20:50 ` Peter Korsgaard
1 sibling, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2012-10-04 19:57 UTC (permalink / raw)
To: buildroot
Peter,
Could you apply this one? It has been around for a very long time.
Thanks!
Thomas
On Wed, 3 Oct 2012 11:26:30 +0200, Arnout Vandecappelle
(Essensium/Mind) wrote:
> 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_TARGET_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>
> Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
> RESEND I hit this again while compiling xserver_xorg-server...
> RESEND-2 And again, after testing the xorg updates.
> Added ThomasP's Acked-by as well.
>
> v3: modify GNU_TARGET_NAME instead of GNU_HOST_NAME, which makes a lot
> more sense of course. Thank you ThomasP!
>
> I only tested this one with xserver_xorg-server on a Sourcery
> x86_64 toolchain and with a simple config and an internal
> toolchain.
>
> v2: -buildroot- instead of -buildroot_cross-, as suggested by ThomasP.
>
> package/Makefile.in | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/package/Makefile.in b/package/Makefile.in
> index 64508b2..30a542a 100644
> --- a/package/Makefile.in
> +++ b/package/Makefile.in
> @@ -20,7 +20,7 @@ MAKE1:=$(HOSTMAKE) -j1
> MAKE:=$(HOSTMAKE) -j$(PARALLEL_JOBS)
>
> # Compute GNU_TARGET_NAME
> -GNU_TARGET_NAME=$(ARCH)-unknown-linux-$(LIBC)$(ABI)
> +GNU_TARGET_NAME=$(ARCH)-buildroot-linux-$(LIBC)$(ABI)
>
> ifeq
> ($(BR2_TOOLCHAIN_BUILDROOT)$(BR2_TOOLCHAIN_CTNG_uClibc)$(BR2_TOOLCHAIN_EXTERNAL_UCLIBC),y)
> LIBC=uclibc
--
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] 6+ messages in thread
* [Buildroot] [PATCH v3 RESEND-2] pkg-infra: make sure cross compiling is enabled when host == target
2012-10-03 9:26 ` [Buildroot] [PATCH v3 RESEND-2] " Arnout Vandecappelle
2012-10-04 19:57 ` Thomas Petazzoni
@ 2012-10-04 20:50 ` Peter Korsgaard
2012-10-04 20:57 ` Thomas Petazzoni
1 sibling, 1 reply; 6+ messages in thread
From: Peter Korsgaard @ 2012-10-04 20:50 UTC (permalink / raw)
To: buildroot
>>>>> "Arnout" == Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> writes:
Arnout> When compiling for the same architecture and libc as the host,
Arnout> GNU_TARGET_NAME and GNU_HOST_NAME are equal. configure scripts use
Arnout> these to detect cross-compilation, and will decide that we're doing
Arnout> native compilation. This may trigger running of executables,
Arnout> which fail because of missing libraries in the host environment.
Arnout> To solve this, set the vendor part in GNU_TARGET_NAME to buildroot.
Arnout> This problem exists for instance in xserver_xorg-server on x86_64.
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-10-04 20:57 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-25 22:42 [Buildroot] [PATCH v3 RESEND] pkg-infra: make sure cross compiling is enabled when host == target Arnout Vandecappelle
2012-09-26 7:25 ` Thomas Petazzoni
2012-10-03 9:26 ` [Buildroot] [PATCH v3 RESEND-2] " Arnout Vandecappelle
2012-10-04 19:57 ` Thomas Petazzoni
2012-10-04 20:50 ` Peter Korsgaard
2012-10-04 20:57 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox