Преглед изворни кода

bfin: gdb compiles perfectly well with out-of-tree compile. thanks Mike for the help

Waldemar Brodkorb пре 8 година
родитељ
комит
2fe84415b2
2 измењених фајлова са 9 додато и 10 уклоњено
  1. 0 3
      target/config/Config.in.gdb
  2. 9 7
      toolchain/gdb/Makefile

+ 0 - 3
target/config/Config.in.gdb

@@ -3,7 +3,6 @@
 
 choice
 prompt "GNU debugger version"
-default ADK_TOOLCHAIN_GDB_7_9_1 if ADK_TARGET_ARCH_BFIN
 default ADK_TOOLCHAIN_GDB_H8300_GIT if ADK_TARGET_ARCH_H8300
 default ADK_TOOLCHAIN_GDB_7_10_1
 
@@ -21,7 +20,6 @@ config ADK_TOOLCHAIN_GDB_7_10_1
 	bool "7.10.1"
 	depends on !ADK_TARGET_ARCH_AVR32
 	depends on !ADK_TARGET_ARCH_H8300
-	depends on !ADK_TARGET_ARCH_BFIN
 
 config ADK_TOOLCHAIN_GDB_7_9_1
 	bool "7.9.1"
@@ -31,7 +29,6 @@ config ADK_TOOLCHAIN_GDB_7_9_1
 config ADK_TOOLCHAIN_GDB_7_8_2
 	bool "7.8.2"
 	depends on !ADK_TARGET_ARCH_AVR32
-	depends on !ADK_TARGET_ARCH_BFIN
 	depends on !ADK_TARGET_ARCH_H8300
 
 config ADK_TOOLCHAIN_GDB_6_7_1

+ 9 - 7
toolchain/gdb/Makefile

@@ -6,6 +6,8 @@ include ../rules.mk
 include Makefile.inc
 include ${ADK_TOPDIR}/mk/buildhlp.mk
 
+GDB_BUILD_DIR:=		$(WRKBUILD)-obj
+
 ifeq (${ADK_MAKE_PARALLEL},y)
 GDB_MAKEOPTS+=		-j${ADK_MAKE_JOBS}
 endif
@@ -16,12 +18,12 @@ else
 CONFIGURE_ARGS:= 	--disable-sim
 endif
 
-$(WRKBUILD)/.headers:
 $(WRKBUILD)/.configured:
 	$(SED) 's/install_to_$(INSTALL_DEST) //' ${WRKBUILD}/libiberty/Makefile.in
-	(cd $(WRKBUILD); \
+	mkdir -p $(GDB_BUILD_DIR)
+	(cd $(GDB_BUILD_DIR); \
 		gdb_cv_func_sigsetjmp=yes \
-		./configure \
+		$(WRKBUILD)/configure \
 		--prefix=$(STAGING_HOST_DIR) \
 		--build=$(GNU_HOST_NAME) \
 		--host=$(GNU_HOST_NAME) \
@@ -45,17 +47,17 @@ $(WRKBUILD)/.configured:
 	touch $@
 
 $(WRKBUILD)/.compiled:
-	$(MAKE) ${GDB_MAKEOPTS} -C $(WRKBUILD) CFLAGS="-fPIC ${CFLAGS_FOR_BUILD}"
+	$(MAKE) ${GDB_MAKEOPTS} -C $(GDB_BUILD_DIR) CFLAGS="-fPIC ${CFLAGS_FOR_BUILD}"
 	touch $@
 
 $(WRKBUILD)/.installed:
-	$(INSTALL_BIN) $(WRKBUILD)/gdb/gdb $(TARGET_CROSS)gdb
+	$(INSTALL_BIN) $(GDB_BUILD_DIR)/gdb/gdb $(TARGET_CROSS)gdb
 ifeq ($(ADK_TARGET_SIM),y)
 ifeq ($(ADK_TARGET_ARCH_BFIN),y)
-	$(INSTALL_BIN) $(WRKBUILD)/sim/bfin/run $(TARGET_CROSS)run
+	$(INSTALL_BIN) $(GDB_BUILD_DIR)/sim/bfin/run $(TARGET_CROSS)run
 endif
 ifeq ($(ADK_TARGET_ARCH_H8300),y)
-	$(INSTALL_BIN) $(WRKBUILD)/sim/h8300/run $(TARGET_CROSS)run
+	$(INSTALL_BIN) $(GDB_BUILD_DIR)/sim/h8300/run $(TARGET_CROSS)run
 endif
 endif
 	touch $@