]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - sim/m4/sim_ac_option_endian.m4
01467a06c163213d688740ce3631802a34877dbe
[thirdparty/binutils-gdb.git] / sim / m4 / sim_ac_option_endian.m4
1 dnl Copyright (C) 1997-2021 Free Software Foundation, Inc.
2 dnl
3 dnl This program is free software; you can redistribute it and/or modify
4 dnl it under the terms of the GNU General Public License as published by
5 dnl the Free Software Foundation; either version 3 of the License, or
6 dnl (at your option) any later version.
7 dnl
8 dnl This program is distributed in the hope that it will be useful,
9 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
10 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 dnl GNU General Public License for more details.
12 dnl
13 dnl You should have received a copy of the GNU General Public License
14 dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
15 dnl
16 dnl --enable-sim-endian={yes,no,big,little} is for simulators
17 dnl that support both big and little endian targets.
18 AC_DEFUN([SIM_AC_OPTION_ENDIAN],
19 [dnl
20 AC_MSG_CHECKING([whether to force sim endianness])
21 sim_endian=
22 AC_ARG_ENABLE(sim-endian,
23 [AS_HELP_STRING([--enable-sim-endian=endian],
24 [Specify target byte endian orientation])],
25 [case "${enableval}" in
26 b*|B*) sim_endian="BFD_ENDIAN_BIG";;
27 l*|L*) sim_endian="BFD_ENDIAN_LITTLE";;
28 yes | no) ;;
29 *) AC_MSG_ERROR("Unknown value $enableval for --enable-sim-endian");;
30 esac])dnl
31 AC_DEFINE_UNQUOTED([WITH_TARGET_BYTE_ORDER],
32 [${sim_endian:-BFD_ENDIAN_UNKNOWN}], [Sim endian settings])
33 AC_MSG_RESULT([${sim_alignment:-no}])
34 ])dnl