diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-01-16 02:27:38 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-04-03 14:49:50 -0400 |
commit | a0e674c1ce2c877426f8a861c5294c535c5d49e6 (patch) | |
tree | 4a567f1db4f4312c5ab30bd837b893c2ee2e3d88 /sim/common/Make-common.in | |
parent | b6b1c790843087e67e85e7cfd3327a872c03c6bc (diff) | |
download | gdb-a0e674c1ce2c877426f8a861c5294c535c5d49e6.zip gdb-a0e674c1ce2c877426f8a861c5294c535c5d49e6.tar.gz gdb-a0e674c1ce2c877426f8a861c5294c535c5d49e6.tar.bz2 |
sim: add preliminary support for --enable-targets
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.
Diffstat (limited to 'sim/common/Make-common.in')
-rw-r--r-- | sim/common/Make-common.in | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in index a6875fe..c8445bc 100644 --- a/sim/common/Make-common.in +++ b/sim/common/Make-common.in @@ -467,9 +467,14 @@ CGEN_MAIN_CPU_DEPS = \ install: install-common $(SIM_EXTRA_INSTALL) install-common: installdirs + a=`basename "$$(pwd)"`; \ n=`echo run | sed '$(program_transform_name)'`; \ + [ "$(SIM_PRIMARY_TARGET)" = "$$a" ] || n="$$n-$$a"; \ $(INSTALL_PROGRAM) run$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT) - n=`echo libsim.a | sed s/libsim.a/lib$(target_alias)-sim.a/`; \ + n="$(target_alias)-sim"; \ + a=`basename "$$(pwd)"`; \ + [ "$(SIM_PRIMARY_TARGET)" = "$$a" ] || n="$$n-$$a"; \ + n="lib$$n.a"; \ $(INSTALL_DATA) libsim.a $(DESTDIR)$(libdir)/$$n ; \ ( cd $(DESTDIR)$(libdir) ; $(RANLIB) $$n ) |