From patchwork Wed Oct 22 09:30:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vicente Olivert Riera X-Patchwork-Id: 401968 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id D96F3140081 for ; Wed, 22 Oct 2014 20:30:19 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 17B67A1721; Wed, 22 Oct 2014 09:30:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4dgUBkm0NGHD; Wed, 22 Oct 2014 09:30:17 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id A9903A140E; Wed, 22 Oct 2014 09:30:17 +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 716931C2187 for ; Wed, 22 Oct 2014 09:30:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 6B0FB91E94 for ; Wed, 22 Oct 2014 09:30:16 +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 p86wtX3816pD for ; Wed, 22 Oct 2014 09:30:15 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mailapp01.imgtec.com (mailapp01.imgtec.com [195.59.15.196]) by whitealder.osuosl.org (Postfix) with ESMTP id B456091E90 for ; Wed, 22 Oct 2014 09:30:15 +0000 (UTC) Received: from KLMAIL01.kl.imgtec.org (unknown [192.168.5.35]) by Websense Email Security Gateway with ESMTPS id 92AB2BDB27366 for ; Wed, 22 Oct 2014 10:30:11 +0100 (IST) Received: from LEMAIL01.le.imgtec.org (192.168.152.62) by KLMAIL01.kl.imgtec.org (192.168.5.35) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 22 Oct 2014 10:30:13 +0100 Received: from localhost.localdomain (192.168.154.104) by LEMAIL01.le.imgtec.org (192.168.152.62) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 22 Oct 2014 10:30:12 +0100 From: Vicente Olivert Riera To: Date: Wed, 22 Oct 2014 10:30:08 +0100 Message-ID: <1413970208-16877-1-git-send-email-Vincent.Riera@imgtec.com> X-Mailer: git-send-email 1.7.1 MIME-Version: 1.0 X-Originating-IP: [192.168.154.104] Subject: [Buildroot] [PATCH v3] bash: fix linking for static builds with uClibc toolchains X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" bash fails to link for static builds with uClibc toolchains due to getenv redefinitions. This is caused because bash is unable to check if getenv is already defined when cross-compiling, so it defaults to 'yes': configure:14438: WARNING: cannot check getenv redefinition if cross compiling -- defaulting to yes We can avoid this redefinition by passing bash_cv_getenv_redef=no to the configure script. Related: http://lists.gnu.org/archive/html/bug-bash/2012-03/msg00052.html Fixes: http://autobuild.buildroot.net/results/a20/a2007e6dbcfe53e7cd837ae642869ee26376826a/ Signed-off-by: Vicente Olivert Riera --- package/bash/bash.mk | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/package/bash/bash.mk b/package/bash/bash.mk index 34a3a73..156652f 100644 --- a/package/bash/bash.mk +++ b/package/bash/bash.mk @@ -28,6 +28,13 @@ BASH_MAKE = $(MAKE1) # The static build needs some trickery ifeq ($(BR2_PREFER_STATIC_LIB),y) BASH_CONF_OPTS += --enable-static-link --without-bash-malloc +# Static builds with uClibc fail due to getenv redefinitions +# http://lists.gnu.org/archive/html/bug-bash/2012-03/msg00052.html +ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) +BASH_CONF_ENV += bash_cv_getenv_redef=no +else +BASH_CONF_ENV += bash_cv_getenv_redef=yes +endif endif # Make /bin/sh -> bash (no other shell, better than busybox shells)