diff options
author | Andrew Cagney <cagney@redhat.com> | 2000-08-02 11:11:47 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2000-08-02 11:11:47 +0000 |
commit | 5a2402b8e0a796b75b1d394fb73360f14e83cc33 (patch) | |
tree | 40429ff68097e7b230d471fd396f21e824048cb8 | |
parent | 7c7651b2d060887a0feadc50f525a8dfa5c24611 (diff) | |
download | gdb-5a2402b8e0a796b75b1d394fb73360f14e83cc33.zip gdb-5a2402b8e0a796b75b1d394fb73360f14e83cc33.tar.gz gdb-5a2402b8e0a796b75b1d394fb73360f14e83cc33.tar.bz2 |
Thu Jul 27 17:38:35 2000 Andrew Cagney <cagney@b1.cygnus.com>
* configure.in (targetfile): Ignore TM_FILE, don't just issue
warning.
(tm_h, xm_h, nm_h, GDB_TM_FILE, GDB_XM_FILE, GDB_NM_FILE): Define.
* acconfig.h (GDB_XM_FILE, GDB_TM_FILE, GDB_NM_FILE): Add.
* config/nm-empty.h: Delete.
* defs.h (xm.h, nm.h, tm.h): Only include when GDB_XM_FILE,
GDB_NM_FILE or GDB_TM_FILE defined.
* Makefile.in (defs_h): Replace tm.h, xm.h and nm.h with tm_h,
xm_h and nm_h macro that are defined by configure.
(tm_h, xm_h, tm_h): New.
* configure, config.in: Regenerate
* TODO: Update.
-rw-r--r-- | gdb/Makefile.in | 5 | ||||
-rw-r--r-- | gdb/TODO | 6 | ||||
-rw-r--r-- | gdb/acconfig.h | 8 | ||||
-rw-r--r-- | gdb/config.in | 9 | ||||
-rw-r--r-- | gdb/config/nm-empty.h | 2 | ||||
-rwxr-xr-x | gdb/configure | 72 | ||||
-rw-r--r-- | gdb/configure.in | 42 | ||||
-rw-r--r-- | gdb/defs.h | 28 |
8 files changed, 115 insertions, 57 deletions
diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 9be5d36..9d4aa8c 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -548,7 +548,10 @@ command_h = command.h 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) @@ -351,12 +351,6 @@ fundamental architectural change. 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, diff --git a/gdb/acconfig.h b/gdb/acconfig.h index f9e2b32..5b3531a 100644 --- a/gdb/acconfig.h +++ b/gdb/acconfig.h @@ -125,3 +125,11 @@ /* Multi-arch enabled. */ #undef GDB_MULTI_ARCH +/* hostfile */ +#undef GDB_XM_FILE + +/* targetfile */ +#undef GDB_TM_FILE + +/* nativefile */ +#undef GDB_NM_FILE diff --git a/gdb/config.in b/gdb/config.in index c850975..1571a9f 100644 --- a/gdb/config.in +++ b/gdb/config.in @@ -144,6 +144,15 @@ /* 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 diff --git a/gdb/config/nm-empty.h b/gdb/config/nm-empty.h deleted file mode 100644 index 7069d8c..0000000 --- a/gdb/config/nm-empty.h +++ /dev/null @@ -1,2 +0,0 @@ -/* This is just a dummy file to symlink to when GDB is configured as a - cross-only debugger. */ diff --git a/gdb/configure b/gdb/configure index ac046a8..88fc963 100755 --- a/gdb/configure +++ b/gdb/configure @@ -7524,6 +7524,7 @@ case "${GDB_MULTI_ARCH}" in 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 @@ -7537,34 +7538,56 @@ fi # 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 @@ -7588,12 +7611,12 @@ fi 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() { @@ -7604,7 +7627,7 @@ 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 @@ -7621,19 +7644,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6 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 @@ -7652,7 +7675,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=yes 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 @@ -7662,7 +7685,7 @@ 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) ;; @@ -7954,6 +7977,9 @@ s%@host_makefile_frag@%%g 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 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) @@ -79,7 +79,7 @@ #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 @@ -710,29 +710,35 @@ enum val_prettyprint }; -/* 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 |