From patchwork Wed Nov 28 16:34:52 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 202506 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 ACA842C0081 for ; Thu, 29 Nov 2012 03:35:05 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 1468BA01DA; Wed, 28 Nov 2012 16:35:03 +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 fP3HQFz5W2CO; Wed, 28 Nov 2012 16:35:01 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id D5192A014F; Wed, 28 Nov 2012 16:35:00 +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 9C2D88F74A for ; Wed, 28 Nov 2012 16:35:04 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 42B5189F7E for ; Wed, 28 Nov 2012 16:35:00 +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 SkeU7FnOKhan for ; Wed, 28 Nov 2012 16:34:57 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp.enix.org (smtp.enix.org [193.19.211.146]) by whitealder.osuosl.org (Postfix) with ESMTPS id C18DF89F5D for ; Wed, 28 Nov 2012 16:34:57 +0000 (UTC) Received: from [82.247.183.72] (helo=localhost) by smtp.enix.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1Tdkb7-0006cI-W5 for buildroot@uclibc.org; Wed, 28 Nov 2012 17:34:54 +0100 From: Thomas Petazzoni To: buildroot@uclibc.org Date: Wed, 28 Nov 2012 17:34:52 +0100 Message-Id: <1354120492-17059-1-git-send-email-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 1.7.9.5 Subject: [Buildroot] [PATCH] gdb: properly pass the PATH when building gdb for the host 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 building gdb for the host, we properly pass the PATH (through HOST_CONFIGURE_OPTS) during the configure step, but we forget to do so for the compilation step. The result of this is that when the Crosstool-NG backend is used, gawk is built and installed in $(HOST_DIR), as a dependency of the crosstool-ng package. Then, the host gdb configure script detects this gawk binary ($(HOST_DIR) is in the PATH), and assumes gawk is available. Unfortunately, during the compilation step, it fails to find the expected gawk binary, because $(HOST_DIR) is no longer in the PATH. This causes the following build failure: http://autobuild.buildroot.org/results/067d0c2ea01673ba98ec11de2426f1ab92dac800/build-end.log In order to fix this, we simply call the compilation step of gdb for the host with $(HOST_MAKE_ENV), as it should have been done from the beginning. Signed-off-by: Thomas Petazzoni --- toolchain/gdb/gdb.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/toolchain/gdb/gdb.mk b/toolchain/gdb/gdb.mk index c42c755..4b8fe3a 100644 --- a/toolchain/gdb/gdb.mk +++ b/toolchain/gdb/gdb.mk @@ -196,6 +196,7 @@ $(GDB_HOST_DIR)/.configured: $(GDB_DIR)/.unpacked $(GDB_HOST_DIR)/gdb/gdb: $(GDB_HOST_DIR)/.configured # force ELF support since it fails due to BFD linking problems + $(HOST_MAKE_ENV) \ gdb_cv_var_elf=yes \ $(MAKE) -C $(GDB_HOST_DIR) strip $(GDB_HOST_DIR)/gdb/gdb