sim: convert to bfd_endian
[deliverable/binutils-gdb.git] / sim / cris / configure
index 6705a1bccf865ba7ed4c63bc203b15efeaf5eec7..99143377ccf2f65cc895cacafa2bb435350785e9 100755 (executable)
@@ -764,6 +764,7 @@ enable_sim_trace
 enable_sim_profile
 with_pkgversion
 with_bugurl
+enable_sim_endian
 enable_sim_alignment
 enable_sim_hostendian
 enable_sim_scache
@@ -1411,15 +1412,25 @@ Optional Features:
   --disable-libtool-lock  avoid locking (might break parallel builds)
   --enable-maintainer-mode  enable make rules and dependencies not useful
                          (and sometimes confusing) to the casual installer
-  --enable-sim-bswap                   Use Host specific BSWAP instruction.
-  --enable-sim-cflags=opts             Extra CFLAGS for use in building simulator
-  --enable-sim-debug=opts              Enable debugging flags
-  --enable-sim-stdio                   Specify whether to use stdio for console input/output.
-  --enable-sim-trace=opts              Enable tracing flags
-  --enable-sim-profile=opts            Enable profiling flags
-  --enable-sim-alignment=align         Specify strict,  nonstrict or forced alignment of memory accesses.
-  --enable-sim-hostendian=end          Specify host byte endian orientation.
-  --enable-sim-scache=size             Specify simulator execution cache size.
+  --enable-sim-bswap      Use Host specific BSWAP instruction
+  --enable-sim-cflags=opts
+                          Extra CFLAGS for use in building simulator
+  --enable-sim-debug=opts Enable debugging flags (for developers of the sim
+                          itself)
+  --enable-sim-stdio      Specify whether to use stdio for console
+                          input/output
+  --enable-sim-trace=opts Enable tracing of simulated programs
+  --enable-sim-profile=opts
+                          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
+  --enable-sim-hostendian=end
+                          Specify host byte endian orientation
+  --enable-sim-scache=size
+                          Specify simulator execution cache size
   --enable-werror         treat compile warnings as errors
   --enable-build-warnings enable build-time compiler warnings if gcc is used
   --enable-sim-build-warnings
@@ -1427,10 +1438,14 @@ Optional Features:
                           gcc is used
   --enable-sim-hardware=LIST
                           Specify the hardware to be included in the build.
-  --enable-sim-default-model=model     Specify default model to simulate.
-  --enable-sim-environment=environment Specify mixed, user, virtual or operating environment.
-  --enable-sim-inline=inlines          Specify which functions should be inlined.
-  --enable-cgen-maint=DIR    build cgen generated files
+  --enable-sim-default-model=model
+                          Specify default model to simulate
+  --enable-sim-environment=environment
+                          Specify mixed, user, virtual or operating
+                          environment
+  --enable-sim-inline=inlines
+                          Specify which functions should be inlined
+  --enable-cgen-maint=DIR build cgen generated files
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -2237,7 +2252,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 # SIM_AC_OUTPUT is a cover function to AC_OUTPUT to generate the Makefile.
 # It is intended to be invoked last.
 #
-# The simulator's configure.in should look like:
+# The simulator's configure.ac should look like:
 #
 # dnl Process this file with autoconf to produce a configure script.
 # AC_PREREQ(2.64)dnl
@@ -8299,8 +8314,6 @@ else
 fi
 
 
-
-
 # Some of the common include files depend on bfd.h, and bfd.h checks
 # that config.h is included first by testing that the PACKAGE macro
 # is defined.
@@ -12316,7 +12329,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12319 "configure"
+#line 12332 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12422,7 +12435,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12425 "configure"
+#line 12438 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
 # Check whether --enable-sim-trace was given.
 if test "${enable_sim_trace+set}" = set; then :
   enableval=$enable_sim_trace; case "${enableval}" in
-  yes) sim_trace="-DTRACE=1 -DWITH_TRACE=-1";;
-  no)  sim_trace="-DTRACE=0 -DWITH_TRACE=0";;
+  yes) sim_trace="-DWITH_TRACE=-1";;
+  no)  sim_trace="-DWITH_TRACE=0";;
   [-0-9]*)
-       sim_trace="-DTRACE='(${enableval})' -DWITH_TRACE='(${enableval})'";;
+       sim_trace="-DWITH_TRACE='(${enableval})'";;
   [[:lower:]]*)
        sim_trace=""
        for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
 done
 
 
+
+wire_endian="LITTLE"
+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=BFD_ENDIAN_BIG";;
+  l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";;
+  yes)  if test x"$wire_endian" != x; then
+          sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}"
+        else
+         if test x"$default_endian" != x; then
+            sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}"
+          else
+            echo "No hard-wired endian for target $target" 1>&6
+            sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN"
+          fi
+        fi;;
+  no)   if test x"$default_endian" != x; then
+          sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}"
+        else
+          if test x"$wire_endian" != x; then
+            sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}"
+          else
+            echo "No default endian for target $target" 1>&6
+            sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN"
+          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=BFD_ENDIAN_${default_endian}"
+else
+  if test x"$wire_endian" != x; then
+    sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}"
+  else
+    sim_endian=
+  fi
+fi
+fi
+
 wire_alignment="NONSTRICT_ALIGNMENT"
 default_alignment=""
 
@@ -12978,9 +13036,9 @@ fi
 # Check whether --enable-sim-hostendian was given.
 if test "${enable_sim_hostendian+set}" = set; then :
   enableval=$enable_sim_hostendian; case "${enableval}" in
-  no)   sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";;
-  b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";;
-  l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";;
+  no)   sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN";;
+  b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG";;
+  l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE";;
   *)    as_fn_error "\"Unknown value $enableval for --enable-sim-hostendian\"" "$LINENO" 5; sim_hostendian="";;
 esac
 if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then
@@ -13214,12 +13272,12 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
  esac
 
   if test $ac_cv_c_bigendian = yes; then
-    sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN"
+    sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG"
   else
-    sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN"
+    sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE"
   fi
 else
-  sim_hostendian="-DWITH_HOST_BYTE_ORDER=0"
+  sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN"
 fi
 fi
 
@@ -13350,7 +13408,7 @@ if test ""; then
 else
   hardware="cfi core pal glue"
 fi
-hardware="$hardware rv cris"
+hardware="$hardware rv cris cris_900000xx"
 
 sim_hw_cflags="-DWITH_HW=1"
 sim_hw="$hardware"
@@ -13360,7 +13418,7 @@ sim_hw_objs="\$(SIM_COMMON_HW_OBJS) `echo $sim_hw | sed -e 's/\([^ ][^ ]*\)/dv-\
 if test "${enable_sim_hardware+set}" = set; then :
   enableval=$enable_sim_hardware;
 else
-  enable_sim_hardware="no"
+  enable_sim_hardware="yes"
 fi
 
 case ${enable_sim_hardware} in
This page took 0.027632 seconds and 4 git commands to generate.