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/arm | |
parent | 681eb80f1217f66c83dec4a3db83577a2a09f74a (diff) | |
download | binutils-6df01ab8ab8509b04f86d7da069ec2d25eb31bf9.zip binutils-6df01ab8ab8509b04f86d7da069ec2d25eb31bf9.tar.gz binutils-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/arm')
-rw-r--r-- | sim/arm/ChangeLog | 7 | ||||
-rw-r--r-- | sim/arm/armcopro.c | 3 | ||||
-rw-r--r-- | sim/arm/armdefs.h | 1 | ||||
-rw-r--r-- | sim/arm/armemu.c | 3 | ||||
-rw-r--r-- | sim/arm/arminit.c | 3 | ||||
-rw-r--r-- | sim/arm/armos.c | 4 | ||||
-rw-r--r-- | sim/arm/armsupp.c | 3 | ||||
-rw-r--r-- | sim/arm/armvirt.c | 3 | ||||
-rw-r--r-- | sim/arm/iwmmxt.c | 3 | ||||
-rw-r--r-- | sim/arm/maverick.c | 3 | ||||
-rw-r--r-- | sim/arm/thumbemu.c | 3 | ||||
-rw-r--r-- | sim/arm/wrapper.c | 4 |
12 files changed, 37 insertions, 3 deletions
diff --git a/sim/arm/ChangeLog b/sim/arm/ChangeLog index c85e705..aabdae2 100644 --- a/sim/arm/ChangeLog +++ b/sim/arm/ChangeLog @@ -1,5 +1,12 @@ 2021-05-16 Mike Frysinger <vapier@gentoo.org> + * armcopro.c, armemu.c, arminit.c, armsupp.c, armvirt.c, iwmmxt.c, + maverick.c, thumbemu.c: Include defs.h. + * armos.c, wrapper.c: Replace config.h include with defs.h. + * armdefs.h: Delete config.h include. + +2021-05-16 Mike Frysinger <vapier@gentoo.org> + * config.in, configure: Regenerate. 2021-05-14 Mike Frysinger <vapier@gentoo.org> diff --git a/sim/arm/armcopro.c b/sim/arm/armcopro.c index 9227fc0..5cd33fb 100644 --- a/sim/arm/armcopro.c +++ b/sim/arm/armcopro.c @@ -14,6 +14,9 @@ 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" + #include "armdefs.h" #include "armos.h" #include "armemu.h" diff --git a/sim/arm/armdefs.h b/sim/arm/armdefs.h index 68cf199..7df5d022 100644 --- a/sim/arm/armdefs.h +++ b/sim/arm/armdefs.h @@ -14,7 +14,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>. */ -#include "config.h" #include <stdio.h> #include <stdlib.h> #include <stdint.h> diff --git a/sim/arm/armemu.c b/sim/arm/armemu.c index f93ad0c..ab74546 100644 --- a/sim/arm/armemu.c +++ b/sim/arm/armemu.c @@ -15,6 +15,9 @@ 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" + #include "armdefs.h" #include "armemu.h" #include "armos.h" diff --git a/sim/arm/arminit.c b/sim/arm/arminit.c index 3a626c8..bc5456f 100644 --- a/sim/arm/arminit.c +++ b/sim/arm/arminit.c @@ -14,6 +14,9 @@ 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" + #include <string.h> #include "armdefs.h" diff --git a/sim/arm/armos.c b/sim/arm/armos.c index 72bdf59..a3713a5 100644 --- a/sim/arm/armos.c +++ b/sim/arm/armos.c @@ -21,7 +21,9 @@ fun, and definign VAILDATE will define SWI 1 to enter SVC mode, and SWI 0x11 to halt the emulator. */ -#include "config.h" +/* This must come before any other includes. */ +#include "defs.h" + #include "ansidecl.h" #include "libiberty.h" diff --git a/sim/arm/armsupp.c b/sim/arm/armsupp.c index 11bb53c..1a5eeaf 100644 --- a/sim/arm/armsupp.c +++ b/sim/arm/armsupp.c @@ -14,6 +14,9 @@ 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" + #include "armdefs.h" #include "armemu.h" #include "ansidecl.h" diff --git a/sim/arm/armvirt.c b/sim/arm/armvirt.c index 4f95ed8..ba01a65 100644 --- a/sim/arm/armvirt.c +++ b/sim/arm/armvirt.c @@ -22,6 +22,9 @@ freed as they might be needed again. A single area of memory may be defined to generate aborts. */ +/* This must come before any other includes. */ +#include "defs.h" + #include "armos.h" #include "armdefs.h" #include "ansidecl.h" diff --git a/sim/arm/iwmmxt.c b/sim/arm/iwmmxt.c index 8e81824..c71d06f 100644 --- a/sim/arm/iwmmxt.c +++ b/sim/arm/iwmmxt.c @@ -15,6 +15,9 @@ 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" + #include <stdlib.h> #include <string.h> diff --git a/sim/arm/maverick.c b/sim/arm/maverick.c index 15041b6..fb62ccd 100644 --- a/sim/arm/maverick.c +++ b/sim/arm/maverick.c @@ -15,6 +15,9 @@ 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" + #include <assert.h> #include "armdefs.h" #include "ansidecl.h" diff --git a/sim/arm/thumbemu.c b/sim/arm/thumbemu.c index fa70d5b..6915d23 100644 --- a/sim/arm/thumbemu.c +++ b/sim/arm/thumbemu.c @@ -18,6 +18,9 @@ instruction into its corresponding ARM instruction, and using the existing ARM simulator. */ +/* This must come before any other includes. */ +#include "defs.h" + #ifndef MODET /* required for the Thumb instruction support */ #if 1 #error "MODET needs to be defined for the Thumb world to work" diff --git a/sim/arm/wrapper.c b/sim/arm/wrapper.c index d25184a..a1147e4 100644 --- a/sim/arm/wrapper.c +++ b/sim/arm/wrapper.c @@ -20,7 +20,9 @@ run.c and gdb (when the simulator is linked with gdb). All simulator interaction should go through this file. */ -#include "config.h" +/* This must come before any other includes. */ +#include "defs.h" + #include <stdio.h> #include <stdarg.h> #include <stdlib.h> |