diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-05-01 18:05:23 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-05-16 22:38:41 -0400 |
commit | 6df01ab8ab8509b04f86d7da069ec2d25eb31bf9 (patch) | |
tree | 21a00924bc74b7d5ec239a133d223f9d52f1dd67 /sim/frv | |
parent | 681eb80f1217f66c83dec4a3db83577a2a09f74a (diff) | |
download | gdb-6df01ab8ab8509b04f86d7da069ec2d25eb31bf9.zip gdb-6df01ab8ab8509b04f86d7da069ec2d25eb31bf9.tar.gz gdb-6df01ab8ab8509b04f86d7da069ec2d25eb31bf9.tar.bz2 |
sim: switch config.h usage to defs.h
The defs.h header will take care of including the various config.h
headers. For now, it's just config.h, but we'll add more when we
integrate gnulib in.
This header should be used instead of config.h, and should be the
first include in every .c file. We won't rely on the old behavior
where we expected files to include the port's sim-main.h which then
includes the common sim-basics.h which then includes config.h. We
have a ton of code that includes things before sim-main.h, and it
sometimes needs to be that way. Creating a dedicated header avoids
the ordering mess and implicit inclusion that shows up otherwise.
Diffstat (limited to 'sim/frv')
-rw-r--r-- | sim/frv/ChangeLog | 7 | ||||
-rw-r--r-- | sim/frv/cache.c | 3 | ||||
-rw-r--r-- | sim/frv/frv.c | 3 | ||||
-rw-r--r-- | sim/frv/interrupts.c | 3 | ||||
-rw-r--r-- | sim/frv/memory.c | 3 | ||||
-rw-r--r-- | sim/frv/options.c | 3 | ||||
-rw-r--r-- | sim/frv/pipeline.c | 3 | ||||
-rw-r--r-- | sim/frv/profile-fr400.c | 6 | ||||
-rw-r--r-- | sim/frv/profile-fr450.c | 6 | ||||
-rw-r--r-- | sim/frv/profile-fr500.c | 6 | ||||
-rw-r--r-- | sim/frv/profile-fr550.c | 6 | ||||
-rw-r--r-- | sim/frv/profile.c | 6 | ||||
-rw-r--r-- | sim/frv/registers.c | 3 | ||||
-rw-r--r-- | sim/frv/reset.c | 3 | ||||
-rw-r--r-- | sim/frv/sim-if.c | 3 | ||||
-rw-r--r-- | sim/frv/sim-main.h | 4 | ||||
-rw-r--r-- | sim/frv/traps.c | 3 |
17 files changed, 57 insertions, 14 deletions
diff --git a/sim/frv/ChangeLog b/sim/frv/ChangeLog index 6b93dd8..e9e9463 100644 --- a/sim/frv/ChangeLog +++ b/sim/frv/ChangeLog @@ -1,5 +1,12 @@ 2021-05-16 Mike Frysinger <vapier@gentoo.org> + * cache.c, frv.c, interrupts.c, memory.c, options.c, pipeline.c, + profile-fr400.c, profile-fr450.c, profile-fr500.c, profile-fr550.c, + profile.c, registers.c, reset.c, sim-if.c, traps.c: Include defs.h. + * sim-main.h: Delete config.h include. + +2021-05-16 Mike Frysinger <vapier@gentoo.org> + * config.in, configure: Regenerate. 2021-05-04 Mike Frysinger <vapier@gentoo.org> diff --git a/sim/frv/cache.c b/sim/frv/cache.c index c10d463..e569d52 100644 --- a/sim/frv/cache.c +++ b/sim/frv/cache.c @@ -17,6 +17,9 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ +/* This must come before any other includes. */ +#include "defs.h" + #define WANT_CPU frvbf #define WANT_CPU_FRVBF diff --git a/sim/frv/frv.c b/sim/frv/frv.c index fee59c2..aff9dc1 100644 --- a/sim/frv/frv.c +++ b/sim/frv/frv.c @@ -17,6 +17,9 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ +/* This must come before any other includes. */ +#include "defs.h" + #define WANT_CPU #define WANT_CPU_FRVBF diff --git a/sim/frv/interrupts.c b/sim/frv/interrupts.c index 0b8ed76..a657c68 100644 --- a/sim/frv/interrupts.c +++ b/sim/frv/interrupts.c @@ -17,6 +17,9 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ +/* This must come before any other includes. */ +#include "defs.h" + #define WANT_CPU frvbf #define WANT_CPU_FRVBF diff --git a/sim/frv/memory.c b/sim/frv/memory.c index 5978d15..681fea4 100644 --- a/sim/frv/memory.c +++ b/sim/frv/memory.c @@ -17,6 +17,9 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ +/* This must come before any other includes. */ +#include "defs.h" + #define WANT_CPU frvbf #define WANT_CPU_FRVBF diff --git a/sim/frv/options.c b/sim/frv/options.c index b5cc8de..3528c35 100644 --- a/sim/frv/options.c +++ b/sim/frv/options.c @@ -17,6 +17,9 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ +/* This must come before any other includes. */ +#include "defs.h" + #define WANT_CPU frvbf #define WANT_CPU_FRVBF diff --git a/sim/frv/pipeline.c b/sim/frv/pipeline.c index 564a33b..f8a5ba4 100644 --- a/sim/frv/pipeline.c +++ b/sim/frv/pipeline.c @@ -17,6 +17,9 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ +/* This must come before any other includes. */ +#include "defs.h" + #define WANT_CPU frvbf #define WANT_CPU_FRVBF diff --git a/sim/frv/profile-fr400.c b/sim/frv/profile-fr400.c index 06cf431..f6752d8 100644 --- a/sim/frv/profile-fr400.c +++ b/sim/frv/profile-fr400.c @@ -16,9 +16,11 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. +along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +/* This must come before any other includes. */ +#include "defs.h" -*/ #define WANT_CPU #define WANT_CPU_FRVBF diff --git a/sim/frv/profile-fr450.c b/sim/frv/profile-fr450.c index 0e8b01b..8e4f06b 100644 --- a/sim/frv/profile-fr450.c +++ b/sim/frv/profile-fr450.c @@ -16,9 +16,11 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. +along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +/* This must come before any other includes. */ +#include "defs.h" -*/ #define WANT_CPU #define WANT_CPU_FRVBF diff --git a/sim/frv/profile-fr500.c b/sim/frv/profile-fr500.c index 32d7f85..41ee067 100644 --- a/sim/frv/profile-fr500.c +++ b/sim/frv/profile-fr500.c @@ -16,9 +16,11 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. +along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +/* This must come before any other includes. */ +#include "defs.h" -*/ #define WANT_CPU #define WANT_CPU_FRVBF diff --git a/sim/frv/profile-fr550.c b/sim/frv/profile-fr550.c index 94837a7..af42d37 100644 --- a/sim/frv/profile-fr550.c +++ b/sim/frv/profile-fr550.c @@ -16,9 +16,11 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. +along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +/* This must come before any other includes. */ +#include "defs.h" -*/ #define WANT_CPU #define WANT_CPU_FRVBF diff --git a/sim/frv/profile.c b/sim/frv/profile.c index 441590e..0d2b6f4 100644 --- a/sim/frv/profile.c +++ b/sim/frv/profile.c @@ -16,9 +16,11 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. +along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +/* This must come before any other includes. */ +#include "defs.h" -*/ #define WANT_CPU #define WANT_CPU_FRVBF diff --git a/sim/frv/registers.c b/sim/frv/registers.c index 764a675..8a92038 100644 --- a/sim/frv/registers.c +++ b/sim/frv/registers.c @@ -17,6 +17,9 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ +/* This must come before any other includes. */ +#include "defs.h" + #define WANT_CPU #define WANT_CPU_FRVBF diff --git a/sim/frv/reset.c b/sim/frv/reset.c index 4cae799..c87b99f 100644 --- a/sim/frv/reset.c +++ b/sim/frv/reset.c @@ -17,6 +17,9 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ +/* This must come before any other includes. */ +#include "defs.h" + #define WANT_CPU #define WANT_CPU_FRVBF diff --git a/sim/frv/sim-if.c b/sim/frv/sim-if.c index 65e2937..c5fd93f 100644 --- a/sim/frv/sim-if.c +++ b/sim/frv/sim-if.c @@ -17,6 +17,9 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ +/* This must come before any other includes. */ +#include "defs.h" + #define WANT_CPU #define WANT_CPU_FRVBF #include "sim-main.h" diff --git a/sim/frv/sim-main.h b/sim/frv/sim-main.h index 25a0e56..1515c32 100644 --- a/sim/frv/sim-main.h +++ b/sim/frv/sim-main.h @@ -19,10 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* Main header for the frv. */ -/* sim-basics.h includes config.h but cgen-types.h must be included before - sim-basics.h and cgen-types.h needs config.h. */ -#include "config.h" - /* This is a global setting. Different cpu families can't mix-n-match -scache and -pbb. However some cpu families may use -simple while others use one of -scache/-pbb. ???? */ diff --git a/sim/frv/traps.c b/sim/frv/traps.c index 5e6a4d0..25b4e3e 100644 --- a/sim/frv/traps.c +++ b/sim/frv/traps.c @@ -17,6 +17,9 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ +/* This must come before any other includes. */ +#include "defs.h" + #define WANT_CPU frvbf #define WANT_CPU_FRVBF |