From patchwork Sun Jul 15 00:49:14 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnout Vandecappelle X-Patchwork-Id: 171042 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 1BAD22C007C for ; Sun, 15 Jul 2012 10:50:02 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id DF1D5A02AA; Sun, 15 Jul 2012 00:50:00 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id l1YEQLJbtNmm; Sun, 15 Jul 2012 00:49:56 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id AC114A02B0; Sun, 15 Jul 2012 00:49:56 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id CB1DB8F753 for ; Sun, 15 Jul 2012 00:49:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id BF04289AF8 for ; Sun, 15 Jul 2012 00:49:54 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KJos7BdJMpbD for ; Sun, 15 Jul 2012 00:49:48 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from viper.mind.be (132.79-246-81.adsl-static.isp.belgacom.be [81.246.79.132]) by whitealder.osuosl.org (Postfix) with ESMTPS id E8C7A89968 for ; Sun, 15 Jul 2012 00:49:19 +0000 (UTC) Received: from [172.16.2.6] (helo=vandecaa-laptop) by viper.mind.be with esmtp (Exim 4.69) (envelope-from ) id 1SqD1R-0001Y2-Hx; Sun, 15 Jul 2012 02:49:18 +0200 Received: from arnout by vandecaa-laptop with local (Exim 4.80) (envelope-from ) id 1SqD1Q-0007xB-TI; Sun, 15 Jul 2012 02:49:16 +0200 From: "Arnout Vandecappelle (Essensium/Mind)" To: buildroot@busybox.net Date: Sun, 15 Jul 2012 02:49:14 +0200 Message-Id: <1342313355-30517-1-git-send-email-arnout@mind.be> X-Mailer: git-send-email 1.7.10.4 Subject: [Buildroot] [PATCH v3] pkg-infra: make sure cross compiling is enabled when host == target X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net 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) --- 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 c5ad00a..01fdd90 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