mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-20 01:50:24 +08:00
sim: h8300: move default endian/alignment to configure
This commit is contained in:
@ -1,3 +1,11 @@
|
|||||||
|
2015-12-30 Mike Frysinger <vapier@gentoo.org>
|
||||||
|
|
||||||
|
* compile.c (sim_open): Delete current_alignment and
|
||||||
|
current_target_byte_order assignments.
|
||||||
|
* configure.ac: Call SIM_AC_OPTION_ENDIAN and
|
||||||
|
SIM_AC_OPTION_ALIGNMENT.
|
||||||
|
* configure: Regenerate.
|
||||||
|
|
||||||
2015-12-30 Mike Frysinger <vapier@gentoo.org>
|
2015-12-30 Mike Frysinger <vapier@gentoo.org>
|
||||||
|
|
||||||
* wrapper.c (sim_store_register): Rename to ...
|
* wrapper.c (sim_store_register): Rename to ...
|
||||||
|
@ -4907,10 +4907,6 @@ sim_open (SIM_OPEN_KIND kind,
|
|||||||
/* sim_cpu object is new, so some initialization is needed. */
|
/* sim_cpu object is new, so some initialization is needed. */
|
||||||
init_pointers_needed = 1;
|
init_pointers_needed = 1;
|
||||||
|
|
||||||
/* For compatibility (FIXME: is this right?). */
|
|
||||||
current_alignment = NONSTRICT_ALIGNMENT;
|
|
||||||
current_target_byte_order = BIG_ENDIAN;
|
|
||||||
|
|
||||||
if (sim_pre_argv_init (sd, argv[0]) != SIM_RC_OK)
|
if (sim_pre_argv_init (sd, argv[0]) != SIM_RC_OK)
|
||||||
{
|
{
|
||||||
free_state (sd);
|
free_state (sd);
|
||||||
|
103
sim/h8300/configure
vendored
103
sim/h8300/configure
vendored
@ -761,6 +761,8 @@ enable_sim_trace
|
|||||||
enable_sim_profile
|
enable_sim_profile
|
||||||
with_pkgversion
|
with_pkgversion
|
||||||
with_bugurl
|
with_bugurl
|
||||||
|
enable_sim_endian
|
||||||
|
enable_sim_alignment
|
||||||
'
|
'
|
||||||
ac_precious_vars='build_alias
|
ac_precious_vars='build_alias
|
||||||
host_alias
|
host_alias
|
||||||
@ -1407,6 +1409,11 @@ Optional Features:
|
|||||||
--enable-sim-trace=opts Enable tracing of simulated programs
|
--enable-sim-trace=opts Enable tracing of simulated programs
|
||||||
--enable-sim-profile=opts
|
--enable-sim-profile=opts
|
||||||
Enable profiling flags
|
Enable profiling flags
|
||||||
|
--enable-sim-endian=endian
|
||||||
|
Specify target byte endian orientation
|
||||||
|
--enable-sim-alignment=align
|
||||||
|
Specify strict, nonstrict or forced alignment of
|
||||||
|
memory accesses
|
||||||
|
|
||||||
Optional Packages:
|
Optional Packages:
|
||||||
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
||||||
@ -12290,7 +12297,7 @@ else
|
|||||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||||
lt_status=$lt_dlunknown
|
lt_status=$lt_dlunknown
|
||||||
cat > conftest.$ac_ext <<_LT_EOF
|
cat > conftest.$ac_ext <<_LT_EOF
|
||||||
#line 12293 "configure"
|
#line 12300 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#if HAVE_DLFCN_H
|
#if HAVE_DLFCN_H
|
||||||
@ -12396,7 +12403,7 @@ else
|
|||||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||||
lt_status=$lt_dlunknown
|
lt_status=$lt_dlunknown
|
||||||
cat > conftest.$ac_ext <<_LT_EOF
|
cat > conftest.$ac_ext <<_LT_EOF
|
||||||
#line 12399 "configure"
|
#line 12406 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#if HAVE_DLFCN_H
|
#if HAVE_DLFCN_H
|
||||||
@ -12886,6 +12893,98 @@ sim_link_links="${sim_link_links} targ-vals.def"
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
wire_endian="BIG_ENDIAN"
|
||||||
|
default_endian=""
|
||||||
|
# Check whether --enable-sim-endian was given.
|
||||||
|
if test "${enable_sim_endian+set}" = set; then :
|
||||||
|
enableval=$enable_sim_endian; case "${enableval}" in
|
||||||
|
b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";;
|
||||||
|
l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";;
|
||||||
|
yes) if test x"$wire_endian" != x; then
|
||||||
|
sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}"
|
||||||
|
else
|
||||||
|
if test x"$default_endian" != x; then
|
||||||
|
sim_endian="-DWITH_TARGET_BYTE_ORDER=${default_endian}"
|
||||||
|
else
|
||||||
|
echo "No hard-wired endian for target $target" 1>&6
|
||||||
|
sim_endian="-DWITH_TARGET_BYTE_ORDER=0"
|
||||||
|
fi
|
||||||
|
fi;;
|
||||||
|
no) if test x"$default_endian" != x; then
|
||||||
|
sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}"
|
||||||
|
else
|
||||||
|
if test x"$wire_endian" != x; then
|
||||||
|
sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${wire_endian}"
|
||||||
|
else
|
||||||
|
echo "No default endian for target $target" 1>&6
|
||||||
|
sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=0"
|
||||||
|
fi
|
||||||
|
fi;;
|
||||||
|
*) as_fn_error "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";;
|
||||||
|
esac
|
||||||
|
if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then
|
||||||
|
echo "Setting endian flags = $sim_endian" 6>&1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if test x"$default_endian" != x; then
|
||||||
|
sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}"
|
||||||
|
else
|
||||||
|
if test x"$wire_endian" != x; then
|
||||||
|
sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}"
|
||||||
|
else
|
||||||
|
sim_endian=
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
wire_alignment="NONSTRICT_ALIGNMENT"
|
||||||
|
default_alignment=""
|
||||||
|
|
||||||
|
# Check whether --enable-sim-alignment was given.
|
||||||
|
if test "${enable_sim_alignment+set}" = set; then :
|
||||||
|
enableval=$enable_sim_alignment; case "${enableval}" in
|
||||||
|
strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";;
|
||||||
|
nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";;
|
||||||
|
forced | FORCED) sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";;
|
||||||
|
yes) if test x"$wire_alignment" != x; then
|
||||||
|
sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}"
|
||||||
|
else
|
||||||
|
if test x"$default_alignment" != x; then
|
||||||
|
sim_alignment="-DWITH_ALIGNMENT=${default_alignment}"
|
||||||
|
else
|
||||||
|
echo "No hard-wired alignment for target $target" 1>&6
|
||||||
|
sim_alignment="-DWITH_ALIGNMENT=0"
|
||||||
|
fi
|
||||||
|
fi;;
|
||||||
|
no) if test x"$default_alignment" != x; then
|
||||||
|
sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}"
|
||||||
|
else
|
||||||
|
if test x"$wire_alignment" != x; then
|
||||||
|
sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}"
|
||||||
|
else
|
||||||
|
echo "No default alignment for target $target" 1>&6
|
||||||
|
sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0"
|
||||||
|
fi
|
||||||
|
fi;;
|
||||||
|
*) as_fn_error "\"Unknown value $enableval passed to --enable-sim-alignment\"" "$LINENO" 5; sim_alignment="";;
|
||||||
|
esac
|
||||||
|
if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then
|
||||||
|
echo "Setting alignment flags = $sim_alignment" 6>&1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if test x"$default_alignment" != x; then
|
||||||
|
sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}"
|
||||||
|
else
|
||||||
|
if test x"$wire_alignment" != x; then
|
||||||
|
sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}"
|
||||||
|
else
|
||||||
|
sim_alignment=
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
for ac_header in sys/param.h
|
for ac_header in sys/param.h
|
||||||
do :
|
do :
|
||||||
ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
|
ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
|
||||||
|
@ -5,6 +5,9 @@ sinclude(../common/acinclude.m4)
|
|||||||
|
|
||||||
SIM_AC_COMMON
|
SIM_AC_COMMON
|
||||||
|
|
||||||
|
SIM_AC_OPTION_ENDIAN(BIG_ENDIAN)
|
||||||
|
SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT)
|
||||||
|
|
||||||
AC_CHECK_HEADERS(sys/param.h)
|
AC_CHECK_HEADERS(sys/param.h)
|
||||||
|
|
||||||
SIM_AC_OUTPUT
|
SIM_AC_OUTPUT
|
||||||
|
Reference in New Issue
Block a user