Skip to contentSkip to conversation

gdb: properly pass the PATH when building gdb for the host

PATCH New Thomas Petazzoni 2 participants 2 messages Nov 28, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gdb: properly pass the PATH when building gdb for the host

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.

---
 toolchain/gdb/gdb.mk |    1 +
 1 file changed, 1 insertion(+)
toolchain/gdb/gdb.mk +1 -0
index c42c755..4b8fe3a 100644
@@ -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
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 gdb: properly pass the PATH when building gdb for the host

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Thomas> When building gdb for the host, we properly pass the PATH (through Thomas> HOST_CONFIGURE_OPTS) during the configure step, but we forget to do so Thomas> for the compilation step.

Thomas> The result of this is that when the Crosstool-NG backend is used, gawk Thomas> is built and installed in $(HOST_DIR), as a dependency of the Thomas> crosstool-ng package.

Thomas> Then, the host gdb configure script detects this gawk binary Thomas> ($(HOST_DIR) is in the PATH), and assumes gawk is
Thomas> available. Unfortunately, during the compilation step, it fails to Thomas> find the expected gawk binary, because $(HOST_DIR) is no longer in the Thomas> PATH. This causes the following build failure:

Thomas> http://autobuild.buildroot.org/results/067d0c2ea01673ba98ec11de2426f1ab92dac800/build-end.log

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard