aboutsummaryrefslogtreecommitdiff
path: root/sim/common/local.mk
AgeCommit message (Collapse)AuthorFilesLines
2024-01-12Update copyright year range in header of all files managed by GDBAndrew Burgess1-1/+1
This commit is the result of the following actions: - Running gdb/copyright.py to update all of the copyright headers to include 2024, - Manually updating a few files the copyright.py script told me to update, these files had copyright headers embedded within the file, - Regenerating gdbsupport/Makefile.in to refresh it's copyright date, - Using grep to find other files that still mentioned 2023. If these files were updated last year from 2022 to 2023 then I've updated them this year to 2024. I'm sure I've probably missed some dates. Feel free to fix them up as you spot them.
2023-12-21sim: common: add $LINENO rewriting support to genmloop scriptsMike Frysinger1-2/+4
The generated mloop files can trigger compile time warnings. It can be difficult to see/understand where the original code is coming from as all the diagnostics point to the generated output. Using #line pragmas, we can point people to the original source files. Unfortunately, this code is written in POSIX shell, and that lacks support for line number tracking. The $LINENO variable, even when available, can just be plain wrong. For example, when using dash and subshells, $LINENO can end up having negative values. Add a wrapper script that will uses awk to rewrite the $LINENO variable to the right value to avoid all that. Basically lineno.sh takes an input script, rewrites all uses of $LINENO into the actual line number (and $0 into the original file name), and then executes the temporary script. This commit doesn't actually add #line pragmas to any files. That comes next.
2023-12-20sim: cgen: unify the genmloop logic a bitMike Frysinger1-0/+5
Pull out the common parts of the genmloop invocation into the common code. This will make it easier to add more, and make the per-port differences a little more obvious.
2023-08-26Simplify definition of GUILETom Tromey1-1/+1
This patch sets GUILE to just plain 'guile'. In the distant ("devo") past, the top-level build did support building Guile in-tree. However, I don't think this really works any more. For one thing, there are no build dependencies on it, so there's no guarantee it would actually be built before the uses. This patch also removes the use of "-s" as an option to cgen scheme scripts. With my latest patch upstream, this is no longer needed. After the upstream changes, either Guile 2 or Guile 3 will work, with or without the compiler enabled. 2023-08-24 Tom Tromey <tom@tromey.com> * cgen.sh: Don't pass "-s" to cgen. * Makefile.in: Rebuild. * Makefile.am (GUILE): Simplify.
2023-01-18sim: unify sim-signal.o buildingMike Frysinger1-1/+1
Now that sim-main.h has been reduced significantly, we can remove it from sim-signal.c and unify it across all boards since it compiles to the same code.
2023-01-14sim: common: simplify modules.c depsMike Frysinger1-4/+1
Now that all ports (other than ppc) build in the top-level, we don't need to expand all the modules.c targets as a recursive dep. Each port depends on their respective file now, and the ppc port doesn't use it at all.
2023-01-14sim: common: move libcommon.a dep to ppc codeMike Frysinger1-5/+0
Rather than force this to be built ahead of time for all targets, move the dep to the ppc code since it's the only user of it now.
2023-01-14sim: common: move libcommon.a objects to sourcesMike Frysinger1-0/+1
This simplifies the build logic and avoids an Automake bug where the common_libcommon_a_OBJECTS variable isn't set in the arch libsim.a DEPENDENCIES for targets that, alphabetically, come before "common". We aren't affected by that bug with the current code, but as we move things out of SIM_ALL_RECURSIVE_DEPS and rely on finer dependencies, we will trip over it.
2023-01-14sim: common: simplify hw-config.h depsMike Frysinger1-3/+1
Now that all ports (other than ppc) build in the top-level, we don't need to expand all the hw-config.h targets as a recursive dep. Each port depends on their respective header now, and the ppc port doesn't use it at all.
2023-01-14sim: build: drop AM_MAKEFLAGS settingsMike Frysinger1-4/+0
We don't have any recursive builds anymore, so we can drop this logic.
2023-01-13sim: build: delete Make-common.in logicMike Frysinger1-1/+0
Now that all (other than ppc) build in the top-level, this logic is unused, so punt it all.
2023-01-10sim: common: move test-hw-events to top-level buildMike Frysinger1-0/+9
This is an internal developer target that isn't normally compiled, but it can still be occasionally useful. Move it to the top-level build so we can kill off common/Make-common.in.
2023-01-10sim: build: add basic framework for compiling arch objects in top-levelMike Frysinger1-1/+2
The code so far has been assuming that we only compile common/ objects. Now that we're ready to compile arch-specific objects, refactor some of the flags & checks a bit to support both.
2023-01-10sim: modules.c: move generation to top-levelMike Frysinger1-4/+24
Now that all arches create libsim.a from the top-level, we have full access to their inputs, and can move the actual generation from the subdir up to the top-level. This avoids recursive makes and will help simplify state passing between the two.
2023-01-10sim: modules: trigger generation from top-levelMike Frysinger1-0/+16
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-02sim: common: drop libcommon.a linkageMike Frysinger1-3/+1
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: cgen: hoist rules to the top-level buildMike Frysinger1-0/+60
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-01Update copyright year range in header of all files managed by GDBJoel Brobecker1-1/+1
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-21sim: hw-config.h: move generation to top-levelMike Frysinger1-0/+21
In order to compile arch objects from the top-level, we need to generate the hw-config.h header, so move that logic up to the top level first.
2022-12-21sim: build: hoist lists of common objects upMike Frysinger1-0/+54
In order to create libsim.a in the common dir, we need the list of objects for each target. To avoid duplicating the list with the recursive make in each port, pass it down as a variable. This is a temporary hack until the top-level creates libsim.a for ports.
2022-11-05sim: run: move linking into top-levelMike Frysinger1-1/+18
Automake will run each subdir individually before moving on to the next one. This means that the linking phase, a single threaded process, will not run in parallel with anything else. When we have to link ~32 ports, that's 32 link steps that don't take advantage of parallel systems. On my really old 4-core system, this cuts a multi-target build from ~60 sec to ~30 sec. We eventually want to move all compile+link steps to this common dir anyways, so might as well move linking now for a nice speedup. We use noinst_PROGRAMS instead of bin_PROGRAMS because we're taking care of the install ourselves rather than letting automake process it.
2022-11-03sim: move common flags to default AM_CPPFLAGSMike Frysinger1-6/+3
Since all host files we compile use these settings, move them out of libcommon.a and into the default AM_CPPFLAGS. This has the effect of dropping the custom per-target automake rules. Currently it saves us ~150 lines, but since it's about ~8 lines per object, the overhead will increase quite a bit as we merge more files into a single build. This also changes the object output names, so we have to tweak the rules that were pulling in the common objects when linking.
2022-11-02sim: split CPPFLAGS between build & hostMike Frysinger1-0/+1
In order to merge more common/ files into the top-level, we need to add more host flags to CPPFLAGS, and that conflicts with our current use with build-time tools. So split them apart like we do with all other build flags to avoid the issue.
2022-01-01Automatic Copyright Year update after running gdb/copyright.pyJoel Brobecker1-1/+1
This commit brings all the changes made by running gdb/copyright.py as per GDB's Start of New Year Procedure. For the avoidance of doubt, all changes in this commits were performed by the script.
2021-12-09sim: use ## for automake commentsMike Frysinger1-21/+21
The ## marker tells automake to not include the comment in its generated output, so use that in most places where the comment only makes sense in the inputs.
2021-11-28sim: unify syscall.o buildingMike Frysinger1-0/+1
Now that we've unified all the syscall tables, this file does not rely on any port-specific settings, so move it up to building as part of the common step so we only do it once in a multibuild.
2021-11-28sim: nltvals: pull target syscalls out into a dedicated source fileMike Frysinger1-0/+1
Like we just did for pulling out the errno map, pull out the syscall maps into a dedicated common file. Most newlib ports are using the same syscall map, but not all, which means we have to do a bit more work to migrate. This commit adds the maps and switches the ports using the common default syscall table over to it. Ports using unique syscall tables are still using the old targ-map.c logic. Switching common ports over is easy by checking NL_TARGET, but the ppc code needs a bit more cleanup here hence its larger diff.
2021-10-31sim: unify callback.o buildingMike Frysinger1-0/+1
Now that the use of TARGET_xxx defines have been removed, we can move this to the common logic so we only build it once for multi-targets.
2021-10-31sim: nltvals: pull target open flags out into a dedicated source fileMike Frysinger1-0/+1
Like we just did for pulling out the errno & signal maps, pull out the open flag map into a dedicated common file. All newlib ports are using the same map which makes it easy.
2021-10-31sim: nltvals: pull target signal out into a dedicated source fileMike Frysinger1-0/+1
Like we just did for pulling out the errno map, pull out the signal map into a dedicated common file. All newlib ports are using the same signal map which makes it easy.
2021-10-31sim: nltvals: pull target errno out into a dedicated source fileMike Frysinger1-0/+1
The current system maintains a list of target errno constants in the nltvals.def file, then runs a build-time tool to turn that into a C file. This list of errno values is the same for all arches, so we don't need the arch-specific flexibility. Further, these are only for newlib/libgloss environments, which makes it confusing to support other userland runtimes (like Linux). Let's simplify to make this easier to understand & build. We don't namespace the variables yet, but sets up the framework for it. Create a new target-newlib-errno.c template file. The template file is hand written, but the inline map is still automatically generated. This allows us to move it to the common set of objects so it's only built once in a multi-target build. Now we can remove the output from the gentmap build-time tool since it's checked into the tree. Then we stop including the errno lists in nltvals.def since nothing uses it.
2021-06-15sim: switch modules.c & version.c to stamp filesMike Frysinger1-2/+6
This fixes remaking of these files and avoids unnecessary rebuilds. Also add both to `make clean` to match other stamp files.
2021-06-14sim: enable silent rules in common buildsMike Frysinger1-3/+3
We only do the common code as automake simplifies the logic.
2021-06-12sim: start unifying portability shimsMike Frysinger1-0/+1
There are some functions that gnulib does not yet provide fallbacks for, so start a common file of our own for holding existing stubs.
2021-06-12sim: unify sim-load.o buildingMike Frysinger1-0/+6
Since this file does not rely on any port-specific settings, move it up to building as part of the common step so we only do it once in a multibuild.
2021-06-05sim: common: start dedicated local.mkMike Frysinger1-0/+37
This provides a space to generate things that we only need to build once per-arch. Some day that will be all of common/, but for now, we move the version.c management in.