gdbcmd_h = gdbcmd.h $(command_h)
call_cmds_h = call-cmds.h
-defs_h = defs.h xm.h tm.h nm.h config.status config.h gdbarch.h ui-file.h
+xm_h = @xm_h@
+tm_h = @tm_h@
+nm_h = @nm_h@
+defs_h = defs.h $(xm_h) $(tm_h) $(nm_h) config.status config.h gdbarch.h ui-file.h
top_h = top.h
inferior_h = inferior.h $(breakpoint_h)
Add built-by, build-date, tm, xm, nm and anything else into gdb binary
so that you can see how the GDB was created.
-Some of these (*m.h) would be added to the generated config.h. That
-in turn would fix a long standing bug where by the build process many
-not notice a changed tm.h file. Since everything depends on config.h,
-a change to *m.h forces a change to config.h and, consequently forces
-a rebuild.
-
--
Add an "info bfd" command that displays supported object formats,
/* Multi-arch enabled. */
#undef GDB_MULTI_ARCH
+/* hostfile */
+#undef GDB_XM_FILE
+
+/* targetfile */
+#undef GDB_TM_FILE
+
+/* nativefile */
+#undef GDB_NM_FILE
/* Multi-arch enabled. */
#undef GDB_MULTI_ARCH
+/* hostfile */
+#undef GDB_XM_FILE
+
+/* targetfile */
+#undef GDB_TM_FILE
+
+/* nativefile */
+#undef GDB_NM_FILE
+
/* Define if you have the __argz_count function. */
#undef HAVE___ARGZ_COUNT
+++ /dev/null
-/* This is just a dummy file to symlink to when GDB is configured as a
- cross-only debugger. */
GDB_MULTI_ARCH_PURE )
if test x"${targetfile}" != x ; then
echo "configure: warning: "GDB: Ingoring TM_FILE in ${target_makefile_frag}"" 1>&2
+ targetfile=""
fi ;;
*) { echo "configure: error: "GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}"" 1>&2; exit 1; };;
esac
# 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"
+ cat >> confdefs.h <<EOF
+#define GDB_XM_FILE ${GDB_XM_FILE}
+EOF
+
fi
+
+
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"
+ cat >> confdefs.h <<EOF
+#define GDB_TM_FILE ${GDB_TM_FILE}
+EOF
+
fi
+
+
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"
+ cat >> confdefs.h <<EOF
+#define GDB_NM_FILE ${GDB_NM_FILE}
+EOF
+
fi
+
+
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:7568: checking whether ln -s works" >&5
+echo "configure:7591: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:7592: checking for Cygwin environment" >&5
+echo "configure:7615: checking for Cygwin environment" >&5
if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7597 "configure"
+#line 7620 "configure"
#include "confdefs.h"
int main() {
return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:7608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7631: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
CYGWIN=
test "$ac_cv_cygwin" = yes && CYGWIN=yes
echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:7625: checking for mingw32 environment" >&5
+echo "configure:7648: checking for mingw32 environment" >&5
if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7630 "configure"
+#line 7653 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:7637: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:7656: checking for executable suffix" >&5
+echo "configure:7679: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:7666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:7689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
*.c | *.o | *.obj | *.ilk | *.pdb) ;;
s%@target_makefile_frag@%%g
s%@frags@%$frags%g
s%@SUBDIRS@%$SUBDIRS%g
+s%@xm_h@%$xm_h%g
+s%@tm_h@%$tm_h%g
+s%@nm_h@%$nm_h%g
s%@LN_S@%$LN_S%g
s%@EXEEXT@%$EXEEXT%g
s%@subdirs@%$subdirs%g
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
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)
#define GDB_MULTI_ARCH_TM 2
/* The target is pure multi-arch. The MULTI-ARCH vector provides all
- definitions. "tm.h" is NOT included. */
+ definitions. "tm.h" is linked to an empty file. */
#define GDB_MULTI_ARCH_PURE 3
};
\f
-/* Host machine definition. This will be a symlink to one of the
- xm-*.h files, built by the `configure' script. */
+/* Optional host machine definition. Pure autoconf targets will not
+ need a "xm.h" file. This will be a symlink to one of the xm-*.h
+ files, built by the `configure' script. */
+#ifdef GDB_XM_FILE
#include "xm.h"
+#endif
-/* Native machine support. This will be a symlink to one of the
- nm-*.h files, built by the `configure' script. */
+/* Optional native machine support. Non-native (and possibly pure
+ multi-arch) targets do not need a "nm.h" file. This will be a
+ symlink to one of the nm-*.h files, built by the `configure'
+ script. */
+#ifdef GDB_NM_FILE
#include "nm.h"
+#endif
-/* Target machine definition. This will be a symlink to one of the
+/* Optional target machine definition. Pure multi-arch configurations
+ do not need a "tm.h" file. This will be a symlink to one of the
tm-*.h files, built by the `configure' script. */
-#if (GDB_MULTI_ARCH < GDB_MULTI_ARCH_PURE)
+#ifdef GDB_TM_FILE
#include "tm.h"
#endif
/* GDB_MULTI_ARCH is normally set by configure.in using information
from configure.tgt or the config/%/%.mt Makefile fragment. Since
- some targets have defined it in their tm.h file, don't provide a
- default until after "tm.h" has been included. (In the above #if,
- GDB_MULTI_ARCH will be interpreted as zero if it is not
- defined). */
+ some targets have defined it in their "tm.h" file, delay providing
+ a default definition until after "tm.h" has been included.. */
#ifndef GDB_MULTI_ARCH
#define GDB_MULTI_ARCH 0