Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] gdb: fix target gdb build when host-gawk is built before
@ 2012-05-07 13:28 Thomas Petazzoni
  2012-05-07 19:41 ` Peter Korsgaard
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Petazzoni @ 2012-05-07 13:28 UTC (permalink / raw)
  To: buildroot

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 <thomas.petazzoni@free-electrons.com>
---
 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)
 
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Buildroot] [PATCH] gdb: fix target gdb build when host-gawk is built before
  2012-05-07 13:28 [Buildroot] [PATCH] gdb: fix target gdb build when host-gawk is built before Thomas Petazzoni
@ 2012-05-07 19:41 ` Peter Korsgaard
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Korsgaard @ 2012-05-07 19:41 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> When the crosstool-ng backend is used, host-gawk is built as a
 Thomas> dependency of the crosstool-ng package, and therefore an host 'gawk'
 Thomas> binary is installed in $(HOST_DIR).

 Thomas> When the target gdb package is also selected, this unfortunately leads
 Thomas> to a build failure, as reported on
 Thomas> http://buildroot.humanoidz.org/results/f19c0499d08212d8b5100fa9434e1197092957db/build-end.log.

 Thomas> The problem is that the ./configure of gdb detects gawk in the PATH,
 Thomas> but at compile time, it gdb fails to find gawk. This is due to the

I've dropped 'gdb' from this line. Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-05-07 19:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-07 13:28 [Buildroot] [PATCH] gdb: fix target gdb build when host-gawk is built before Thomas Petazzoni
2012-05-07 19:41 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox