summaryrefslogtreecommitdiff
path: root/sim/config.h.in
Commit message (Collapse)AuthorAgeFilesLines
* sim: build: stop probing system extensions (ourselves)Mike Frysinger2023-01-161-32/+0
| | | | | | | This logic was added in order to expose the strsignal prototype for nrun.c. Since then, we've migrated to gnulib as our portability layer, and it takes care of probing system extensions for us, so there's no need to duplicate the work.
* sim: smp: make option available againMike Frysinger2022-12-251-0/+3
| | | | | | At some point we want this to work, but it's not easy to test if the configure option isn't available. Restore it, but keep the default off.
* sim: restore lstat & mkdir func checksMike Frysinger2022-11-101-0/+6
| | | | | | When merging ppc configure checks into the top-level, these 2 funcs were accidentally dropped (probably due to incorrect resolution of conflicts). Restore them since the ppc code utilizes them both.
* sim: build: change AC_CHECK_LIB to AC_SEARCH_LIBSMike Frysinger2022-11-041-12/+0
| | | | | | With more C libraries moving functions entirely into the main -lc, change the AC_CHECK_LIB calls to AC_SEARCH_LIBS so we look in there first and avoid extra linkage when possible.
* sim: build: switch to bfd & opcodes libtool linker scriptsMike Frysinger2022-11-041-10/+0
| | | | | Now that we use libtool to link, we don't need to duplicate all the libs that bfd itself uses. This simplifies the configure & Makefile.
* sim: Check known getopt definition existenceTsukasa OI2022-10-111-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Clang generates a warning if there is a function declaration/definition with zero arguments. Such declarations/definitions without a prototype (an argument list) are deprecated forms of indefinite arguments ("-Wdeprecated-non-prototype"). On the default configuration, it causes a build failure (unless "--disable-werror" is specified). include/getopt.h defines some getopt function definitions but one of them has a form "extern int getopt ();". If this form is selected in include/getopt.h, Clang generates a warning and the build fails by default. In really old environments, this getopt definition with no arguments is necessary (because the definition may change between environments). However, this definition is now a cause of problems on modern environments. A good news is, this definition is not always selected (e.g. if used by binutils/*.c). This is because configuration scripts of binutils, gas, gprof and ld tries to find known definition of getopt function is used and defines HAVE_DECL_GETOPT macro. If this macro is defined when getopt.h is included, a good form of getopt is used and Clang won't generate warnings. This commit adds a modified portion of ld/configure.ac to find the known getopt definition. If we could find one (and we *will* in most modern environments), we don't need to rely on the deprecated definition.
* sim: Link ZSTD_LIBSFangrui Song2022-09-271-0/+3
| | | | | This fixes linker errors in a `../../configure --enable-targets --enable-sim; make all-gdb` build.
* sim: bfin: add support for SDL2Mike Frysinger2021-09-131-0/+3
| | | | | | | This probably should have been ported long ago, but better late than never. We keep support for both versions for now since both projects tend to have long lifetimes. Maybe consider dropping SDL1 in another ten years.
* sim: unify reserved instruction bits settingsMike Frysinger2021-07-011-0/+3
| | | | | | | | Move these options up to the common dir so we only test & export them once across all ports. The setting only affects igen based ports, and they were turning this on by default, so keep the default in place.
* sim: unify scache settingsMike Frysinger2021-06-301-0/+3
| | | | | | | | | | | | | | | | The cgen scache module is enabled by every cgen port, and with the same default value of 16k (which matches the common default value). Let's pull this option out of the individual ports (via CPPFLAGS) and into the common code (via config.h). The object itself is compiled only for cgen ports atm, so that part doesn't change. The scache code is initialized dynamically via the modules.c logic. That's why the profile code needs an additional CGEN_ARCH check. This will allow us to collapse arch configure files more. Merging the source files will require more future work, but integrating the cgen & non-cgen worlds itself will take a lot.
* sim: unify gettext/intl probing logicMike Frysinger2021-06-191-0/+4
| | | | | Move these options up to the common dir so we only test & export them once across all ports.
* sim: unify bfd library dependency testing logicMike Frysinger2021-06-191-0/+7
| | | | | Move these options up to the common dir so we only test & export them once across all ports.
* sim: unify various library testing logicMike Frysinger2021-06-191-0/+9
| | | | | Move these options up to the common dir so we only test & export them once across all ports.
* sim: overhaul & unify endian settings managementMike Frysinger2021-06-171-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The m4 macro has 2 args: the "wire" settings (which represents the hardwired port behavior), and the default settings (which are used if nothing else is specified). If none are specified, the arch is expected to support both, and the value will be probed based on the user runtime options or the input program. Only two arches today set the default value (bpf & mips). We can probably let this go as it only shows up in one scenario: the sim is invoked, but with no inputs, and no user endian selection. This means bpf will not behave like the other arches: an error is shown and forces the user to make a choice. If an input program is used though, we'll still switch the default to that. This allows us to remove the WITH_DEFAULT_TARGET_BYTE_ORDER setting. For the ports that set a "wire" endian, move it to the runtime init of the respective sim_open calls. This allows us to change the WITH_TARGET_BYTE_ORDER to purely a user-selected configure setting if they want to force a specific endianness. With all the endian logic moved to runtime selection, we can move the configure call up to the common dir so we only process it once across all ports. The ppc arch was picking the wire endian based on the target used, but since we weren't doing that for other biendian arches, we can let this go too. We'll rely on the input selecting the endian, or make the user decide.
* sim: assume sys/select.h always existsMike Frysinger2021-06-121-3/+0
| | | | Now that gnulib provides this, assume it exists.
* sim: overhaul alignment settings managementMike Frysinger2021-06-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the sim-config module will abort if alignment settings haven't been specified by the port's configure.ac. This is a bit weird when we've allowed SIM_AC_OPTION_ALIGNMENT to seem like it's optional to use. Thus everyone invokes it. There are 4 alignment settings, but really only 2 matters: strict and nonstrict. The "mixed" setting is just the default ("unset"), and "forced" isn't used directly by anyone (it's available as a runtime option for some ports). The m4 macro has 2 args: the "wire" settings (which represents the hardwired port behavior), and the default settings (which are used if nothing else is specified). If none are specified, then the build won't work (see above as if SIM_AC_OPTION_ALIGNMENT wasn't called). If default settings are provided, then that is used, but we allow the user to override at runtime. Otherwise, the "wire" settings are used and user runtime options to change are ignored. Most ports specify a default, or set the "wire" to nonstrict. A few set "wire" to strict, but it's not clear that's necessary as it doesn't make the code behavior, by default, any different. It might make things a little faster, but we should provide the user the choice of the compromises to make: force a specific mode at compile time for faster runtime, or allow the choice at runtime. More likely it seems like an oversight when these ports were initially created, and/or copied & pasted from existing ports. With all that backstory, let's get to what this commit does. First kill off the idea of a compile-time default alignment and set it to nonstrict in the common code. For any ports that want strict alignment by default, that code is moved to sim_open while initializing the sim. That means WITH_DEFAULT_ALIGNMENT can be completely removed. Moving the default alignment to the runtime also allows removal of setting the "wire" settings at configure time. Which allows removing of all arguments to SIM_AC_OPTION_ALIGNMENT and moving that call to common code. The macro logic can be reworked to not pass WITH_ALIGNMENT as -D CPPFLAG and instead move it to config.h. All of these taken together mean we can hoist the macro up to the top level and share it among all sims so behavior is consistent among all the ports.
* sim: unify bug & package settingsMike Frysinger2021-06-121-0/+6
| | | | | | Move these options up to the common dir so we only test & export them once across all ports. The AC_INIT macro does a lot of the heavy lifting already which allows further simplification.
* sim: unify debug/stdio/trace/profile build settingsMike Frysinger2021-06-121-0/+18
| | | | | | | | | Move these options up to the common dir so we only test & export them once across all ports. The ppc code needs a little extra care with its trace settings as it's not exactly the same API as the common code. The other knobs are the same though.
* sim: ppc: unify header & function & type tests tooMike Frysinger2021-06-121-2/+186
| | | | | | | Since ppc now shares a config.h with the top-level, move all of its relevant settings up a level. The ppc port tests a lot more funcs, but that's because its syscall emulation is a lot more complete. We'll probably utilize some of these in the common code too.
* sim: unify environment build settingsMike Frysinger2021-06-121-0/+3
| | | | | Move the --sim-enable-environment option up to the common dir so we only test & export it once across all ports.
* sim: unify assert build settingsMike Frysinger2021-06-121-0/+3
| | | | | Move the --sim-enable-assert option up to the common dir so we only test & export it once across all ports.
* sim: unify platform function & header testsMike Frysinger2021-06-121-0/+282
Move the various platform tests up a level to avoid duplication across the ports. When building multiple versions, this speeds things up a bit. For now we move the obvious stuff up a level, but we don't turn own the config.h entirely just yet -- we still have some tests related to libraries that need consideration.