Age | Commit message (Collapse) | Author | Files | Lines |
|
Reuse the bfd/development.sh script like most other project to
determine whether the current source tree is a dev build (e.g.
git) or a release build, and disable the warnings for releases.
|
|
Now that all ports (that use igen) build in the top-level and depend
on igen, we can move the conditional logic out of configure. We also
switch from noinst_LIBRARIES to EXTRA_LIBRARIES so that the library
is only built when needed (i.e. the igen tool is used).
|
|
We don't have any recursive builds anymore, so we can drop this logic.
|
|
Now that all (other than ppc) build in the top-level, we can disable
the recursive make calls to them. This speeds things up nicely.
|
|
|
|
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.
|
|
Now that all the subdirs handle their own builds, we can drop this
common rule as it's unused, and we don't want to use it anymore.
|
|
Now that all ports have moved to creating libsim.a in the top-level,
drop all the support code to create it in a subdir.
|
|
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.
|
|
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.
|
|
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.
|
|
The install code was using $SUBDIRS to track all enabled arches. This
works, but isn't great if we want to add a subdir that isn't an arch
port, or as we merge the subdirs into the top-level. Create a new var
explicitly to track the list of enabled arches instead.
|
|
This doesn't matter right now, but it will as we add more flags to
the recursive make step to pass state down.
|
|
This was needed when the install step was run in subdirs, but now
that we process that entirely in the top-level, we don't need to
pass this down, so drop it.
|
|
Now that we use libtool to link, we have to use it to install instead
of keeping the manual logic so we don't install wrapper shell scripts.
|
|
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.
|
|
This never worked before, but adding it to the common top-level dir
is pretty easy to do now that we're unified.
|
|
We still have to maintain custom install rules due to how we rename
arch-specific files with an arch prefix in their name, but we can at
least unify the logic in the common dir.
|
|
This matches what we do with targets already.
|
|
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.
|
|
We aren't using this just yet, but we will, so make it available to
building of common sim files.
|
|
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.
|
|
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.
|
|
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.
|
|
These rules don't depend on the target compiler settings, so hoist
the build logic up to the common builds for better parallelization.
|
|
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.
|
|
|
|
If we aren't building any sims, don't install the sim headers as they
won't be useful to anyone.
|
|
These rules don't depend on the target compiler settings, so hoist
the build logic up to the common builds for better parallelization.
We have to extend the genmloop.sh logic a bit to allow outputting
to a subdir since it always assumed cwd was the right place.
We leave the cgen maintainer rules in the subdirs for now as they
aren't normally run, and they rely on cgen logic that has not yet
been generalized.
|
|
These rules don't depend on the target compiler settings, so hoist
the build logic up to the common builds for better parallelization.
We leave the mips rules in place as they depend on complicated
arch-specific configure logic that needs to be untangled first.
|
|
These rules don't depend on the target compiler settings, so hoist
the build logic up to the common builds for better parallelization.
|
|
In preparation for this script generating more files, change the output
argument to specify a directory. This drops the stdout behavior, but
since no one really runs this tool directly, it's not a big deal.
|
|
These ports only use the pieces that have been unified, so we can
merge them into the common configure script and get rid of their
unique one entirely.
We still compile & link separate run programs, and have dedicated
subdir Makefiles, but the configure script portion is merged.
|
|
This will allow us to build the common code with the same inline
settings as the arch subdirs, and only do the test once.
|
|
Move these options up to the common dir so we only test & export
them once across all ports. It also enables -Werror usage on the
common files we've been pulling out of arch subdirs.
|
|
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.
|
|
We install libsim.a for people to link against, but haven't been
installing the header files to for its API. Export them!
|
|
The igen build fails for me like:
gcc -g -O2 -c ../../binutils-gdb/sim/igen/igen.c -o igen/igen.o
In file included from ../../binutils-gdb/sim/igen/igen.c:26:
../../binutils-gdb/sim/igen/lf.h:22:10: fatal error: ansidecl.h: No such file or directory
This patch fixes the problem by arranging for igen to find the
libiberty includes.
This seems slightly hacky to me, because libiberty is not a "build"
library, so it can't be linked against. However, since igen currently
only includes the header, it seems relatively safe.
2021-05-04 Tom Tromey <tromey@adacore.com>
* Makefile.in: Rebuild.
* Makefile.am (AM_CPPFLAGS): New variable.
|
|
Now that we have the common automake build with support for build-time
programs working, we can integrate the common tests into the default
`make check` flow.
|
|
This doesn't actually create one `run` program like other projects,
but creates multiple `run-$arch` targets. While it might not seem
that useful initially, this has some nice properties:
- Allows us to quickly build all sim targets in a single tree.
- Positions us better for converting targets over to a proper
multitarget build+install.
We don't have the ability to actually run tests against them, but
that's due to a limitation in gas: it doesn't support multitarget.
If that ever changes, we should be able to turn on our tests too.
We can improve the test framework to fallback to a system toolchain
if available to help mitigate that.
|
|
This simplifies the build a bit (especially for deps in port subdirs),
and avoids recursive make. This in turn speeds up the build, and sets
us up for multi-target.
|
|
The toplevel, common, and igen dirs all have their own code for
setting up toolchain settings. Unify all of that in a new macro.
|
|
This allows us to delete most of our custom test logic,
and avoids a recursive make for minor speed up.
|
|
This doesn't gain us much by itself, but it sets us up for using more
features as we try to unify ports and avoid recursive make.
|