From patchwork Mon May 7 13:28:28 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 157307 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id C76ECB6FA8 for ; Mon, 7 May 2012 23:28:49 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 704528A375; Mon, 7 May 2012 13:28:48 +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 IrWsq7nfdARc; Mon, 7 May 2012 13:28:46 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 990B58A38E; Mon, 7 May 2012 13:28:44 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 2CC3E8F753 for ; Mon, 7 May 2012 13:28:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 292E8A00FF for ; Mon, 7 May 2012 13:28:43 +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 Lg+-lCFtw1ub for ; Mon, 7 May 2012 13:28:41 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.free-electrons.com (mail.free-electrons.com [88.190.12.23]) by hemlock.osuosl.org (Postfix) with ESMTP id 20713A00BE for ; Mon, 7 May 2012 13:28:41 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 106) id BA2B618A; Mon, 7 May 2012 15:28:39 +0200 (CEST) Received: from localhost (humanoidz.org [82.247.183.72]) by mail.free-electrons.com (Postfix) with ESMTPSA id 4EE96142 for ; Mon, 7 May 2012 15:28:31 +0200 (CEST) From: Thomas Petazzoni To: buildroot@uclibc.org Date: Mon, 7 May 2012 15:28:28 +0200 Message-Id: <1336397308-7195-1-git-send-email-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 1.7.9.5 Subject: [Buildroot] [PATCH] gdb: fix target gdb build when host-gawk is built before 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 the crosstool-ng backend is used, host-gawk is built as a dependency of the crosstool-ng package, and therefore an host 'gawk' binary is installed in $(HOST_DIR). When the target gdb package is also selected, this unfortunately leads to a build failure, as reported on http://buildroot.humanoidz.org/results/f19c0499d08212d8b5100fa9434e1197092957db/build-end.log. The problem is that the ./configure of gdb detects gawk in the PATH, but at compile time, it gdb fails to find gawk. This is due to the fact that the gdb compilation process is started without the correct path. This patch fixes this by passing $(TARGET_MAKE_ENV) in the environment of the gdb compilation process. A better fix would be to switch gdb to the AUTOTARGETS infrastructure in the future. 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 b5c085b..0b85180 100644 --- a/toolchain/gdb/gdb.mk +++ b/toolchain/gdb/gdb.mk @@ -90,6 +90,7 @@ endif $(GDB_TARGET_DIR)/gdb/gdb: $(GDB_TARGET_DIR)/.configured # force ELF support since it fails due to BFD linking problems gdb_cv_var_elf=yes \ + $(TARGET_MAKE_ENV) \ $(MAKE) CC="$(TARGET_CC)" MT_CFLAGS="$(TARGET_CFLAGS)" \ -C $(GDB_TARGET_DIR)