From 4cdc4206218e8e2ed3bc5a31e2b5e157ec43f67c Mon Sep 17 00:00:00 2001 From: "\"Steven J. Hill\"" Date: Tue, 6 Feb 2007 18:17:31 +0000 Subject: Fix building of GDB when using external toolchain. --- toolchain/gdb/gdb.mk | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'toolchain/gdb/gdb.mk') diff --git a/toolchain/gdb/gdb.mk b/toolchain/gdb/gdb.mk index 366cbed98..4f1de2924 100644 --- a/toolchain/gdb/gdb.mk +++ b/toolchain/gdb/gdb.mk @@ -3,8 +3,13 @@ # gdb # ###################################################################### +ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y) GDB_VERSION:=$(strip $(subst ",, $(BR2_GDB_VERSION))) #")) +else +GDB_VERSION:=$(strip $(subst ",, $(BR2_EXT_GDB_VERSION))) +#")) +endif ifeq ($(GDB_VERSION),snapshot) # Be aware that this changes daily.... @@ -70,7 +75,8 @@ $(GDB_TARGET_DIR)/.configured: $(GDB_DIR)/.unpacked (cd $(GDB_TARGET_DIR); \ gdb_cv_func_sigsetjmp=yes \ $(TARGET_CONFIGURE_OPTS) \ - CFLAGS_FOR_TARGET="$(TARGET_CFLAGS)" \ + CFLAGS_FOR_TARGET="$(TARGET_CFLAGS) $(TARGET_LDFLAGS)" \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_LDFLAGS)" \ $(GDB_TARGET_CONFIGURE_VARS) \ $(GDB_DIR)/configure \ --build=$(GNU_HOST_NAME) \ @@ -94,7 +100,7 @@ $(GDB_TARGET_DIR)/gdb/gdb: $(GDB_TARGET_DIR)/.configured $(STRIP) $(GDB_TARGET_DIR)/gdb/gdb $(TARGET_DIR)/usr/bin/gdb: $(GDB_TARGET_DIR)/gdb/gdb - install -c $(GDB_TARGET_DIR)/gdb/gdb $(TARGET_DIR)/usr/bin/gdb + install -c -D $(GDB_TARGET_DIR)/gdb/gdb $(TARGET_DIR)/usr/bin/gdb gdb_target: ncurses $(TARGET_DIR)/usr/bin/gdb @@ -153,7 +159,7 @@ ifeq ($(strip $(BR2_CROSS_TOOLCHAIN_TARGET_UTILS)),y) install -c $(GDB_SERVER_DIR)/gdbserver \ $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/target_utils/gdbserver endif - install -c $(GDB_SERVER_DIR)/gdbserver $(TARGET_DIR)/usr/bin/gdbserver + install -c -D $(GDB_SERVER_DIR)/gdbserver $(TARGET_DIR)/usr/bin/gdbserver gdbserver: $(TARGET_DIR)/usr/bin/gdbserver -- cgit v1.2.3