Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2] pkg-infra: make sure cross compiling is enabled when host == target
Date: Sat, 14 Jul 2012 23:23:26 +0200	[thread overview]
Message-ID: <1342301006-3761-1-git-send-email-arnout@mind.be> (raw)
In-Reply-To: <20120713225522.62040e4f@skate>

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)

  reply	other threads:[~2012-07-14 21:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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   ` Arnout Vandecappelle [this message]
2012-07-14 23:13     ` [Buildroot] [PATCH v2] " Thomas Petazzoni

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=1342301006-3761-1-git-send-email-arnout@mind.be \
    --to=arnout@mind.be \
    --cc=buildroot@busybox.net \
    /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