aboutsummaryrefslogtreecommitdiff
path: root/gdb/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/configure.in')
-rw-r--r--gdb/configure.in42
1 files changed, 28 insertions, 14 deletions
diff --git a/gdb/configure.in b/gdb/configure.in
index 624a77f..2ab19f7 100644
--- a/gdb/configure.in
+++ b/gdb/configure.in
@@ -1042,6 +1042,7 @@ case "${GDB_MULTI_ARCH}" in
GDB_MULTI_ARCH_PURE )
if test x"${targetfile}" != x ; then
AC_MSG_WARN("GDB: Ingoring TM_FILE in ${target_makefile_frag}")
+ targetfile=""
fi ;;
*) AC_MSG_ERROR("GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}");;
esac
@@ -1055,32 +1056,45 @@ fi
AC_SUBST(SUBDIRS)
# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
-# (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the
-# corresponding links. But we have to remove the xm.h files and tm.h
-# files anyway, e.g. when switching from "configure host" to
-# "configure none".
+# (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty
+# version.
files=
links=
+
rm -f xm.h
+xm_h=""
if test "${hostfile}" != ""; then
-files="${files} config/${gdb_host_cpu}/${hostfile}"
-links="${links} xm.h"
+ xm_h=xm.h
+ GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}"
+ files="${files} ${GDB_XM_FILE}"
+ links="${links} xm.h"
+ AC_DEFINE_UNQUOTED(GDB_XM_FILE, ${GDB_XM_FILE})
fi
+AC_SUBST(xm_h)
+
rm -f tm.h
+tm_h=""
if test "${targetfile}" != ""; then
-files="${files} config/${gdb_target_cpu}/${targetfile}"
-links="${links} tm.h"
+ tm_h=tm.h
+ GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}"
+ files="${files} ${GDB_TM_FILE}"
+ links="${links} tm.h"
+ AC_DEFINE_UNQUOTED(GDB_TM_FILE, ${GDB_TM_FILE})
fi
+AC_SUBST(tm_h)
+
rm -f nm.h
+nm_h=""
if test "${nativefile}" != ""; then
-files="${files} config/${gdb_host_cpu}/${nativefile}"
-links="${links} nm.h"
-else
-# A cross-only configuration.
-files="${files} config/nm-empty.h"
-links="${links} nm.h"
+ nm_h=nm.h
+ GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}"
+ files="${files} ${GDB_NM_FILE}"
+ links="${links} nm.h"
+ AC_DEFINE_UNQUOTED(GDB_NM_FILE, ${GDB_NM_FILE})
fi
+AC_SUBST(nm_h)
+
AC_PROG_LN_S
AC_LINK_FILES($files, $links)