aboutsummaryrefslogtreecommitdiff
path: root/sim
AgeCommit message (Collapse)AuthorFilesLines
2023-01-10sim: erc32: move libsim.a creation to top-levelMike Frysinger3-100/+148
The objects are still compiled in the subdir, but the creation of the archive itself is in the top-level. This is a required step before we can move compilation itself up, and makes it easier to review. The downside is that each object compile is a recursive make instead of a single one. On my 4 core system, it adds ~100msec to the build per port, so it's not great, but it shouldn't be a big deal. This will go away of course once the top-level compiles objects.
2023-01-10sim: d10v: move libsim.a creation to top-levelMike Frysinger3-104/+157
The objects are still compiled in the subdir, but the creation of the archive itself is in the top-level. This is a required step before we can move compilation itself up, and makes it easier to review. The downside is that each object compile is a recursive make instead of a single one. On my 4 core system, it adds ~100msec to the build per port, so it's not great, but it shouldn't be a big deal. This will go away of course once the top-level compiles objects.
2023-01-10sim: cris: move libsim.a creation to top-levelMike Frysinger3-115/+205
The objects are still compiled in the subdir, but the creation of the archive itself is in the top-level. This is a required step before we can move compilation itself up, and makes it easier to review. The downside is that each object compile is a recursive make instead of a single one. On my 4 core system, it adds ~100msec to the build per port, so it's not great, but it shouldn't be a big deal. This will go away of course once the top-level compiles objects.
2023-01-10sim: cr16: move libsim.a creation to top-levelMike Frysinger3-116/+167
The objects are still compiled in the subdir, but the creation of the archive itself is in the top-level. This is a required step before we can move compilation itself up, and makes it easier to review. The downside is that each object compile is a recursive make instead of a single one. On my 4 core system, it adds ~100msec to the build per port, so it's not great, but it shouldn't be a big deal. This will go away of course once the top-level compiles objects.
2023-01-10sim: bpf: move libsim.a creation to top-levelMike Frysinger3-126/+207
The objects are still compiled in the subdir, but the creation of the archive itself is in the top-level. This is a required step before we can move compilation itself up, and makes it easier to review. The downside is that each object compile is a recursive make instead of a single one. On my 4 core system, it adds ~100msec to the build per port, so it's not great, but it shouldn't be a big deal. This will go away of course once the top-level compiles objects.
2023-01-10sim: bfin: move libsim.a creation to top-levelMike Frysinger3-125/+181
The objects are still compiled in the subdir, but the creation of the archive itself is in the top-level. This is a required step before we can move compilation itself up, and makes it easier to review. The downside is that each object compile is a recursive make instead of a single one. On my 4 core system, it adds ~100msec to the build per port, so it's not great, but it shouldn't be a big deal. This will go away of course once the top-level compiles objects.
2023-01-10sim: avr: move libsim.a creation to top-levelMike Frysinger3-121/+168
The objects are still compiled in the subdir, but the creation of the archive itself is in the top-level. This is a required step before we can move compilation itself up, and makes it easier to review. The downside is that each object compile is a recursive make instead of a single one. On my 4 core system, it adds ~100msec to the build per port, so it's not great, but it shouldn't be a big deal. This will go away of course once the top-level compiles objects.
2023-01-10sim: arm: move libsim.a creation to top-levelMike Frysinger3-125/+181
The objects are still compiled in the subdir, but the creation of the archive itself is in the top-level. This is a required step before we can move compilation itself up, and makes it easier to review. The downside is that each object compile is a recursive make instead of a single one. On my 4 core system, it adds ~100msec to the build per port, so it's not great, but it shouldn't be a big deal. This will go away of course once the top-level compiles objects.
2023-01-10sim: aarch64: move libsim.a creation to top-levelMike Frysinger4-129/+184
The objects are still compiled in the subdir, but the creation of the archive itself is in the top-level. This is a required step before we can move compilation itself up, and makes it easier to review. The downside is that each object compile is a recursive make instead of a single one. On my 4 core system, it adds ~100msec to the build per port, so it's not great, but it shouldn't be a big deal. This will go away of course once the top-level compiles objects.
2023-01-10sim: build: drop support for subdir extra depsMike Frysinger2-17/+0
Nothing uses this hook anymore, so punt it. It was largely used to track generated files (which we do in the top-level now) and extra header files (which we use automake depgen for now).
2023-01-10sim: modules: trigger generation from top-levelMike Frysinger18-10/+67
Add rules for tracking generated subdir modules.c files. This doesn't actually generate the file from the top-level, but allows us to add rules that need to be ordered wrt it. Once those changes land, we can rework this to actually generate from the top-level. This currently builds off of the objects that go into the libsim.a as we don't build those from the top-level either. Once we migrate that up, we can switch this to the source files directly. It's a bit hacky overall, but makes it easier to migrate things in smaller chunks, and we aren't going to keep this logic long term.
2023-01-04sim: mips: add multi source to built sourcesMike Frysinger2-1/+6
The multirun generation mode is a bit of a mess as generated run files depend on generate igen files, all with unknown names ahead of time. In the multirun mode, be lazy and declare all of these generated source files as built sources so they'll be created early on.
2023-01-05sim: Move getopt checking inside SIM_AC_PLATFORMTsukasa OI3-42/+46
This commit moves getopt declaration checker originally in sim/ configure.ac; added in commit 340aa4f6872c ("sim: Check known getopt definition existence") to sim/m4/sim_ac_platform.m4 (inside the SIM_AC_PLATFORM macro). It also regenerates configuration files using the maintainer mode.
2023-01-04sim: bpf: fix testsuite due to linker warnings [PR sim/29954]Guillermo E. Martinez1-4/+1
On a bpf-*-* testsuite fails: ./ld/ld-new: warning: test has a LOAD segment with RWX permissions Adjusting `--memory-size=10Mb' to the simulator bpf testsuite passes. Tested on bpf-*-*: Bug: https://sourceware.org/PR29954 sim/testsuite: * bpf/allinsn.exp (SIMFLAGS_FOR_TARGET): Adjust sim flags.
2023-01-04sim: Regenerate using the maintainer modeTsukasa OI1-1/+1
Those files have changed by regenerating using the maintainer mode. The first line of sim/ppc/pk.h have changed by an effect of the commit 319e41e83a40 ("sim: ppc: inline the sim-packages option").
2023-01-02sim: sh: move some generated source files to built sourcesMike Frysinger2-13/+20
This should have been part of the previous commit 80636a54bcfa2bca3dc8f ("sim: build: move generated headers to built sources"), but they were missed because they're .c files effectively treated as .h files.
2023-01-02sim: build: add var for tracking sim enable directlyMike Frysinger2-34/+69
Rather than rely on SIM_SUBDIRS being set, add a dedicated variable to track whether to enable the sim. While the current code works fine, it won't work as we remove the recursive make logic (i.e. the SIM_SUBDIRS variable).
2023-01-02sim: common: drop libcommon.a linkageMike Frysinger2-8/+3
All of these objects should be in libsim.a already, so don't link to it too. In practice it never gets used, but no point in listing it.
2023-01-02sim: build: move generated headers to built sourcesMike Frysinger14-123/+189
Automake's automatic header deptracking has a bootstrap problem where it can't detect generated headers when compiling. We've been handling that by adding a custom SIM_ALL_RECURSIVE_DEPS variable, but that only works when building objects recursively in subdirs. As we move those out to the top-level, we don't have any recursive steps anymore. The Automake approach is to declare those headers in BUILT_SOURCES. This isn't completely foolproof as the Automake manual documents: it only activates for `make all`, not `make foo.o`, but that shouldn't be a huge limitation as it only affects the initial compile. After that, rebuilds should work fine.
2023-01-02sim: cgen: drop common subdir build rulesMike Frysinger2-74/+0
Now that everything has been hoisted to the top-level, we can delete this unused logic.
2023-01-02sim: or1k: hoist cgen rules to top-levelMike Frysinger3-34/+21
2023-01-02sim: m32r: hoist cgen rules to top-levelMike Frysinger3-48/+37
2023-01-02sim: lm32: hoist cgen rules to top-levelMike Frysinger3-22/+21
2023-01-02sim: iq2000: hoist cgen rules to top-levelMike Frysinger3-26/+21
2023-01-02sim: frv: hoist cgen rules to top-levelMike Frysinger3-24/+21
2023-01-02sim: cris: hoist cgen rules to top-levelMike Frysinger3-33/+33
2023-01-02sim: bpf: hoist cgen rules to top-levelMike Frysinger3-90/+67
2023-01-02sim: cgen: hoist rules to the top-level buildMike Frysinger2-0/+113
The rules seem to generate the same output as existing subdir cgen rules with cgen ports, so hopefully this should be correct. These are the last set of codegen rules that we run in subdirs, so this will help unblock killing off subdir builds entirely.
2023-01-02sim: build: use Automake include varsMike Frysinger4-14/+4
Rather than define our own hack for emitting an include statement, use the existing Automake include variables. These have the nice side-effect of being more portable.
2023-01-01sim: replace -I$srcroot/bfd include with -I$srcrootMike Frysinger11-13/+13
Clean up includes a bit by making ports include bfd/ headers explicitly. This matches other projects, and makes it more clear where these headers are coming from.
2023-01-01sim: replace -I$srcroot/opcodes include with -I$srcrootMike Frysinger12-19/+19
Clean up includes a bit by making ports include opcodes/ headers explicitly. This matches other projects, and makes it more clear where these headers are coming from.
2023-01-01sim: build: drop unused SIM_EXTRA_LIBSMike Frysinger3-6/+1
Now that all run binaries are linked in the topdir, this subdir libs variable isn't used anywhere, so punt it.
2023-01-01sim: erc32: drop -I$(srcroot)Mike Frysinger1-1/+1
Since the port doesn't actually use this include, drop it. No other port is doing this either.
2023-01-01sim: drop mention of & support for subdir configureMike Frysinger3-105/+2
Now that no ports use these common configure APIs, delete the logic and remove it from the documentation.
2023-01-01sim: refresh copyright dates a bitMike Frysinger6-7/+7
Update a few files that were missed, and revert the generated Automake output that uses dates from Automake itself.
2023-01-01sim: or1k: drop unused rulesMike Frysinger1-12/+0
These rules are the same as the common ones, so drop them to simplify.
2023-01-01sim: iq2000: drop unused cpu define logicMike Frysinger1-6/+0
These defines seem to have been added in anticipation of adding another cpu port (IQ10BF?), but that was over 20 years ago, and that port has yet to materialize. So drop these compile flags since they don't do anything to the generated code. If another port ever shows up, it's easy enough to readd things as needed.
2023-01-01Update copyright year range in header of all files managed by GDBJoel Brobecker721-721/+721
This commit is the result of running the gdb/copyright.py script, which automated the update of the copyright year range for all source files managed by the GDB project to be updated to include year 2023.
2022-12-27sim: build: clean up unused codegen logicMike Frysinger2-11/+1
Now that all igen ports are in the top-level makefile, we don't need this logic in any subdirs anymore, so clean it up.
2022-12-27sim: mips: hoist "multi" igen rules up to common buildsMike Frysinger5-153/+248
Since these are the last mips igen rules, we can clean up a number of bits in the local Makefile.in.
2022-12-27sim: mips: hoist "m16" igen rules up to common buildsMike Frysinger5-111/+217
2022-12-27sim: mips: hoist "single" igen rules up to common buildsMike Frysinger5-79/+147
2022-12-27sim: mips: rename "igen" generation mode to "single"Mike Frysinger4-60/+60
The naming in here has grown organically and is confusing to follow. Originally there was only one set of rules for generating code from the igen sources, so calling it "tmp-igen" and such made sense. But when other multigen modes were added ("m16" & "multi") which also used igen, it's not clear what's common igen and what's specific to this generation mode. So rename the set of rules from "igen" to "single" so it's easier to follow.
2022-12-27sim: mips: hoist itable igen rules up to common buildsMike Frysinger3-62/+121
Since this rule is pretty simple, hoist it up to the common build.
2022-12-27sim: mips: unify itable generation (a bit)Mike Frysinger3-34/+26
The m16 & multi targets generate itable once even when all the other modules are generated multiple times. The default igen target will generate itable with everything else out of convenience. This means flags are passed which don't affect the generated itable there. We can unify the itable generation by making sure the right -F/-M filter variables are passed down. Since there's already a dedicated rule & variable in the multi build mode, generalize that and switch the m16 & igen builds over too. I spent a lot of time staring at this code, building for diff mips targets, and exploring all the shell code paths. I think this is safe, but only time (and users) will really tell.
2022-12-27sim: mips: rename multi_flags to igen_itable_flagsMike Frysinger4-16/+16
This variable is only used to generate the itable files. In preparation for merging the itable logic among all ports, rename "multi_flags" to a more appropriate "igen_itable_flags" variable. There should be no real chagnes here otherwise.
2022-12-27sim: mips: drop unused micromips igen logicMike Frysinger4-165/+2
This code appears to be unused since it was first merged. When micromips was enabled, it was via the "MULTI" config, not the "MICROMIPS" config, and the multi configs have sep vars. Since nothing sets SIM_MIPS_GEN=MICROMIPS in the config, all of this should be unreachable, so punt it to simplify. Further, the SIM_MIPS_MICROMIPS16_FLAGS & SIM_MIPS_MICROMIPS_FLAGS settings rely on sim_mips_micromips{,16}_{filter,machine} variables that are never set in the configure script.
2022-12-25sim: build: drop support for subdir distcleanMike Frysinger1-5/+2
All ports that need to clean things up at distclean time have moved to the top-level build, so we can drop support for this hook.
2022-12-25sim: mips: move distclean settings to common buildMike Frysinger3-28/+28
This was missed when mips/configure was merged into the top-level.
2022-12-25sim: smp: plumb igen flag down to all usersMike Frysinger8-17/+22
While mips has respected sim_igen_smp at configure time (which was always empty since it defaulted smp to off), no other igen port did. Move this to a makefile variable and plumb it through the common IGEN_RUN variable instead so everyone gets it by default. We also clean up some redundant -N0 setting with multirun mips.