Commit Graph

44 Commits

Author SHA1 Message Date
Andrew Burgess 7fb45a6895 sim/opcodes: Allow use of out of tree cgen source directory
When configuring with '--enbale-cgen-maint' the default for both the
opcodes/ and sim/ directories is to assume that the cgen source is
within the binutils-gdb source tree as binutils-gdb/cgen/.

In the old cvs days, this worked well, as cgen was just another
sub-module of the single cvs repository and could easily be checked
out within the binutils-gdb directory, and managed by cvs in the
normal way.

Now that binutils-gdb is in git, while cgen is still in cvs, placing
the cgen respository within the binutils-gdb tree is more troublesome,
and it would be nice if the two tools could be kept separate.

Luckily there is already some initial code in the configure.ac files
for both opcodes/ and sim/ to support having cgen be located outside
of the binutils-gdb tree, however, this was speculative code written
imagining a future where cgen would be built and installed to some
location.

Right now there is no install support for cgen, and so the configure
code in opcodes/ and sim/ doesn't really do anything useful.  In this
commit I repurpose this code to allow binutils-gdb to be configured so
that it can make use of a cgen source directory that is outside of the
binutils-gdb tree.

With this commit applied it is now possible to configure and build
binutils-gdb like this:

    /path/to/binutils-gdb/src/configure --enable-cgen-maint=/path/to/cgen/src/cgen/
    make all-opcodes
    make -C opcodes run-cgen-all

Just in case anyone is still using cgen inside the binutils-gdb tree,
I have left the default behaviour of '--enable-cgen-maint' (with no
parameter) unchanged, that is it looks for the cgen directory as
'binutils-gdb/cgen/'.

opcodes/ChangeLog:

	* configure.ac (enable-cgen-maint): Support passing path to cgen
	source tree.
	* configure: Regenerate.

sim/ChangeLog:

	* common/acinclude.m4 (enable-cgen-maint): Support passing path to
	cgen source tree.
	* cris/configure: Regenerate.
	* frv/configure: Regenerate.
	* iq2000/configure: Regenerate.
	* lm32/configure: Regenerate.
	* m32r/configure: Regenerate.
	* or1k/configure: Regenerate.
	* sh64/configure: Regenerate.
2018-12-06 12:21:10 +00:00
Simon Marchi d0ac1c4488 Bump to autoconf 2.69 and automake 1.15.1
When trying to run the update-gnulib.sh script in gdb, I get this:

Error: Wrong automake version (Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\${ <-- HERE ([^      =:+{}]+)}/ at /opt/automake/1.11.1/bin/automake line 4113.), we need 1.11.1.
Aborting.

Apparently, it's an issue with a regex in automake that triggers a
warning starting with Perl 5.22.  It has been fixed in automake 1.15.1.
So I think it's a good excuse to bump the versions of autoconf and
automake used in the gnulib import.  And to avoid requiring multiple
builds of autoconf/automake, it was suggested that we bump the required
version of those tools for all binutils-gdb.

For autoconf, the 2.69 version is universally available, so it's an easy
choice.  For automake, different distros and distro versions have
different automake versions.  But 1.15.1 seems to be the most readily
available as a package.  In any case, it's easy to build it from source.

I removed the version checks from AUTOMAKE_OPTIONS and AC_PREREQ,
because I don't think they are useful in our case.  They only specify a
lower bound for the acceptable version of automake/autoconf.  That's
useful if you let the user choose the version of the tool they want to
use, but want to set a minimum version (because you use a feature that
was introduced in that version).  In our case, we force people to use a
specific version anyway.  For the autoconf version, we have the check in
config/override.m4 that enforces the version we want.  It will be one
less thing to update next time we change autotools version.

I hit a few categories of problems that required some changes.  They are
described below along with the chosen solutions.

Problem 1:

  configure.ac:17: warning: AM_INIT_AUTOMAKE: two- and three-arguments forms are deprecated.  For more info, see:
  configure.ac:17: http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_005fINIT_005fAUTOMAKE-invocation

Solution 1:

  Adjust the code based on the example at that URL.

Problem 2 (in zlib/):

  Makefile.am: error: required file './INSTALL' not found
  Makefile.am:   'automake --add-missing' can install 'INSTALL'
  Makefile.am: error: required file './NEWS' not found
  Makefile.am: error: required file './AUTHORS' not found
  Makefile.am: error: required file './COPYING' not found
  Makefile.am:   'automake --add-missing' can install 'COPYING'

Solution 2:

  Add the foreign option to AUTOMAKE_OPTIONS.

Problem 3:

  doc/Makefile.am:20: error: support for Cygnus-style trees has been removed

Solution 3:

  Remove the cygnus options.

Problem 4:

  Makefile.am:656: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')

Solution 4:

  Rename "INCLUDES = " to "AM_CPPFLAGS += " (because AM_CPPFLAGS is
  already defined earlier).

Problem 5:

  doc/Makefile.am:71: warning: suffix '.texinfo' for Texinfo files is discouraged; use '.texi' instead
  doc/Makefile.am: warning: Oops!
  doc/Makefile.am:     It appears this file (or files included by it) are triggering
  doc/Makefile.am:     an undocumented, soon-to-be-removed automake hack.
  doc/Makefile.am:     Future automake versions will no longer place in the builddir
  doc/Makefile.am:     (rather than in the srcdir) the generated '.info' files that
  doc/Makefile.am:     appear to be cleaned, by e.g. being listed in CLEANFILES or
  doc/Makefile.am:     DISTCLEANFILES.
  doc/Makefile.am:     If you want your '.info' files to be placed in the builddir
  doc/Makefile.am:     rather than in the srcdir, you have to use the shiny new
  doc/Makefile.am:     'info-in-builddir' automake option.

Solution 5:

  Rename .texinfo files to .texi.

Problem 6:

  doc/Makefile.am: warning: Oops!
  doc/Makefile.am:     It appears this file (or files included by it) are triggering
  doc/Makefile.am:     an undocumented, soon-to-be-removed automake hack.
  doc/Makefile.am:     Future automake versions will no longer place in the builddir
  doc/Makefile.am:     (rather than in the srcdir) the generated '.info' files that
  doc/Makefile.am:     appear to be cleaned, by e.g. being listed in CLEANFILES or
  doc/Makefile.am:     DISTCLEANFILES.
  doc/Makefile.am:     If you want your '.info' files to be placed in the builddir
  doc/Makefile.am:     rather than in the srcdir, you have to use the shiny new
  doc/Makefile.am:     'info-in-builddir' automake option.

Solution 6:

  Remove the hack at the bottom of doc/Makefile.am and use
  the info-in-builddir automake option.

Problem 7:

  doc/Makefile.am:35: error: required file '../texinfo.tex' not found
  doc/Makefile.am:35:   'automake --add-missing' can install 'texinfo.tex'

Solution 7:

  Use the no-texinfo.tex automake option.  We also have one in
  texinfo/texinfo.tex, not sure if we should point to that, or move it
  (or a newer version of it added with automake --add-missing) to
  top-level.

Problem 8:

  Makefile.am:131: warning: source file 'config/tc-aarch64.c' is in a subdirectory,
  Makefile.am:131: but option 'subdir-objects' is disabled
  automake: warning: possible forward-incompatibility.
  automake: At least a source file is in a subdirectory, but the 'subdir-objects'
  automake: automake option hasn't been enabled.  For now, the corresponding output
  automake: object file(s) will be placed in the top-level directory.  However,
  automake: this behaviour will change in future Automake versions: they will
  automake: unconditionally cause object files to be placed in the same subdirectory
  automake: of the corresponding sources.
  automake: You are advised to start using 'subdir-objects' option throughout your
  automake: project, to avoid future incompatibilities.

Solution 8:

  Use subdir-objects, that means adjusting references to some .o that will now
  be in config/.

Problem 9:

  configure.ac:375: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
  ../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
  ../../lib/autoconf/general.m4:2601: _AC_COMPILE_IFELSE is expanded from...
  ../../lib/autoconf/general.m4:2617: AC_COMPILE_IFELSE is expanded from...
  ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from...
  ../../lib/autoconf/general.m4:2042: AC_CACHE_VAL is expanded from...
  ../../lib/autoconf/general.m4:2063: AC_CACHE_CHECK is expanded from...
  configure.ac:375: the top level

Solution 9:

  Use AC_LANG_SOURCE, or use proper quoting.

Problem 10 (in intl/):

  configure.ac:7: warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
  /usr/share/aclocal/threadlib.m4:36: gl_THREADLIB_EARLY_BODY is expanded from...
  /usr/share/aclocal/threadlib.m4:29: gl_THREADLIB_EARLY is expanded from...
  /usr/share/aclocal/threadlib.m4:318: gl_THREADLIB is expanded from...
  /usr/share/aclocal/lock.m4:9: gl_LOCK is expanded from...
  /usr/share/aclocal/intl.m4:211: gt_INTL_SUBDIR_CORE is expanded from...
  /usr/share/aclocal/intl.m4:25: AM_INTL_SUBDIR is expanded from...
  /usr/share/aclocal/gettext.m4:57: AM_GNU_GETTEXT is expanded from...
  configure.ac:7: the top level

Solution 10:

  Add AC_USE_SYSTEM_EXTENSIONS in configure.ac.

ChangeLog:

	* libtool.m4: Use AC_LANG_SOURCE.
	* configure.ac: Remove AC_PREREQ, use AC_LANG_SOURCE.
	* README-maintainer-mode: Update version requirements.
	* ar-lib: New file.
	* test-driver: New file.
	* configure: Re-generate.

bfd/ChangeLog:

	* Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11.
	(INCLUDES): Rename to ...
	(AM_CPPFLAGS): ... this.
	* configure.ac: Remove AC_PREREQ.
	* doc/Makefile.am (AUTOMAKE_OPTIONS): Remove 1.9, cygnus, add
	info-in-builddir no-texinfo.tex.
	(info_TEXINFOS): Rename bfd.texinfo to bfd.texi.
	* doc/bfd.texinfo: Rename to ...
	* doc/bfd.texi: ... this.
	* Makefile.in: Re-generate.
	* aclocal.m4: Re-generate.
	* config.in: Re-generate.
	* configure: Re-generate.
	* doc/Makefile.in: Re-generate.

binutils/ChangeLog:

	* configure.ac: Remove AC_PREREQ.
	* doc/Makefile.am (AUTOMAKE_OPTIONS): Remove cygnus, add
	info-in-builddir no-texinfo.tex.
	* Makefile.in: Re-generate.
	* aclocal.m4: Re-generate.
	* config.in: Re-generate.
	* configure: Re-generate.
	* doc/Makefile.in: Re-generate.

config/ChangeLog:

	* override.m4 (_GCC_AUTOCONF_VERSION): Bump from 2.64 to 2.69.

etc/ChangeLog:

	* configure.in: Remove AC_PREREQ.
	* configure: Re-generate.

gas/ChangeLog:

	* Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11, add subdir-objects.
	(TARG_CPU_O, OBJ_FORMAT_O, ATOF_TARG_O): Add config/ prefix.
	* configure.ac (TARG_CPU_O, OBJ_FORMAT_O, ATOF_TARG_O, emfiles,
	extra_objects): Add config/ prefix.
	* doc/as.texinfo: Rename to...
	* doc/as.texi: ... this.
	* doc/Makefile.am: Rename as.texinfo to as.texi throughout.
	Remove DISTCLEANFILES hack.
	(AUTOMAKE_OPTIONS): Remove 1.8, cygnus, add no-texinfo.tex and
	info-in-builddir.
	* Makefile.in: Re-generate.
	* aclocal.m4: Re-generate.
	* config.in: Re-generate.
	* configure: Re-generate.
	* doc/Makefile.in: Re-generate.

gdb/ChangeLog:

	* common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
	PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
	* configure.ac: Remove AC_PREREQ, add missing quoting.
	* gnulib/configure.ac: Modernize usage of
	AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
	* gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
	(AUTOMAKE_VERSION): Bump to 1.15.1.
	* configure: Re-generate.
	* config.in: Re-generate.
	* aclocal.m4: Re-generate.
	* gnulib/aclocal.m4: Re-generate.
	* gnulib/config.in: Re-generate.
	* gnulib/configure: Re-generate.
	* gnulib/import/Makefile.in: Re-generate.

gdb/gdbserver/ChangeLog:

	* configure.ac: Remove AC_PREREQ, add missing quoting.
	* configure: Re-generate.
	* config.in: Re-generate.
	* aclocal.m4: Re-generate.

gdb/testsuite/ChangeLog:

	* configure.ac: Remove AC_PREREQ.
	* configure: Re-generate.

gold/ChangeLog:

	* configure.ac: Remove AC_PREREQ, add missing quoting and usage
	of AC_LANG_SOURCE.
	* Makefile.in: Re-generate.
	* aclocal.m4: Re-generate.
	* configure: Re-generate.
	* testsuite/Makefile.in: Re-generate.

gprof/ChangeLog:

	* configure.ac: Remove AC_PREREQ.
	* Makefile.am: Remove DISTCLEANFILES hack.
	(AUTOMAKE_OPTIONS): Remove 1.11, add info-in-builddir.
	* Makefile.in: Re-generate.
	* aclocal.m4: Re-generate.
	* configure: Re-generate.
	* gconfig.in: Re-generate.

intl/ChangeLog:

	* configure.ac: Add AC_USE_SYSTEM_EXTENSIONS, remove AC_PREREQ.
	* configure: Re-generate.
	* config.h.in: Re-generate.
	* aclocal.m4: Re-generate.

ld/ChangeLog:

	* configure.ac: Remove AC_PREREQ.
	* Makefile.am: Remove DISTCLEANFILES hack, rename ld.texinfo to
	ld.texi, ldint.texinfo to ldint.texi throughout.
	(AUTOMAKE_OPTIONS): Add info-in-builddir.
	* README: Rename ld.texinfo to ld.texi, ldint.texinfo to
	ldint.texi throughout.
	* gen-doc.texi: Likewise.
	* h8-doc.texi: Likewise.
	* ld.texinfo: Rename to ...
	* ld.texi: ... this.
	* ldint.texinfo: Rename to ...
	* ldint.texi: ... this.
	* Makefile.in: Re-generate.
	* aclocal.m4: Re-generate.
	* config.in: Re-generate.
	* configure: Re-generate.

libdecnumber/ChangeLog:

	* configure.ac: Remove AC_PREREQ.
	* configure: Re-generate.
	* aclocal.m4.

libiberty/ChangeLog:

	* configure.ac: Remove AC_PREREQ.
	* configure: Re-generate.
	* config.in: Re-generate.

opcodes/ChangeLog:

	* Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11.
	* configure.ac: Remove AC_PREREQ.
	* Makefile.in: Re-generate.
	* aclocal.m4: Re-generate.
	* configure: Re-generate.

readline/ChangeLog.gdb:

	* configure: Re-generate.
	* examples/rlfe/configure: Re-generate.

sim/ChangeLog:

	* All configure.ac: Remove AC_PREREQ.
	* All configure: Re-generate.

zlib/ChangeLog.bin-gdb:

	* configure.ac: Modernize AC_INIT call, remove AC_PREREQ.
	* Makefile.am (AUTOMAKE_OPTIONS): Remove 1.8, cygnus, add
	foreign.
	* Makefile.in: Re-generate.
	* aclocal.m4: Re-generate.
	* configure: Re-generate.
2018-06-19 16:55:06 -04:00
Simon Marchi 37f980dc03 config: Sync with GCC
... and re-generate all possible configure files, since they may depend
on things in config/.

config/ChangeLog:

	Sync with GCC
	2018-06-08  Martin Liska  <mliska@suse.cz>

	* bootstrap-mpx.mk: Remove.

	2018-05-10  Martin Liska  <mliska@suse.cz>

	PR bootstrap/64914
	* bootstrap-ubsan.mk: Define UBSAN_BOOTSTRAP.

	2018-05-09  Joshua Watt <jpewhacker@gmail.com>

        * ax_pthread.m4: Add file.

	2018-05-08  Richard Biener  <rguenther@suse.de>

	PR bootstrap/85571
	* bootstrap-lto-noplugin.mk: Disable compare.
	* bootstrap-lto.mk: Supply contrib/compare-lto for do-compare.

	2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>

	PR bootstrap/85490
	* bootstrap-cet.mk (STAGE4_CFLAGS): New.

	2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/85485
	* bootstrap-cet.mk (STAGE2_CFLAGS): Remove -mcet.
	(STAGE3_CFLAGS): Likewise.

	2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/85485
	* cet.m4 (GCC_CET_FLAGS): Replace -mcet with -mshstk.

	2018-04-19  Jakub Jelinek  <jakub@redhat.com>

	* cet.m4 (GCC_CET_FLAGS): Default to --disable-cet, replace
	--enable-cet=default with --enable-cet=auto.

	2018-04-18  David Malcolm  <dmalcolm@redhat.com>

	PR jit/85384
	* acx.m4 (GCC_BASE_VER): Remove \$\$ from sed expression.
2018-06-18 09:33:48 -04:00
John Baldwin 5c887dd5f6 Honor an existing CC_FOR_BUILD in the environment for sim.
This matches the equivalent bits in bfd/acinclude.m4

sim/ChangeLog:

	* configure.ac: Honor existing CC_FOR_BUILD in environment.
	* configure: Regenerate.

sim/aarch64/ChangeLog:

	* configure: Regenerate.

sim/arm/ChangeLog:

	* configure: Regenerate.

sim/avr/ChangeLog:

	* configure: Regenerate.

sim/bfin/ChangeLog:

	* configure: Regenerate.

sim/common/ChangeLog:

	* acinclude.m4 (SIM_AC_COMMON) Honor existing CC_FOR_BUILD in
	environment.

sim/cr16/ChangeLog:

	* configure: Regenerate.

sim/cris/ChangeLog:

	* configure: Regenerate.

sim/d10v/ChangeLog:

	* configure: Regenerate.

sim/erc32/ChangeLog:

	* configure: Regenerate.

sim/frv/ChangeLog:

	* configure: Regenerate.

sim/ft32/ChangeLog:

	* configure: Regenerate.

sim/h8300/ChangeLog:

	* configure: Regenerate.

sim/iq2000/ChangeLog:

	* configure: Regenerate.

sim/lm32/ChangeLog:

	* configure: Regenerate.

sim/m32c/ChangeLog:

	* configure: Regenerate.

sim/m32r/ChangeLog:

	* configure: Regenerate.

sim/m68hc11/ChangeLog:

	* configure: Regenerate.

sim/mcore/ChangeLog:

	* configure: Regenerate.

sim/microblaze/ChangeLog:

	* configure: Regenerate.

sim/mips/ChangeLog:

	* configure: Regenerate.

sim/mn10300/ChangeLog:

	* configure: Regenerate.

sim/moxie/ChangeLog:

	* configure: Regenerate.

sim/msp430/ChangeLog:

	* configure: Regenerate.

sim/rl78/ChangeLog:

	* configure: Regenerate.

sim/rx/ChangeLog:

	* configure: Regenerate.

sim/sh/ChangeLog:

	* configure: Regenerate.

sim/sh64/ChangeLog:

	* configure: Regenerate.

sim/v850/ChangeLog:

	* configure: Regenerate.
2017-09-06 10:16:12 -07:00
Mike Frysinger ce39bd3890 sim: move many common settings from CPPFLAGS to config.h
Rather than stuffing the command line with a bunch of -D flags, start
moving things to config.h which is managed by autoheader.  This makes
the makefile a bit simpler and the build output tighter, and it makes
the migration to automake easier as there are fewer vars to juggle.

We'll want to move the other options out too, but it'll take more work.
2016-01-10 18:54:41 -05:00
Mike Frysinger e19418e02e sim: drop unused SIM_AC_OPTION_PACKAGES
This was imported from the ppc sim, but that was only used to control
a single file, and that is already governed by the hw models.  There's
no need to have a sep configure option here, especially since none of
the other sims are using it.  Even when the code is enabled, there's
no runtime overhead.
2016-01-10 17:54:04 -05:00
Mike Frysinger 16f7876d71 sim: allow the environment configure option everywhere
Currently ports have to call SIM_AC_OPTION_ENVIRONMENT explicitly in
order to make the configure flag available.  There's no real reason
to not allow this flag for all ports, so move it to the common sim
macro.  This way we get standard behavior across all ports too.
2016-01-10 17:03:36 -05:00
Mike Frysinger 35656e9521 sim: allow the assert configure option everywhere
Currently ports have to call SIM_AC_OPTION_ASSERT explicitly in order
to make the configure flag available, which none of them do.  There's
no real reason to not allow this flag for all ports, so move it to the
common sim macro.  This way we get standard behavior across all ports.
2016-01-10 16:13:13 -05:00
Mike Frysinger 99d8e87993 sim: drop targ-vals.def->nltvals.def indirection
We don't have alternative nltvals.def files, so always symlinking
the targ-vals.def file to it doesn't gain us anything.  It does
make the build more complicated though and a pain to convert to
something newer (like automake).  Drop the symlinking entirely.

In the future, we'll want to explode this file anyways into the
respective arch dirs so things can be selected dynamically at
runtime, so it's not like we'll be bringing this back.
2016-01-10 04:01:16 -05:00
Mike Frysinger 347fe5bb86 sim: allow the inline configure option everywhere
Currently ports have to call SIM_AC_OPTION_INLINE explicitly in order
to make the configure flag available.  There's no real reason to not
allow this flag for all ports, so move it to the common sim macro.
This way we get standard behavior across all ports too.
2016-01-10 03:36:32 -05:00
Mike Frysinger 0dc73ef7c3 sim: drop --enable-sim-{regparm,stdcall} options
These options were never exposed for most sims (just the ppc one),
and they are really only useful on 32-bit x86 systems.  Considering
modern systems tend to be 64-bit x86_64 and how well modern compilers
are at optimizing code, these have outlived their usefulness.
2016-01-10 03:15:01 -05:00
Mike Frysinger 22be3fbeac sim: drop --enable-sim-cflags option
No other sub directory provides such a configuration option, so
drop it from the sim dir as well.  This cleans up a good bit of
code in the process.

If people want to use custom flags for just the sim, they can
still run configure+make by hand in the sim subdir and use the
normal CFLAGS settings.
2016-01-10 02:54:59 -05:00
Mike Frysinger 936df7568a sim: drop common/cconfig.h in favor of a single config.h
The common subdir sets up a cconfig.h file to hold checks for the common
code.  In practice, most files still end up using config.h instead which
just leads to confusion.

Merge all the configure checks that went into cconfig.h into SIM_AC_COMMON
so we can drop the cconfig.h file altogether.  Now there is only a single
config.h file like normal.
2016-01-09 03:52:30 -05:00
Mike Frysinger 9bbf6f91c6 sim: punt x86-specific bswap logic
The compiler/C library should produce reasonable code for htonl/ntohl,
and at least glibc tries pretty hard to always produce good code for
them.  This logic only had support for 32-bit x86 systems anymore, and
it's unlikely people were even opting into this, so drop it all.
2016-01-04 05:04:30 -05:00
Mike Frysinger 0cb8d8513c sim: drop host endian configure option
The --enable-sim-hostendian flag was purely so people had an escape route
for when cross-compiling.  This is because historically, AC_C_BIGENDIAN
did not work in those cases.  That was fixed a while ago though, so we can
require that macro everywhere now and simplify a good bit of code.
2016-01-03 00:52:51 -05:00
Mike Frysinger 1ac72f0659 sim: convert to bfd_endian
Rather than re-invent endian defines, as well as maintain our own list
of OS & arch-specific includes, punt all that logic in favor of the bfd
ones already set up and maintained elsewhere.  We already rely on the
bfd library, so leveraging the endian aspect should be fine.
2016-01-03 00:18:07 -05:00
Mike Frysinger 1b393626ce sim: punt WITH_DEVICES & tconfig.h support
No arch is using this anymore, and we want all new ports using the
hardware framework instead.  Punt WITH_DEVICES and the two callbacks
device_io_{read,write}_buffer.

We can also punt the tconfig.h file as no port is using it anymore.
This fixes in-tree builds that get confused by picking up the wrong
one (common/ vs <port>/) caused by commit ae7d0cac8c.

Any port that needs to set up a global define can use their own
sim-main.h file that they must provide regardless.
2015-12-26 20:38:31 -05:00
Mike Frysinger 8d0978fb4b sim: use AS_HELP_STRING everywhere
This helps standardize the configure --help output.
2015-06-23 15:02:08 -04:00
Mike Frysinger 306f4178ef sim: update configure.in->configure.ac docs
A few places still refer to the configure.in file; update them.
2015-06-12 12:11:21 -04:00
Mike Frysinger a348708291 sim: drop -DTRACE from configure
No code uses this anymore and the symbol conflicts with the new TRACE
helper.  Punt it from configure.
2015-06-12 10:40:46 -04:00
Mike Frysinger bf12d44ee0 sim: fix the PKGVERSION define
This should be SIM, not GDB.
2015-04-13 02:41:10 -04:00
H.J. Lu 7fed4b0be6 Regenerate configure in sim
* arm/configure: Regenerated.
	* avr/configure: Likewise.
	* bfin/configure: Likewise.
	* common/configure: Likewise.
	* cr16/configure: Likewise.
	* cris/configure: Likewise.
	* d10v/configure: Likewise.
	* erc32/configure: Likewise.
	* frv/configure: Likewise.
	* ft32/configure: Likewise.
	* h8300/configure: Likewise.
	* igen/configure: Likewise.
	* iq2000/configure: Likewise.
	* lm32/configure: Likewise.
	* m32c/configure: Likewise.
	* m32r/configure: Likewise.
	* m68hc11/configure: Likewise.
	* mcore/configure: Likewise.
	* microblaze/configure: Likewise.
	* mips/configure: Likewise.
	* mn10300/configure: Likewise.
	* moxie/configure: Likewise.
	* msp430/configure: Likewise.
	* ppc/configure: Likewise.
	* rl78/configure: Likewise.
	* rx/configure: Likewise.
	* sh/configure: Likewise.
	* sh64/configure: Likewise.
	* v850/configure: Likewise.
2015-04-02 05:43:07 -07:00
H.J. Lu 0ceaf1ec96 Regenerate configure in sim
* arm/configure: Regenerated.
	* avr/configure: Likewise.
	* bfin/configure: Likewise.
	* common/configure: Likewise.
	* cr16/configure: Likewise.
	* cris/configure: Likewise.
	* d10v/configure: Likewise.
	* erc32/configure: Likewise.
	* frv/configure: Likewise.
	* ft32/configure: Likewise.
	* h8300/configure: Likewise.
	* igen/configure: Likewise.
	* iq2000/configure: Likewise.
	* lm32/configure: Likewise.
	* m32c/configure: Likewise.
	* m32r/configure: Likewise.
	* m68hc11/configure: Likewise.
	* mcore/configure: Likewise.
	* microblaze/configure: Likewise.
	* mips/configure: Likewise.
	* mn10300/configure: Likewise.
	* moxie/configure: Likewise.
	* msp430/configure: Likewise.
	* ppc/configure: Likewise.
	* rl78/configure: Likewise.
	* rx/configure: Likewise.
	* sh/configure: Likewise.
	* sh64/configure: Likewise.
	* v850/configure: Likewise.
2015-04-01 10:15:13 -07:00
Mike Frysinger aadc9410ba sim: update zlib handling
With zlib being mandatory, and the updated m4 configs, we need to regen
and use the new settings w/bfd to avoid linkage errors.
2015-04-01 01:07:57 -04:00
Mike Frysinger 30452bbe7e sim: fix sim-hardware configure option
The current default handling for the --enable-sim-hardware option ends up
forcing the value to whatever is set as the first argument when calling
the macro (by virtue of how autoconf works).  Relocate the setup code to
the 4th parameter of the AC_ARG_ENABLE macro to fix it.

This was caused by the simplification work in 1517bd2742.

Reported-by: Hans-Peter Nilsson <hans-peter.nilsson@axis.com>
2015-03-24 00:13:57 -04:00
Mike Frysinger 64dd13dfc2 sim: drop support for requiring hw support
Since no sim is using the "always" option to SIM_AC_OPTION_HARDWARE, and
we don't want to require hw support to always be enabled, drop the option.
This leads to a slight simplification in the macro too as we can collapse
the sim_hw_p variable.
2015-03-23 23:20:09 -04:00
Mike Frysinger 49cd1634b2 sim: dv-sockser: move build to common dir
If dv-sockser is available, lets add it to the common SIM_HW_OBJS
variable so it is always included automatically.  Now ports do not
have to shoe horn it in directly themselves.  It does mean it will
be compiled for targets that don't explicitly use it, but that's
really what we want anyways.
2015-03-23 04:40:07 -04:00
Mike Frysinger ae7d0cac8c sim: rename tconfig.in to tconfig.h
Rather than manually include tconfig.h when we think we'll need it (which
is error prone as it can define symbols we expect from config.h), have it
be included directly by config.h.  Since we know we have to include that
header everywhere already, this will make sure tconfig.h isn't missed.

It should also be fine as tconfig.h is supposed to be simple and only set
up a few core defines for the target.

This allows us to stop symlinking it in place all the time and just use
it straight out of the respective source directory.
2015-03-16 01:23:52 -04:00
Alan Modra 2974be626b Fix --diable-shared --enable-plugins build breakage
Directories that don't use libtool need to add -ldl (on most *nix
hosts) to provide dlopen for libbfd.

config/
	* plugins.m4 (AC_PLUGINS): If plugins are enabled, add -ldl to
	LIBS via AC_SEARCH_LIBS.
gdb/
	* acinclude.m4 (GDB_AC_CHECK_BFD): Don't add -ldl.
	* config.in: Regenerate.
sim/ppc/
	* configure.ac: Invoke AC_PLUGINS.
	* config.in: Regenerate.

and regen lots of configure files.
2014-08-19 21:59:56 +09:30
Roland McGrath faa743bb1b Regenerate sim configury. 2014-08-15 15:51:50 -07:00
Alan Modra bf3d9781ec Regenerate sim configure files to pick up support for powerpc64le in
libtool.m4.
2013-09-23 00:32:27 +00:00
Mike Frysinger 31e6ad7d64 sim: use AM_MAINTAINER_MODE
I noticed the sim code is using an old implementation of the maintainer logic.
I cut it over to the new macro (like gdb has been doing).  In practice, it
makes no difference currently as nothing in the sim tree uses it, but I have a
follow up commit for the Blackfin tree that needs it.
2013-06-05 01:42:13 +00:00
Mike Frysinger 1517bd2742 sim: rewrite SIM_AC_OPTION_HARDWARE a bit to simplify things
There's no need to put the majority of the logic into the 3rd arg of the
AC_ARG_ENABLE.  Coupled with the lack of indentation, it makes it hard to
follow, error prone to update, and duplicates code (with the 4th arg).

So pull the logic out of the 3rd arg and outside of the AC_ARG_ENABLE
macro.  This allows us to gut the 4th arg entirely, merge with the code
that followed the macro, and fix bugs related to the new dv-sockser in
the process.

Hopefully building the various sims with the default sim-hardware
settings, as well as with explicit --{dis,en}able-sim-hardware flags,
should all just work now.
2013-03-26 18:00:04 +00:00
H.J. Lu 6bb11ab3b2 Fix sim build when configured with --enable-plugins
* common/Make-common.in: Use lt_cv_dlopen_libs under PLUGINS
	condition.
	* common/acinclude.m4: Define lt_cv_dlopen_libs.
	* arm/configure: Regenerate.
	* avr/configure: Regenerate.
	* bfin/configure: Regenerate.
	* common/configure: Regenerate.
	* cr16/configure: Regenerate.
	* cris/configure: Regenerate.
	* d10v/configure: Regenerate.
	* erc32/configure: Regenerate.
	* frv/configure: Regenerate.
	* h8300/configure: Regenerate.
	* igen/configure: Regenerate.
	* iq2000/configure: Regenerate.
	* lm32/configure: Regenerate.
	* m32c/configure: Regenerate.
	* m32r/configure: Regenerate.
	* m68hc11/configure: Regenerate.
	* mcore/configure: Regenerate.
	* microblaze/configure: Regenerate.
	* mips/configure: Regenerate.
	* mn10300/configure: Regenerate.
	* moxie/configure: Regenerate.
	* ppc/configure: Regenerate.
	* rl78/configure: Regenerate.
	* rx/configure: Regenerate.
	* sh/configure: Regenerate.
	* sh64/configure: Regenerate.
	* testsuite/configure: Regenerate.
	* v850/configure: Regenerate.
2012-11-20 14:41:26 +00:00
Joel Brobecker 5f3ef9d035 Define PACKAGE macro in all sims' config.h.
Some of the common includes in include/gdb such as callback.h
include bfd.h.  But there was a recent change in bfd-in.h to
require that config.h be included before bfd.h can be included:

    /* PR 14072: Ensure that config.h is included first.  */
    #if !defined PACKAGE && !defined PACKAGE_VERSION
    #error config.h must be included before this header
    #endif

PACKAGE_VERSION is always defined by default by the AC_INIT autoconf
macro, but PACKAGE isn't.  This patch updates the SIM_AC_COMMON macro
to define it, and then regenerates all configure scripts and config.in
files.

sim/common/changeLog:

        * acinclude.m4 (SIM_AC_COMMON): Define PACKAGE.
        * config.in, configure: Regenerate.

sim/ChangeLog:

        * configure: Regenerate.

sim/arm/ChangeLog:

        * config.in, configure: Regenerate.

sim/avr/ChangeLog:

	* config.in, configure: Regenerate.

sim/bfin/ChangeLog:

	* config.in, configure: Regenerate.

sim/cr16/ChangeLog:

	* config.in, configure: Regenerate.

sim/cris/ChangeLog:

	* config.in, configure: Regenerate.

sim/d10v/ChangeLog:

	* config.in, configure: Regenerate.

sim/erc32/ChangeLog:

	* config.in, configure: Regenerate.

sim/frv/ChangeLog:

	* config.in, configure: Regenerate.

sim/h8300/ChangeLog:

	* config.in, configure: Regenerate.

sim/iq2000/ChangeLog:

	* config.in, configure: Regenerate.

sim/lm32/ChangeLog:

	* config.in, configure: Regenerate.

sim/m32c/ChangeLog:

	* config.in, configure: Regenerate.

sim/m32r/ChangeLog:

	* config.in, configure: Regenerate.

sim/m68hc11/ChangeLog:

	* config.in, configure: Regenerate.

sim/mcore/ChangeLog:

	* config.in, configure: Regenerate.

sim/microblaze/ChangeLog:

	* config.in, configure: Regenerate.

sim/mips/ChangeLog:

	* config.in, configure: Regenerate.

sim/mn10300/ChangeLog:

	* config.in, configure: Regenerate.

sim/moxie/ChangeLog:

	* config.in, configure: Regenerate.

sim/ppc/ChangeLog:

	* configure: Regenerate.

sim/rl78/ChangeLog:

	* config.in, configure: Regenerate.

sim/rx/ChangeLog:

	* config.in, configure: Regenerate.

sim/sh/ChangeLog:

	* config.in, configure: Regenerate.

sim/sh64/ChangeLog:

	* config.in, configure: Regenerate.

sim/v850/ChangeLog:

	* config.in, configure: Regenerate.

sim/testsuite/ChangeLog:

	* configure: Regenerate.
2012-06-15 17:20:10 +00:00
Mike Frysinger 2232061b1c [PATCH] sim: make sure to include strsignal prototype
Before POSIX standardized strsignal(), old systems would hide the
prototype unless the normal extension defines were enabled.  So use
the AC_USE_SYSTEM_EXTENSIONS helper for that.

Then make sure we include string.h ourselves in nrun.c rather than
relying on implicit includes via other sim headers.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-03-24 05:38:43 +00:00
Mike Frysinger db2e4d67e7 sim: generate build dependencies on the fly
Lift the code that GDB is using to generate dependencies on the fly and
port it over to the sim.  Now people shouldn't have to manually maintain
these in their Makefile's.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-12-03 18:23:51 +00:00
Mike Frysinger 4399a56be2 sim: dv-cfi: check for log2 support in libm when enabled
The dv-cfi model uses log2() internally, so make sure we automatically
link in libm when required.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-10-19 21:28:27 +00:00
Mike Frysinger 6ffe910a7e sim: move from common.m4 to SIM_AC_COMMON
Now that the sourceware tree generally requires autoconf-2.64, update
the sim tree to require that too.

This allows us to drop the long standing SIM_AC_COMMON/common.m4
workaround as autoconf 2.64+ seems to work for me.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-10-18 00:17:24 +00:00
Ralf Wildenhues 3725885a65 Sync Libtool from GCC.
/:
	* libtool.m4: Sync from git Libtool.
	* ltmain.sh: Likewise.
	* ltoptions.m4: Likewise.
	* ltversion.m4: Likewise.
	* lt~obsolete.m4: Likewise.

sim/iq2000/:
	* configure: Regenerate.

sim/d10v/:
	* configure: Regenerate.

sim/m32r/:
	* configure: Regenerate.

sim/frv/:
	* configure: Regenerate.

sim/:
	* avr/configure: Regenerate.
	* cris/configure: Regenerate.
	* microblaze/configure: Regenerate.

sim/h8300/:
	* configure: Regenerate.

sim/mn10300/:
	* configure: Regenerate.

sim/erc32/:
	* configure: Regenerate.

sim/arm/:
	* configure: Regenerate.

sim/m68hc11/:
	* configure: Regenerate.

sim/lm32/:
	* configure: Regenerate.

sim/sh64/:
	* configure: Regenerate.

sim/v850/:
	* configure: Regenerate.

sim/cr16/:
	* configure: Regenerate.

sim/moxie/:
	* configure: Regenerate.

sim/m32c/:
	* configure: Regenerate.

sim/mips/:
	* configure: Regenerate.

sim/mcore/:
	* configure: Regenerate.

sim/sh/:
	* configure: Regenerate.

gprof/:
	* Makefile.in: Regenerate.
	* configure: Regenerate.

opcodes/:
	* Makefile.in: Regenerate.
	* configure: Regenerate.

gas/:
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* doc/Makefile.in: Regenerate.

ld/:
	* configure: Regenerate.

gdb/testsuite/:
	* gdb.cell/configure: Regenerate.

binutils/:
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* doc/Makefile.in: Regenerate.

bfd/:
	* Makefile.in: Regenerate.
	* configure: Regenerate.

bfd/doc/:
	* Makefile.in: Regenerate.
2010-01-09 21:11:44 +00:00
Joel Brobecker 5912faddb2 * common/aclocal.m4: Add include of ../../config/zlib.m4.
* common/common.m4: Use AM_ZLIB to check for zlib support.
        * ppc/configure.ac: Likewise.
        * arm/configure, avr/configure, common/configure, cr16/configure,
        cris/configure, d10v/configure, erc32/configure, frv/configure,
        h8300/configure, iq2000/configure, lm32/configure, m32c/configure,
        m32r/configure, m68hc11/configure, mcore/configure,
        microblaze/configure, mips/configure, mn10300/configure,
        moxie/configure, ppc/configure, sh/configure, sh64/configure,
        v850/configure: Regenerate.
2009-11-24 22:58:08 +00:00
Ralf Wildenhues 81ecdfbb4d Regenerate tree using Autoconf 2.64 and Automake 1.11.
config/:
	* override.m4 (_GCC_AUTOCONF_VERSION): Bump to 2.64.

/:
	* configure: Regenerate.

etc/:
	* configure: Regenerate.

sim/common/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/iq2000/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/d10v/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/igen/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/m32r/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/frv/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/:
	* avr/config.in: Regenerate.
	* avr/configure: Likewise.
	* configure: Likewise.
	* cris/config.in: Likewise.
	* cris/configure: Likewise.

sim/h8300/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/mn10300/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/ppc/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/erc32/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/arm/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/m68hc11/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/lm32/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/sh64/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/v850/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/cr16/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/moxie/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/m32c/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/mips/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/mcore/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/testsuite/d10v-elf/:
	* configure: Regenerate.

sim/testsuite/:
	* configure: Regenerate.

sim/testsuite/frv-elf/:
	* configure: Regenerate.

sim/testsuite/m32r-elf/:
	* configure: Regenerate.

sim/testsuite/mips64el-elf/:
	* configure: Regenerate.

sim/sh/:
	* config.in: Regenerate.
	* configure: Likewise.

gold/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Likewise.
	* config.in: Likewise.
	* configure: Likewise.
	* testsuite/Makefile.in: Likewise.

gprof/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Likewise.
	* configure: Likewise.
	* gconfig.in: Likewise.

opcodes/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Likewise.
	* config.in: Likewise.
	* configure: Likewise.

gas/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Likewise.
	* config.in: Likewise.
	* configure: Likewise.
	* doc/Makefile.in: Likewise.

ld/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Likewise.
	* config.in: Likewise.
	* configure: Likewise.

gdb/:
	* aclocal.m4: Regenerate.
	* config.in: Likewise.
	* configure: Likewise.
	* gnulib/Makefile.in: Likewise.

gdb/doc/:
	* configure: Regenerate.

gdb/gdbserver/:
	* aclocal.m4: Regenerate.
	* config.in: Likewise.
	* configure: Likewise.

gdb/testsuite/:
	* configure: Regenerate.
	* gdb.hp/configure: Likewise.
	* gdb.hp/gdb.aCC/configure: Likewise.
	* gdb.hp/gdb.base-hp/configure: Likewise.
	* gdb.hp/gdb.compat/configure: Likewise.
	* gdb.hp/gdb.defects/configure: Likewise.
	* gdb.hp/gdb.objdbg/configure: Likewise.
	* gdb.stabs/configure: Likewise.

binutils/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Likewise.
	* config.in: Likewise.
	* configure: Likewise.
	* doc/Makefile.in: Likewise.

bfd/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Likewise.
	* config.in: Likewise.
	* configure: Likewise.

bfd/doc/:
	* Makefile.in: Regenerate.

readline/:
	* configure: Regenerate.

readline/examples/rlfe/:
	* configure: Regenerate.
2009-08-22 16:56:56 +00:00
Ralf Wildenhues d6416cdc23 Fixup readline and sim including of override.m4
readline/examples/rlfe/:
	* configure.in: m4_include toplevel config/override.m4.
	* configure: Regenerate.

readline/ChangeLog.gdb:
	* configure.in: m4_include toplevel config/override.m4.
	* configure: Regenerate.

sim/:
	* configure.ac: m4_include toplevel config/override.m4.
	* configure: Regenerate.
	* avr/configure: Regenerate.
	* cris/configure: Regenerate.

sim/common/:
	* aclocal.m4: m4_include toplevel config/override.m4.
	* configure: Regenerate.

sim/iq2000/:
	* configure: Regenerate.

sim/d10v/:
	* configure: Regenerate.

sim/igen/:
	* configure: Regenerate.

sim/m32r/:
	* configure: Regenerate.

sim/frv/:
	* configure: Regenerate.

sim/h8300/:
	* configure: Regenerate.

sim/mn10300/:
	* configure: Regenerate.

sim/ppc/:
	* configure: Regenerate.

sim/erc32/:
	* configure: Regenerate.

sim/arm/:
	* configure: Regenerate.

sim/m68hc11/:
	* configure: Regenerate.

sim/lm32/:
	* configure: Regenerate.

sim/sh64/:
	* configure: Regenerate.

sim/v850/:
	* configure: Regenerate.

sim/cr16/:
	* configure: Regenerate.

sim/moxie/:
	* configure: Regenerate.

sim/m32c/:
	* configure: Regenerate.

sim/mips/:
	* configure: Regenerate.

sim/mcore/:
	* configure: Regenerate.

sim/sh/:
	* configure: Regenerate.
2009-08-22 11:36:40 +00:00
Jon Beniston c28c63d86b gdb/
2009-05-18  Jon Beniston <jon@beniston.com>

        * MAINTAINERS: Add lm32 target.
        * Makefile.in: Add lm32 dependencies.
        * NEWS: Indicate lm32 is a new target.
        * configure.tgt: Add lm32 targets.
        * lm32-tdep.c: New file.

gdb/testsuite
2009-05-18  Jon Beniston <jon@beniston.com>

        * gdb.asm/asm-source.exp: Add lm32 target.

include/gdb/
2009-05-18  Jon Beniston <jon@beniston.com>

        * sim-lm32.h: New file.

sim/
2009-05-18  Jon Beniston <jon@beniston.com>

        * MAINTAINERS: Add Jon Beniston as maintainer of lm32 sim.
        * configure.ac: Add lm32 target.
        * lm32: New directory.

sim/common
2009-05-18  Jon Beniston <jon@beniston.com>

        * gennltvals.sh: Add lm32 target.
        * nltvals.def: Add lm32 syscall definitions.

sim/lm32/
2009-05-18  Jon Beniston <jon@beniston.com>

        * Makefile.in: New file.
        * arch.c: New file.
        * arch.h: New file.
        * config.in: New file.
        * configure: New file.
        * configure.ac: New file.
        * cpu.c: New file.
        * cpu.h: New file.
        * cpuall.h: New file.
        * decode.c: New file.
        * decode.h: New file.
        * dv-lm32cpu.c: New file.
        * dv-lm32timer.c: New file.
        * dv-lm32uart.c: New file.
        * lm32.c: New file.
        * lm32-sim.h: New file.
        * mloop.in: New file.
        * model.c: New file.
        * sem.c: New file.
        * sem-switch.c: New file.
        * sim-if.c: New file.
        * sim-main.c: New file.
        * tconfig.in: New file.
        * traps.c: New file.
        * user.c: New file.
2009-05-18 13:25:35 +00:00