diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-06-15 19:51:52 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-06-17 23:20:13 -0400 |
commit | f9a4d54332f9e1f75701ba43249a03cc631ec736 (patch) | |
tree | 2dd0b32c633005ac4378a2282d9726885e09a7b5 /sim/aclocal.m4 | |
parent | 4470708442cef1c818c4322f975d9017307f0243 (diff) | |
download | binutils-f9a4d54332f9e1f75701ba43249a03cc631ec736.zip binutils-f9a4d54332f9e1f75701ba43249a03cc631ec736.tar.gz binutils-f9a4d54332f9e1f75701ba43249a03cc631ec736.tar.bz2 |
sim: overhaul & unify endian settings management
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.
Diffstat (limited to 'sim/aclocal.m4')
-rw-r--r-- | sim/aclocal.m4 | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sim/aclocal.m4 b/sim/aclocal.m4 index f21cf08..773ba0f 100644 --- a/sim/aclocal.m4 +++ b/sim/aclocal.m4 @@ -1174,6 +1174,7 @@ m4_include([../config/override.m4]) m4_include([m4/sim_ac_option_alignment.m4]) m4_include([m4/sim_ac_option_assert.m4]) m4_include([m4/sim_ac_option_debug.m4]) +m4_include([m4/sim_ac_option_endian.m4]) m4_include([m4/sim_ac_option_environment.m4]) m4_include([m4/sim_ac_option_profile.m4]) m4_include([m4/sim_ac_option_stdio.m4]) |