diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-11-03 23:44:19 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-11-03 23:53:10 -0400 |
commit | e5c9e53c9b8d5c8519b251f91de7bc453d1086be (patch) | |
tree | 9d065cc2fadfc2b1d7f9e1fca1f6a6870cd4c1aa /sim/mips/m16run.c | |
parent | f2f105f518413ea3e4c212f89585f9a8a5dddcdd (diff) | |
download | binutils-e5c9e53c9b8d5c8519b251f91de7bc453d1086be.zip binutils-e5c9e53c9b8d5c8519b251f91de7bc453d1086be.tar.gz binutils-e5c9e53c9b8d5c8519b251f91de7bc453d1086be.tar.bz2 |
sim: mips: fix missing prototype in multi-run generation
The multi-run logic for mips involves a bit of codegen and rewriting
of files to include per-architecture prefixes. That can result in
files with missing prototypes which cause compiler errors. In the
case of mips-sde-elf targets, we have:
$srcdir/m16run.c -> $builddir/m16mips64r2_run.c
sim_engine_run -> m16mips64r2_engine_run
$srcdir/micromipsrun.c -> micromipsmicromips_run.c
sim_engine_run -> micromips64micromips_engine_run
micromipsmicromips_run.c:80:1: error: no previous prototype for 'micromips64micromips_engine_run' [-Werror=missing-prototypes]
80 | micromips64micromips_engine_run (SIM_DESC sd, int next_cpu_nr, int nr_cpus,
We generate headers for those prototypes in the configure script,
but only include them in the generated multi-run.c file. Update the
rewrite logic to turn the sim-engine.h include into the relevant
generated engine include so these files also have their prototypes.
$srcdir/m16run.c -> $builddir/m16mips64r2_run.c
sim-engine.h -> m16mips64r2_engine.h
$srcdir/micromipsrun.c -> micromipsmicromips_run.c
sim-engine.h -> micromips64micromips_engine.h
Diffstat (limited to 'sim/mips/m16run.c')
-rw-r--r-- | sim/mips/m16run.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sim/mips/m16run.c b/sim/mips/m16run.c index a04e3ee..bbe487e 100644 --- a/sim/mips/m16run.c +++ b/sim/mips/m16run.c @@ -24,6 +24,7 @@ #include "m16_idecode.h" #include "m32_idecode.h" #include "bfd.h" +#include "sim-engine.h" #define SD sd |