diff options
author | Mike Frysinger <vapier@gentoo.org> | 2015-03-14 23:41:25 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2015-03-16 01:23:52 -0400 |
commit | ae7d0cac8ce971f7108d270c1d3f8481919b1e86 (patch) | |
tree | 922127997fda3de2483ed896fba8ae88576bba5e /sim/common | |
parent | 9c5f41df36176d86afa65fc9b69b8fd6f6044547 (diff) | |
download | gdb-ae7d0cac8ce971f7108d270c1d3f8481919b1e86.zip gdb-ae7d0cac8ce971f7108d270c1d3f8481919b1e86.tar.gz gdb-ae7d0cac8ce971f7108d270c1d3f8481919b1e86.tar.bz2 |
sim: rename tconfig.in to tconfig.h
Rather than manually include tconfig.h when we think we'll need it (which
is error prone as it can define symbols we expect from config.h), have it
be included directly by config.h. Since we know we have to include that
header everywhere already, this will make sure tconfig.h isn't missed.
It should also be fine as tconfig.h is supposed to be simple and only set
up a few core defines for the target.
This allows us to stop symlinking it in place all the time and just use
it straight out of the respective source directory.
Diffstat (limited to 'sim/common')
-rw-r--r-- | sim/common/ChangeLog | 9 | ||||
-rw-r--r-- | sim/common/acinclude.m4 | 13 | ||||
-rw-r--r-- | sim/common/config.in | 2 | ||||
-rwxr-xr-x | sim/common/configure | 14 | ||||
-rw-r--r-- | sim/common/nrun.c | 1 | ||||
-rw-r--r-- | sim/common/run.c | 1 | ||||
-rw-r--r-- | sim/common/sim-basics.h | 5 | ||||
-rw-r--r-- | sim/common/tconfig.h (renamed from sim/common/tconfig.in) | 0 |
8 files changed, 18 insertions, 27 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index 08d3b93..b756733 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,12 @@ +2015-03-16 Mike Frysinger <vapier@gentoo.org> + + * acinclude.m4 (SIM_AC_COMMON): Call AH_BOTTOM. Delete logic for + symlinking tconfig.h to tconfig.in. + * config.in, configure: Regenerate. + * nrun.c, run.c, sim-basics.h: Delete tconfig.h include. + * tconfig.in: Rename file ... + * tconfig.h: ... here. + 2015-03-15 Mike Frysinger <vapier@gentoo.org> * dv-socker.h (dv_sockser_install): Declare. diff --git a/sim/common/acinclude.m4 b/sim/common/acinclude.m4 index f96ec35..2e1d31f 100644 --- a/sim/common/acinclude.m4 +++ b/sim/common/acinclude.m4 @@ -53,6 +53,9 @@ AR=${AR-ar} AC_SUBST(AR) AC_PROG_RANLIB +dnl Pull in the target configuration file directly. +AH_BOTTOM([#include "tconfig.h"]) + # Some of the common include files depend on bfd.h, and bfd.h checks # that config.h is included first by testing that the PACKAGE macro # is defined. @@ -247,16 +250,6 @@ dnl These are available to append to as desired. sim_link_files= sim_link_links= -dnl Create tconfig.h either from simulator's tconfig.in or default one -dnl in common. -sim_link_links=tconfig.h -if test -f ${srcdir}/tconfig.in -then - sim_link_files=tconfig.in -else - sim_link_files=../common/tconfig.in -fi - # targ-vals.def points to the libc macro description file. case "${target}" in *-*-*) TARG_VALS_DEF=../common/nltvals.def ;; diff --git a/sim/common/config.in b/sim/common/config.in index 5b8ebd8..e0ca8ae 100644 --- a/sim/common/config.in +++ b/sim/common/config.in @@ -210,3 +210,5 @@ /* Define to 1 if you need to in order for `stat' and other things to work. */ #undef _POSIX_SOURCE + +#include "tconfig.h" diff --git a/sim/common/configure b/sim/common/configure index add4c0f..db5f661 100755 --- a/sim/common/configure +++ b/sim/common/configure @@ -6541,6 +6541,8 @@ else fi + + # Some of the common include files depend on bfd.h, and bfd.h checks # that config.h is included first by testing that the PACKAGE macro # is defined. @@ -10623,7 +10625,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10626 "configure" +#line 10628 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10729,7 +10731,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10732 "configure" +#line 10734 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11210,14 +11212,6 @@ _ACEOF sim_link_files= sim_link_links= -sim_link_links=tconfig.h -if test -f ${srcdir}/tconfig.in -then - sim_link_files=tconfig.in -else - sim_link_files=../common/tconfig.in -fi - # targ-vals.def points to the libc macro description file. case "${target}" in *-*-*) TARG_VALS_DEF=../common/nltvals.def ;; diff --git a/sim/common/nrun.c b/sim/common/nrun.c index eccb0cb..e3f3c42 100644 --- a/sim/common/nrun.c +++ b/sim/common/nrun.c @@ -17,7 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* Need to be before general includes, to pick up e.g. _GNU_SOURCE. */ #ifdef HAVE_CONFIG_H #include "cconfig.h" -#include "tconfig.h" #endif #include <signal.h> diff --git a/sim/common/run.c b/sim/common/run.c index e474661..3be10ab 100644 --- a/sim/common/run.c +++ b/sim/common/run.c @@ -19,7 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifdef HAVE_CONFIG_H #include "cconfig.h" -#include "tconfig.h" #endif #include <signal.h> diff --git a/sim/common/sim-basics.h b/sim/common/sim-basics.h index 2a410bb..2730569 100644 --- a/sim/common/sim-basics.h +++ b/sim/common/sim-basics.h @@ -126,11 +126,6 @@ typedef enum { /* Basic definitions - ordered so that nothing calls what comes after it. */ -/* FIXME: conditionalizing tconfig.h on HAVE_CONFIG_H seems wrong. */ -#ifdef HAVE_CONFIG_H -#include "tconfig.h" -#endif - #include "ansidecl.h" #include "gdb/callback.h" #include "gdb/remote-sim.h" diff --git a/sim/common/tconfig.in b/sim/common/tconfig.h index fd8b5be..fd8b5be 100644 --- a/sim/common/tconfig.in +++ b/sim/common/tconfig.h |