diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2015-12-25 14:10:43 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2015-12-25 14:10:55 +0100 |
commit | 2fe84415b2385bb3666734c3941bd361ef0e2fa8 (patch) | |
tree | d0c79c80b2142ce2fc3e3806f68dad3b64b20ad4 /toolchain | |
parent | 4a74482dfa4955ceaf9087453c96d32cb7eca22d (diff) |
bfin: gdb compiles perfectly well with out-of-tree compile. thanks Mike for the help
Diffstat (limited to 'toolchain')
-rw-r--r-- | toolchain/gdb/Makefile | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/toolchain/gdb/Makefile b/toolchain/gdb/Makefile index 8f115f93e..821d9ad81 100644 --- a/toolchain/gdb/Makefile +++ b/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 $@ |