aboutsummaryrefslogtreecommitdiff
path: root/toolchain/gdb/gdb.mk
diff options
context:
space:
mode:
authorGravatar "Steven J. Hill" <sjhill@realitydiluted.com>2007-02-06 18:17:31 +0000
committerGravatar "Steven J. Hill" <sjhill@realitydiluted.com>2007-02-06 18:17:31 +0000
commit4cdc4206218e8e2ed3bc5a31e2b5e157ec43f67c (patch)
treeb8534e07a74fdf06c576bad4f6e02e45a2d853a6 /toolchain/gdb/gdb.mk
parent3c28ac08814b8640ccf1584b9c24e7adfed65cee (diff)
downloadbuildroot-4cdc4206218e8e2ed3bc5a31e2b5e157ec43f67c.tar.gz
buildroot-4cdc4206218e8e2ed3bc5a31e2b5e157ec43f67c.tar.bz2
Fix building of GDB when using external toolchain.
Diffstat (limited to 'toolchain/gdb/gdb.mk')
-rw-r--r--toolchain/gdb/gdb.mk12
1 files changed, 9 insertions, 3 deletions
diff --git a/toolchain/gdb/gdb.mk b/toolchain/gdb/gdb.mk
index 366cbed989..4f1de29245 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