[Buildroot] [git commit] toolchain/gdb: strip tarball component when extracting

Peter Korsgaard jacmet at sunsite.dk
Wed Oct 5 14:46:50 UTC 2011

commit: http://git.buildroot.net/buildroot/commit/?id=c5da6f9553ac82fefbefb655ac0207bc58615ae4
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

For some tarballs of gdb (see next patch), the extracted directory is
*not* named after the version string (eg. gdb-6.6a extract into gdb-6.6/)

Create the appropriate directory first, then use --strip-{components,path}
when extracting gdb (the same way it is done for the generic package

At the same time, get rid of the snapshot special case, because:
 1- it's no longer available in the menu
 2- it would be handled by the above change

Signed-off-by: "Yann E. MORIN" <yann.morin.1998 at anciens.enib.fr>
Signed-off-by: Peter Korsgaard <jacmet at sunsite.dk>
 toolchain/gdb/gdb.mk |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/toolchain/gdb/gdb.mk b/toolchain/gdb/gdb.mk
index 4622616..85b892f 100644
--- a/toolchain/gdb/gdb.mk
+++ b/toolchain/gdb/gdb.mk
@@ -28,13 +28,8 @@ $(DL_DIR)/$(GDB_SOURCE):
 gdb-unpacked: $(GDB_DIR)/.unpacked
 $(GDB_DIR)/.unpacked: $(DL_DIR)/$(GDB_SOURCE)
-	mkdir -p $(TOOLCHAIN_DIR)
-ifeq ($(GDB_VERSION),snapshot)
-	GDB_REAL_DIR=$(shell \
-		tar jtf $(DL_DIR)/$(GDB_SOURCE) | head -1 | cut -d"/" -f1)
-	ln -sf $(TOOLCHAIN_DIR)/$(shell tar jtf $(DL_DIR)/$(GDB_SOURCE) | head -1 | cut -d"/" -f1) $(GDB_DIR)
+	mkdir -p $(GDB_DIR)
 ifneq ($(wildcard $(GDB_PATCH_DIR)),)
 	support/scripts/apply-patches.sh $(GDB_DIR) $(GDB_PATCH_DIR) \*.patch $(GDB_PATCH_EXTRA)

More information about the buildroot mailing list