X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=sim%2Fmips%2Fconfigure;h=a91732ab7596b728669b1be9a207b39490b8b581;hb=37f980dc03cc85795ea2e4de4ca69d3d7d1153c7;hp=92097d84a7b87f0a5ac5ed57cf0a830883c7c96e;hpb=1517bd274290e06af498ef7e496519e4bbc4d5e6;p=deliverable%2Fbinutils-gdb.git diff --git a/sim/mips/configure b/sim/mips/configure index 92097d84a7..a91732ab75 100755 --- a/sim/mips/configure +++ b/sim/mips/configure @@ -604,26 +604,22 @@ cgen_breaks mips_extra_libs XMKMF mips_igen_engine -mips_extra_objs -SIM_DV_SOCKSER_O sim_multi_obj sim_multi_src sim_multi_igen_configs sim_multi_flags sim_gen +sim_micromips16_flags +sim_micromips_flags sim_m16_flags sim_igen_flags SIM_SUBTARGET REPORT_BUGS_TEXI REPORT_BUGS_TO PKGVERSION -sim_profile -sim_trace -sim_stdio -sim_debug -sim_cflags -sim_bswap MAINT +MAINTAINER_MODE_FALSE +MAINTAINER_MODE_TRUE lt_cv_dlopen_libs OTOOL64 OTOOL @@ -643,6 +639,8 @@ SED LIBTOOL PLUGINS_FALSE PLUGINS_TRUE +zlibinc +zlibdir CATOBJEXT GENCAT INSTOBJEXT @@ -693,12 +691,7 @@ CFLAGS CC WERROR_CFLAGS WARN_CFLAGS -sim_xor_endian -sim_stdcall -sim_smp sim_reserved_bits -sim_regparm -sim_packages sim_inline sim_hw sim_hw_objs @@ -706,12 +699,9 @@ sim_hw_cflags sim_default_model sim_scache sim_float -sim_hostendian sim_endian sim_bitsize -sim_assert sim_alignment -sim_environment target_alias host_alias build_alias @@ -753,7 +743,7 @@ SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking -with_zlib +with_system_zlib enable_plugins enable_shared enable_static @@ -762,17 +752,16 @@ enable_fast_install with_gnu_ld enable_libtool_lock enable_maintainer_mode -enable_sim_bswap -enable_sim_cflags enable_sim_debug enable_sim_stdio enable_sim_trace enable_sim_profile +enable_sim_assert +enable_sim_environment +enable_sim_inline with_pkgversion with_bugurl -enable_sim_inline enable_sim_alignment -enable_sim_hostendian enable_werror enable_build_warnings enable_sim_build_warnings @@ -780,7 +769,6 @@ enable_sim_reserved_bits enable_sim_endian enable_sim_bitsize enable_sim_float -enable_sim_smp enable_sim_hardware with_x ' @@ -1416,43 +1404,54 @@ Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-plugins Enable support for plugins (defaults no) + --enable-plugins Enable support for plugins --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) - --enable-maintainer-mode Enable developer functionality. - --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-inline=inlines Specify which functions should be inlined. - --enable-sim-alignment=align Specify strict, nonstrict or forced alignment of memory accesses. - --enable-sim-hostendian=end Specify host byte endian orientation. + --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer + --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-assert Specify whether to perform random assertions + --enable-sim-environment=environment + Specify mixed, user, virtual or operating + environment + --enable-sim-inline=inlines + Specify which functions should be inlined + --enable-sim-alignment=align + Specify strict, nonstrict or forced alignment of + memory accesses --enable-werror treat compile warnings as errors --enable-build-warnings enable build-time compiler warnings if gcc is used --enable-sim-build-warnings enable SIM specific build-time compiler warnings if gcc is used - --enable-sim-reserved-bits Specify whether to check reserved bits in instruction. - --enable-sim-endian=endian Specify target byte endian orientation. - --enable-sim-bitsize=N Specify target bitsize (32 or 64). - --enable-sim-float Specify that the target processor has floating point hardware. - --enable-sim-smp=n Specify number of processors to configure for (default ${default_sim_smp}). + --enable-sim-reserved-bits + Specify whether to check reserved bits in + instruction + --enable-sim-endian=endian + Specify target byte endian orientation + --enable-sim-bitsize=N Specify target bitsize (32 or 64) + --enable-sim-float Specify that the target processor has floating point + hardware --enable-sim-hardware=LIST Specify the hardware to be included in the build. Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-zlib include zlib support (auto/yes/no) default=auto + --with-system-zlib use installed libz --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-pkgversion=PKG Use PKG in the version string in place of "GDB" + --with-pkgversion=PKG Use PKG in the version string in place of "SIM" --with-bugurl=URL Direct users to URL to report a bug --with-x use the X Window System @@ -1894,6 +1893,117 @@ $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_func + +# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES +# ---------------------------------------------------- +# Tries to find if the field MEMBER exists in type AGGR, after including +# INCLUDES, setting cache variable VAR accordingly. +ac_fn_c_check_member () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 +$as_echo_n "checking for $2.$3... " >&6; } +if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (sizeof ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" +else + eval "$4=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$4 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_member + +# ac_fn_c_check_type LINENO TYPE VAR INCLUDES +# ------------------------------------------- +# Tests whether TYPE exists after having included INCLUDES, setting cache +# variable VAR accordingly. +ac_fn_c_check_type () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof ($2)) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof (($2))) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + eval "$3=yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_type cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. @@ -2252,7 +2362,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 @@ -2315,6 +2425,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, @@ -3927,27 +4038,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - - -sim_inline="-DDEFAULT_INLINE=0" - - - - - - - - - - - - - - - @@ -4015,6 +4105,10 @@ sim_inline="-DDEFAULT_INLINE=0" + + + + # ACX_HAVE_GCC_FOR_TARGET # Check if the variable GCC_FOR_TARGET really points to a GCC binary. @@ -7432,7 +7526,7 @@ ia64-*-hpux*) rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext @@ -7457,7 +7551,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) ;; esac ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64le-*linux*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -7476,7 +7573,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*linux*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) @@ -8158,7 +8258,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[012]*) + 10.[012][,.]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; @@ -8201,79 +8301,305 @@ ac_config_headers="$ac_config_headers config.h:config.in" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 +$as_echo_n "checking whether byte ordering is bigendian... " >&6; } +if test "${ac_cv_c_bigendian+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_bigendian=unknown + # See if we're dealing with a universal compiler. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : - -# Put a plausible default for CC_FOR_BUILD in Makefile. -if test "x$cross_compiling" = "xno"; then - CC_FOR_BUILD='$(CC)' -else - CC_FOR_BUILD=gcc + # Check for potential -arch flags. It is not universal unless + # there are at least two -arch flags with different values. + ac_arch= + ac_prev= + for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do + if test -n "$ac_prev"; then + case $ac_word in + i?86 | x86_64 | ppc | ppc64) + if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then + ac_arch=$ac_word + else + ac_cv_c_bigendian=universal + break + fi + ;; + esac + ac_prev= + elif test "x$ac_word" = "x-arch"; then + ac_prev=arch + fi + done fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ac_cv_c_bigendian = unknown; then + # See if sys/param.h defines the BYTE_ORDER macro. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include +int +main () +{ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ + && LITTLE_ENDIAN) + bogus endian macros + #endif + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian + #endif -AR=${AR-ar} - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi + ac_cv_c_bigendian=no fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) + bogus endian macros + #endif -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to _BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +#ifndef _BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes +else + ac_cv_c_bigendian=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # Compile a test program. + if test "$cross_compiling" = yes; then : + # Try to guess by grepping values from an object file. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +short int ascii_mm[] = + { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; + short int ascii_ii[] = + { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; + int use_ascii (int i) { + return ascii_mm[i] + ascii_ii[i]; + } + short int ebcdic_ii[] = + { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; + short int ebcdic_mm[] = + { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; + int use_ebcdic (int i) { + return ebcdic_mm[i] + ebcdic_ii[i]; + } + extern int foo; + +int +main () +{ +return use_ascii (foo) == use_ebcdic (foo); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then + ac_cv_c_bigendian=yes + fi + if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi + fi +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_c_bigendian=no +else + ac_cv_c_bigendian=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 +$as_echo "$ac_cv_c_bigendian" >&6; } + case $ac_cv_c_bigendian in #( + yes) + $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h +;; #( + no) + ;; #( + universal) + +$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h + + ;; #( + *) + as_fn_error "unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; + esac + + + + +# Put a plausible default for CC_FOR_BUILD in Makefile. +if test -z "$CC_FOR_BUILD"; then + if test "x$cross_compiling" = "xno"; then + CC_FOR_BUILD='$(CC)' + else + CC_FOR_BUILD=gcc + fi +fi + + + + +AR=${AR-ar} + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_RANLIB+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8568,7 +8894,7 @@ fi done -for ac_header in sys/time.h sys/resource.h +for ac_header in sys/time.h sys/times.h sys/resource.h sys/mman.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -8623,57 +8949,279 @@ _ACEOF fi done +for ac_func in mmap munmap lstat truncate ftruncate posix_fallocate +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -# Check for socket libraries -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bind in -lsocket" >&5 -$as_echo_n "checking for bind in -lsocket... " >&6; } -if test "${ac_cv_lib_socket_bind+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsocket $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +fi +done -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" +ac_fn_c_check_member "$LINENO" "struct stat" "st_dev" "ac_cv_member_struct_stat_st_dev" "#ifdef HAVE_SYS_TYPES_H +#include #endif -char bind (); -int -main () -{ -return bind (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_socket_bind=yes -else - ac_cv_lib_socket_bind=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_bind" >&5 -$as_echo "$ac_cv_lib_socket_bind" >&6; } -if test "x$ac_cv_lib_socket_bind" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBSOCKET 1 +#ifdef HAVE_SYS_STAT_H +#include +#endif +" +if test "x$ac_cv_member_struct_stat_st_dev" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_DEV 1 _ACEOF - LIBS="-lsocket $LIBS" fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 -$as_echo_n "checking for gethostbyname in -lnsl... " >&6; } -if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then : - $as_echo_n "(cached) " >&6 +ac_fn_c_check_member "$LINENO" "struct stat" "st_ino" "ac_cv_member_struct_stat_st_ino" "#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_STAT_H +#include +#endif +" +if test "x$ac_cv_member_struct_stat_st_ino" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_INO 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct stat" "st_mode" "ac_cv_member_struct_stat_st_mode" "#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_STAT_H +#include +#endif +" +if test "x$ac_cv_member_struct_stat_st_mode" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_MODE 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct stat" "st_nlink" "ac_cv_member_struct_stat_st_nlink" "#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_STAT_H +#include +#endif +" +if test "x$ac_cv_member_struct_stat_st_nlink" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_NLINK 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct stat" "st_uid" "ac_cv_member_struct_stat_st_uid" "#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_STAT_H +#include +#endif +" +if test "x$ac_cv_member_struct_stat_st_uid" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_UID 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct stat" "st_gid" "ac_cv_member_struct_stat_st_gid" "#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_STAT_H +#include +#endif +" +if test "x$ac_cv_member_struct_stat_st_gid" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_GID 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_STAT_H +#include +#endif +" +if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_RDEV 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct stat" "st_size" "ac_cv_member_struct_stat_st_size" "#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_STAT_H +#include +#endif +" +if test "x$ac_cv_member_struct_stat_st_size" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_SIZE 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_STAT_H +#include +#endif +" +if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_BLKSIZE 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_STAT_H +#include +#endif +" +if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_BLOCKS 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct stat" "st_atime" "ac_cv_member_struct_stat_st_atime" "#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_STAT_H +#include +#endif +" +if test "x$ac_cv_member_struct_stat_st_atime" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_ATIME 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct stat" "st_mtime" "ac_cv_member_struct_stat_st_mtime" "#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_STAT_H +#include +#endif +" +if test "x$ac_cv_member_struct_stat_st_mtime" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_MTIME 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct stat" "st_ctime" "ac_cv_member_struct_stat_st_ctime" "#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_STAT_H +#include +#endif +" +if test "x$ac_cv_member_struct_stat_st_ctime" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_CTIME 1 +_ACEOF + + +fi + +ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include +#include + +" +if test "x$ac_cv_type_socklen_t" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_SOCKLEN_T 1 +_ACEOF + + +fi + + +# Check for socket libraries +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bind in -lsocket" >&5 +$as_echo_n "checking for bind in -lsocket... " >&6; } +if test "${ac_cv_lib_socket_bind+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char bind (); +int +main () +{ +return bind (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_socket_bind=yes +else + ac_cv_lib_socket_bind=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_bind" >&5 +$as_echo "$ac_cv_lib_socket_bind" >&6; } +if test "x$ac_cv_lib_socket_bind" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSOCKET 1 +_ACEOF + + LIBS="-lsocket $LIBS" + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 +$as_echo_n "checking for gethostbyname in -lnsl... " >&6; } +if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" @@ -8719,20 +9267,71 @@ fi # BFD conditionally uses zlib, so we must link it in if libbfd does, by # using the same condition. - # See if the user specified whether he wants zlib support or not. + # Use the system's zlib library. + zlibdir="-L\$(top_builddir)/../zlib" + zlibinc="-I\$(top_srcdir)/../zlib" + +# Check whether --with-system-zlib was given. +if test "${with_system_zlib+set}" = set; then : + withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then + zlibdir= + zlibinc= + fi -# Check whether --with-zlib was given. -if test "${with_zlib+set}" = set; then : - withval=$with_zlib; -else - with_zlib=auto fi - if test "$with_zlib" != "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5 -$as_echo_n "checking for library containing zlibVersion... " >&6; } -if test "${ac_cv_search_zlibVersion+set}" = set; then : + + + +# BFD uses libdl when when plugins enabled. + + maybe_plugins=no + for ac_header in dlfcn.h +do : + ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default +" +if test "x$ac_cv_header_dlfcn_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DLFCN_H 1 +_ACEOF + maybe_plugins=yes +fi + +done + + for ac_header in windows.h +do : + ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default +" +if test "x$ac_cv_header_windows_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_WINDOWS_H 1 +_ACEOF + maybe_plugins=yes +fi + +done + + + # Check whether --enable-plugins was given. +if test "${enable_plugins+set}" = set; then : + enableval=$enable_plugins; case "${enableval}" in + no) plugins=no ;; + *) plugins=yes + if test "$maybe_plugins" != "yes" ; then + as_fn_error "Building with plugin support requires a host that supports dlopen." "$LINENO" 5 + fi ;; + esac +else + plugins=$maybe_plugins + +fi + + if test "$plugins" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5 +$as_echo_n "checking for library containing dlsym... " >&6; } +if test "${ac_cv_search_dlsym+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -8745,16 +9344,16 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char zlibVersion (); +char dlsym (); int main () { -return zlibVersion (); +return dlsym (); ; return 0; } _ACEOF -for ac_lib in '' z; do +for ac_lib in '' dl; do if test -z "$ac_lib"; then ac_res="none required" else @@ -8762,61 +9361,32 @@ for ac_lib in '' z; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_zlibVersion=$ac_res + ac_cv_search_dlsym=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_zlibVersion+set}" = set; then : + if test "${ac_cv_search_dlsym+set}" = set; then : break fi done -if test "${ac_cv_search_zlibVersion+set}" = set; then : +if test "${ac_cv_search_dlsym+set}" = set; then : else - ac_cv_search_zlibVersion=no + ac_cv_search_dlsym=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5 -$as_echo "$ac_cv_search_zlibVersion" >&6; } -ac_res=$ac_cv_search_zlibVersion +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5 +$as_echo "$ac_cv_search_dlsym" >&6; } +ac_res=$ac_cv_search_dlsym if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - for ac_header in zlib.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" -if test "x$ac_cv_header_zlib_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_ZLIB_H 1 -_ACEOF fi -done - -fi - - if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then - as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5 - fi fi - -# BFD uses libdl when when plugins enabled. - -# Check whether --enable-plugins was given. -if test "${enable_plugins+set}" = set; then : - enableval=$enable_plugins; case "${enableval}" in - yes | "") plugins=yes ;; - no) plugins=no ;; - *) plugins=yes ;; - esac -else - plugins=no -fi - - if test "$plugins" = yes; then PLUGINS_TRUE= PLUGINS_FALSE='#' @@ -10092,7 +10662,7 @@ _LT_EOF if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then - tmp_addflag= + tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler @@ -10274,7 +10844,7 @@ _LT_EOF if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else - export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no @@ -12302,7 +12872,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12305 "configure" +#line 12875 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12408,7 +12978,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12411 "configure" +#line 12981 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12651,255 +13221,191 @@ CC="$lt_save_CC" -USE_MAINTAINER_MODE=no -# Check whether --enable-maintainer-mode was given. + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } + # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : - enableval=$enable_maintainer_mode; case "${enableval}" in - yes) MAINT="" USE_MAINTAINER_MODE=yes ;; - no) MAINT="#" ;; - *) as_fn_error "\"--enable-maintainer-mode does not take a value\"" "$LINENO" 5; MAINT="#" ;; -esac -if test x"$silent" != x"yes" && test x"$MAINT" = x""; then - echo "Setting maintainer mode" 6>&1 -fi + enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else - MAINT="#" + USE_MAINTAINER_MODE=no fi - - -# Check whether --enable-sim-bswap was given. -if test "${enable_sim_bswap+set}" = set; then : - enableval=$enable_sim_bswap; case "${enableval}" in - yes) sim_bswap="-DWITH_BSWAP=1 -DUSE_BSWAP=1";; - no) sim_bswap="-DWITH_BSWAP=0";; - *) as_fn_error "\"--enable-sim-bswap does not take a value\"" "$LINENO" 5; sim_bswap="";; -esac -if test x"$silent" != x"yes" && test x"$sim_bswap" != x""; then - echo "Setting bswap flags = $sim_bswap" 6>&1 -fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 +$as_echo "$USE_MAINTAINER_MODE" >&6; } + if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' else - sim_bswap="" + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= fi + MAINT=$MAINTAINER_MODE_TRUE -# Check whether --enable-sim-cflags was given. -if test "${enable_sim_cflags+set}" = set; then : - enableval=$enable_sim_cflags; case "${enableval}" in - yes) sim_cflags="-O2 -fomit-frame-pointer";; - trace) as_fn_error "\"Please use --enable-sim-debug instead.\"" "$LINENO" 5; sim_cflags="";; - no) sim_cflags="";; - *) sim_cflags=`echo "${enableval}" | sed -e "s/,/ /g"`;; -esac -if test x"$silent" != x"yes" && test x"$sim_cflags" != x""; then - echo "Setting sim cflags = $sim_cflags" 6>&1 -fi -else - sim_cflags="" -fi - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sim debug setting" >&5 +$as_echo_n "checking for sim debug setting... " >&6; } +sim_debug="0" # Check whether --enable-sim-debug was given. if test "${enable_sim_debug+set}" = set; then : enableval=$enable_sim_debug; case "${enableval}" in - yes) sim_debug="-DDEBUG=7 -DWITH_DEBUG=7";; - no) sim_debug="-DDEBUG=0 -DWITH_DEBUG=0";; - *) sim_debug="-DDEBUG='(${enableval})' -DWITH_DEBUG='(${enableval})'";; + yes) sim_debug="7";; + no) sim_debug="0";; + *) sim_debug="($enableval)";; esac -if test x"$silent" != x"yes" && test x"$sim_debug" != x""; then - echo "Setting sim debug = $sim_debug" 6>&1 fi -else - sim_debug="" +if test "$sim_debug" != "0"; then + +cat >>confdefs.h <<_ACEOF +#define DEBUG $sim_debug +_ACEOF + fi +cat >>confdefs.h <<_ACEOF +#define WITH_DEBUG $sim_debug +_ACEOF + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_debug" >&5 +$as_echo "$sim_debug" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sim stdio debug behavior" >&5 +$as_echo_n "checking for sim stdio debug behavior... " >&6; } +sim_stdio="0" # Check whether --enable-sim-stdio was given. if test "${enable_sim_stdio+set}" = set; then : enableval=$enable_sim_stdio; case "${enableval}" in - yes) sim_stdio="-DWITH_STDIO=DO_USE_STDIO";; - no) sim_stdio="-DWITH_STDIO=DONT_USE_STDIO";; - *) as_fn_error "\"Unknown value $enableval passed to --enable-sim-stdio\"" "$LINENO" 5; sim_stdio="";; + yes) sim_stdio="DO_USE_STDIO";; + no) sim_stdio="DONT_USE_STDIO";; + *) as_fn_error "Unknown value $enableval passed to --enable-sim-stdio" "$LINENO" 5;; esac -if test x"$silent" != x"yes" && test x"$sim_stdio" != x""; then - echo "Setting stdio flags = $sim_stdio" 6>&1 -fi -else - sim_stdio="" fi +cat >>confdefs.h <<_ACEOF +#define WITH_STDIO $sim_stdio +_ACEOF + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_stdio" >&5 +$as_echo "$sim_stdio" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sim trace settings" >&5 +$as_echo_n "checking for sim trace settings... " >&6; } +sim_trace="~TRACE_debug" # 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="-1";; + no) sim_trace="0";; [-0-9]*) - sim_trace="-DTRACE='(${enableval})' -DWITH_TRACE='(${enableval})'";; + sim_trace="'(${enableval})'";; [[:lower:]]*) sim_trace="" for x in `echo "$enableval" | sed -e "s/,/ /g"`; do if test x"$sim_trace" = x; then - sim_trace="-DWITH_TRACE='(TRACE_$x" + sim_trace="(TRACE_$x" else sim_trace="${sim_trace}|TRACE_$x" fi done - sim_trace="$sim_trace)'" ;; + sim_trace="$sim_trace)" ;; esac -if test x"$silent" != x"yes" && test x"$sim_trace" != x""; then - echo "Setting sim trace = $sim_trace" 6>&1 -fi -else - sim_trace="" fi +cat >>confdefs.h <<_ACEOF +#define WITH_TRACE $sim_trace +_ACEOF + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_trace" >&5 +$as_echo "$sim_trace" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sim profile settings" >&5 +$as_echo_n "checking for sim profile settings... " >&6; } +profile="1" +sim_profile="-1" # Check whether --enable-sim-profile was given. if test "${enable_sim_profile+set}" = set; then : enableval=$enable_sim_profile; case "${enableval}" in - yes) sim_profile="-DPROFILE=1 -DWITH_PROFILE=-1";; - no) sim_profile="-DPROFILE=0 -DWITH_PROFILE=0";; + yes) profile="1" sim_profile="-1";; + no) profile="0" sim_profile="0";; [-0-9]*) - sim_profile="-DPROFILE='(${enableval})' -DWITH_PROFILE='(${enableval})'";; + profile="(${enableval})" sim_profile="(${enableval})";; [a-z]*) + profile="1" sim_profile="" for x in `echo "$enableval" | sed -e "s/,/ /g"`; do if test x"$sim_profile" = x; then - sim_profile="-DWITH_PROFILE='(PROFILE_$x" + sim_profile="(PROFILE_$x" else sim_profile="${sim_profile}|PROFILE_$x" fi done - sim_profile="$sim_profile)'" ;; + sim_profile="$sim_profile)" ;; esac -if test x"$silent" != x"yes" && test x"$sim_profile" != x""; then - echo "Setting sim profile = $sim_profile" 6>&1 -fi -else - sim_profile="-DPROFILE=1 -DWITH_PROFILE=-1" -fi - - - - -# Check whether --with-pkgversion was given. -if test "${with_pkgversion+set}" = set; then : - withval=$with_pkgversion; case "$withval" in - yes) as_fn_error "package version not specified" "$LINENO" 5 ;; - no) PKGVERSION= ;; - *) PKGVERSION="($withval) " ;; - esac -else - PKGVERSION="(GDB) " - -fi - - - - - -# Check whether --with-bugurl was given. -if test "${with_bugurl+set}" = set; then : - withval=$with_bugurl; case "$withval" in - yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;; - no) BUGURL= - ;; - *) BUGURL="$withval" - ;; - esac -else - BUGURL="http://www.gnu.org/software/gdb/bugs/" - fi - case ${BUGURL} in - "") - REPORT_BUGS_TO= - REPORT_BUGS_TEXI= - ;; - *) - REPORT_BUGS_TO="<$BUGURL>" - REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`} - ;; - esac; - - - - cat >>confdefs.h <<_ACEOF -#define PKGVERSION "$PKGVERSION" +#define PROFILE $profile _ACEOF cat >>confdefs.h <<_ACEOF -#define REPORT_BUGS_TO "$REPORT_BUGS_TO" +#define WITH_PROFILE $sim_profile _ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_profile" >&5 +$as_echo "$sim_profile" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 -$as_echo_n "checking return type of signal handlers... " >&6; } -if test "${ac_cv_type_signal+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -int -main () -{ -return *(signal (0, 0)) (0) == 1; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_type_signal=int -else - ac_cv_type_signal=void -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable sim asserts" >&5 +$as_echo_n "checking whether to enable sim asserts... " >&6; } +sim_assert="1" +# Check whether --enable-sim-assert was given. +if test "${enable_sim_assert+set}" = set; then : + enableval=$enable_sim_assert; case "${enableval}" in + yes) sim_assert="1";; + no) sim_assert="0";; + *) as_fn_error "--enable-sim-assert does not take a value" "$LINENO" 5;; +esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 -$as_echo "$ac_cv_type_signal" >&6; } cat >>confdefs.h <<_ACEOF -#define RETSIGTYPE $ac_cv_type_signal +#define WITH_ASSERT $sim_assert _ACEOF - - - - -sim_link_files= -sim_link_links= - -sim_link_links=tconfig.h -if test -f ${srcdir}/tconfig.in -then - sim_link_files=tconfig.in -else - sim_link_files=../common/tconfig.in -fi - -# targ-vals.def points to the libc macro description file. -case "${target}" in -*-*-*) TARG_VALS_DEF=../common/nltvals.def ;; +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_assert" >&5 +$as_echo "$sim_assert" >&6; } + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking default sim environment setting" >&5 +$as_echo_n "checking default sim environment setting... " >&6; } +sim_environment="ALL_ENVIRONMENT" +# Check whether --enable-sim-environment was given. +if test "${enable_sim_environment+set}" = set; then : + enableval=$enable_sim_environment; case "${enableval}" in + all | ALL) sim_environment="ALL_ENVIRONMENT";; + user | USER) sim_environment="USER_ENVIRONMENT";; + virtual | VIRTUAL) sim_environment="VIRTUAL_ENVIRONMENT";; + operating | OPERATING) sim_environment="OPERATING_ENVIRONMENT";; + *) as_fn_error "Unknown value $enableval passed to --enable-sim-environment" "$LINENO" 5;; esac -sim_link_files="${sim_link_files} ${TARG_VALS_DEF}" -sim_link_links="${sim_link_links} targ-vals.def" +fi +cat >>confdefs.h <<_ACEOF +#define WITH_ENVIRONMENT $sim_environment +_ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_environment" >&5 +$as_echo "$sim_environment" >&6; } -default_sim_inline="" +sim_inline="-DDEFAULT_INLINE=0" # Check whether --enable-sim-inline was given. if test "${enable_sim_inline+set}" = set; then : enableval=$enable_sim_inline; sim_inline="" @@ -12926,314 +13432,146 @@ esac if test x"$silent" != x"yes" && test x"$sim_inline" != x""; then echo "Setting inline flags = $sim_inline" 6>&1 fi -else - -if test "x$cross_compiling" = "xno"; then - if test x"$GCC" != "x" -a x"${default_sim_inline}" != "x" ; then - sim_inline="${default_sim_inline}" - if test x"$silent" != x"yes"; then - echo "Setting inline flags = $sim_inline" 6>&1 - fi - else - sim_inline="" - fi -else - sim_inline="-DDEFAULT_INLINE=0" -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}" + + +# Check whether --with-pkgversion was given. +if test "${with_pkgversion+set}" = set; then : + withval=$with_pkgversion; case "$withval" in + yes) as_fn_error "package version not specified" "$LINENO" 5 ;; + no) PKGVERSION= ;; + *) PKGVERSION="($withval) " ;; + esac else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - sim_alignment= - fi -fi + PKGVERSION="(SIM) " + 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";; - *) 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 - echo "Setting hostendian flags = $sim_hostendian" 6>&1 -fi -else -if test "x$cross_compiling" = "xno"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 -$as_echo_n "checking whether byte ordering is bigendian... " >&6; } -if test "${ac_cv_c_bigendian+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_bigendian=unknown - # See if we're dealing with a universal compiler. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __APPLE_CC__ - not a universal capable compiler - #endif - typedef int dummy; -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # Check for potential -arch flags. It is not universal unless - # there are at least two -arch flags with different values. - ac_arch= - ac_prev= - for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do - if test -n "$ac_prev"; then - case $ac_word in - i?86 | x86_64 | ppc | ppc64) - if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then - ac_arch=$ac_word - else - ac_cv_c_bigendian=universal - break - fi - ;; - esac - ac_prev= - elif test "x$ac_word" = "x-arch"; then - ac_prev=arch - fi - done -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test $ac_cv_c_bigendian = unknown; then - # See if sys/param.h defines the BYTE_ORDER macro. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include +# Check whether --with-bugurl was given. +if test "${with_bugurl+set}" = set; then : + withval=$with_bugurl; case "$withval" in + yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;; + no) BUGURL= + ;; + *) BUGURL="$withval" + ;; + esac +else + BUGURL="http://www.gnu.org/software/gdb/bugs/" -int -main () -{ -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ - && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ - && LITTLE_ENDIAN) - bogus endian macros - #endif +fi - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # It does; now see whether it defined to BIG_ENDIAN or not. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include + case ${BUGURL} in + "") + REPORT_BUGS_TO= + REPORT_BUGS_TEXI= + ;; + *) + REPORT_BUGS_TO="<$BUGURL>" + REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`} + ;; + esac; -int -main () -{ -#if BYTE_ORDER != BIG_ENDIAN - not big endian - #endif - ; - return 0; -} + + +cat >>confdefs.h <<_ACEOF +#define PKGVERSION "$PKGVERSION" _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_bigendian=yes -else - ac_cv_c_bigendian=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) - bogus endian macros - #endif - ; - return 0; -} +cat >>confdefs.h <<_ACEOF +#define REPORT_BUGS_TO "$REPORT_BUGS_TO" _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # It does; now see whether it defined to _BIG_ENDIAN or not. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 +$as_echo_n "checking return type of signal handlers... " >&6; } +if test "${ac_cv_type_signal+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include +#include int main () { -#ifndef _BIG_ENDIAN - not big endian - #endif - +return *(signal (0, 0)) (0) == 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_bigendian=yes + ac_cv_type_signal=int else - ac_cv_c_bigendian=no + ac_cv_type_signal=void fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # Compile a test program. - if test "$cross_compiling" = yes; then : - # Try to guess by grepping values from an object file. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -short int ascii_mm[] = - { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; - short int ascii_ii[] = - { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; - int use_ascii (int i) { - return ascii_mm[i] + ascii_ii[i]; - } - short int ebcdic_ii[] = - { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; - short int ebcdic_mm[] = - { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; - int use_ebcdic (int i) { - return ebcdic_mm[i] + ebcdic_ii[i]; - } - extern int foo; +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 +$as_echo "$ac_cv_type_signal" >&6; } -int -main () -{ -return use_ascii (foo) == use_ebcdic (foo); - ; - return 0; -} +cat >>confdefs.h <<_ACEOF +#define RETSIGTYPE $ac_cv_type_signal _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then - ac_cv_c_bigendian=yes - fi - if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then - if test "$ac_cv_c_bigendian" = unknown; then - ac_cv_c_bigendian=no - else - # finding both strings is unlikely to happen, but who knows? - ac_cv_c_bigendian=unknown - fi - fi -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long int l; - char c[sizeof (long int)]; - } u; - u.l = 1; - return u.c[sizeof (long int) - 1] == 1; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_c_bigendian=no -else - ac_cv_c_bigendian=yes -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 -$as_echo "$ac_cv_c_bigendian" >&6; } - case $ac_cv_c_bigendian in #( - yes) - $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h -;; #( - no) - ;; #( - universal) -$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h - ;; #( - *) - as_fn_error "unknown endianness - presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; - esac - if test $ac_cv_c_bigendian = yes; then - sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN" + +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_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN" + sim_alignment= fi -else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=0" fi fi @@ -13260,20 +13598,18 @@ if test "${ERROR_ON_WARNING}" = yes ; then true fi -# The entries after -Wno-pointer-sign are disabled warnings which may -# be enabled in the future, which can not currently be used to build -# GDB. -# NOTE: If you change this list, remember to update -# gdb/doc/gdbint.texinfo. build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \ --Wformat-nonliteral -Wno-pointer-sign \ +-Wpointer-sign \ -Wno-unused -Wunused-value -Wunused-function \ --Wno-switch -Wno-char-subscripts -Wmissing-prototypes" +-Wno-switch -Wno-char-subscripts -Wmissing-prototypes +-Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type \ +-Wold-style-declaration -Wold-style-definition" # Enable -Wno-format by default when using gcc on mingw since many # GCC versions complain about %I64. case "${host}" in *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;; + *) build_warnings="$build_warnings -Wformat-nonliteral" ;; esac # Check whether --enable-build-warnings was given. @@ -13383,14 +13719,14 @@ esac mips_endian= default_endian= case "${target}" in - mips64el*-*-*) mips_endian=LITTLE_ENDIAN ;; - mips64vr*el-*-*) default_endian=LITTLE_ENDIAN ;; - mips64*-*-*) default_endian=BIG_ENDIAN ;; - mips16*-*-*) default_endian=BIG_ENDIAN ;; - mipsisa32*-*-*) default_endian=BIG_ENDIAN ;; - mipsisa64*-*-*) default_endian=BIG_ENDIAN ;; - mips*-*-*) default_endian=BIG_ENDIAN ;; - *) default_endian=BIG_ENDIAN ;; + mips64el*-*-*) mips_endian=LITTLE ;; + mips64vr*el-*-*) default_endian=LITTLE ;; + mips64*-*-*) default_endian=BIG ;; + mips16*-*-*) default_endian=BIG ;; + mipsisa32*-*-*) default_endian=BIG ;; + mipsisa64*-*-*) default_endian=BIG ;; + mips*-*-*) default_endian=BIG ;; + *) default_endian=BIG ;; esac wire_endian="$mips_endian" @@ -13398,26 +13734,26 @@ default_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";; + 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=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${default_endian}" + 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=0" + 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=${default_endian}" + 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=${wire_endian}" + 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=0" + 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="";; @@ -13427,10 +13763,10 @@ if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then fi else if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + 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=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else sim_endian= fi @@ -13562,34 +13898,6 @@ fi -# -# Select the level of SMP support -# -case "${target}" in - *) mips_smp=0 ;; -esac - -default_sim_smp="$mips_smp" -# Check whether --enable-sim-smp was given. -if test "${enable_sim_smp+set}" = set; then : - enableval=$enable_sim_smp; case "${enableval}" in - yes) sim_smp="-DWITH_SMP=5" ; sim_igen_smp="-N 5";; - no) sim_smp="-DWITH_SMP=0" ; sim_igen_smp="-N 0";; - *) sim_smp="-DWITH_SMP=$enableval" ; sim_igen_smp="-N $enableval";; -esac -if test x"$silent" != x"yes" && test x"$sim_smp" != x""; then - echo "Setting smp flags = $sim_smp" 6>&1 -fi -else - sim_smp="-DWITH_SMP=${default_sim_smp}" ; sim_igen_smp="-N ${default_sim_smp}" -if test x"$silent" != x"yes"; then - echo "Setting smp flags = $sim_smp" 6>&1 -fi -fi - - - - # # Select the IGEN architecture # @@ -13631,11 +13939,11 @@ case "${target}" in sim_multi_default=mips5000 ;; mips*-sde-elf* | mips*-mti-elf*) - sim_gen=M16 - sim_igen_machine="-M mips64r2,mips3d,mips16,mips16e,mdmx,dsp,dsp2,smartmips" - sim_m16_machine="-M mips16,mips16e,mips64r2" - sim_igen_filter="32,64,f" - sim_mach_default="mipsisa64r2" + sim_gen=MULTI + sim_multi_configs="\ + micromips:micromips64,micromipsdsp:32,64,f:mips_micromips\ + mips64r2:mips64r2,mips3d,mips16,mips16e,mdmx,dsp,dsp2,smartmips:32,64,f:mipsisa64r2" + sim_multi_default=mipsisa64r2 ;; mips64*-*-*) sim_igen_filter="32,64,f" sim_gen=IGEN @@ -13644,11 +13952,11 @@ case "${target}" in sim_igen_filter="32,64,f" sim_m16_filter="16" ;; - mipsisa32r2*-*-*) sim_gen=M16 - sim_igen_machine="-M mips32r2,mips16,mips16e,mdmx,dsp,dsp2,smartmips" - sim_m16_machine="-M mips16,mips16e,mips32r2" - sim_igen_filter="32,f" - sim_mach_default="mipsisa32r2" + mipsisa32r2*-*-*) sim_gen=MULTI + sim_multi_configs="\ + micromips:micromips32,micromipsdsp:32,f:mips_micromips\ + mips32r2:mips32r2,mips3d,mips16,mips16e,mdmx,dsp,dsp2,smartmips:32,f:mipsisa32r2" + sim_multi_default=mipsisa32r2 ;; mipsisa32*-*-*) sim_gen=M16 sim_igen_machine="-M mips32,mips16,mips16e,smartmips" @@ -13713,20 +14021,20 @@ if test ${sim_gen} = MULTI; then # Simple sanity check. if test -z "${sim_multi_configs}" || test -z "${sim_multi_default}"; then - as_fn_error "Error in configure.in: MULTI simulator not set up correctly" "$LINENO" 5 + as_fn_error "Error in configure.ac: MULTI simulator not set up correctly" "$LINENO" 5 fi # Start in a known state. rm -f multi-include.h multi-run.c sim_multi_flags= sim_multi_src= - sim_multi_obj=multi-run.o + sim_multi_obj= sim_multi_igen_configs= sim_seen_default=no cat << __EOF__ > multi-run.c /* Main entry point for MULTI simulators. - Copyright (C) 2003-2013 Free Software Foundation, Inc. + Copyright (C) 2003-2018 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -13747,6 +14055,8 @@ if test ${sim_gen} = MULTI; then #include "sim-main.h" #include "multi-include.h" +#include "elf-bfd.h" +#include "elf/mips.h" #define SD sd #define CPU cpu @@ -13761,6 +14071,9 @@ sim_engine_run (SIM_DESC sd, if (STATE_ARCHITECTURE (sd) == NULL) mach = bfd_mach_${sim_multi_default}; + else if (elf_elfheader (STATE_PROG_BFD (sd))->e_flags + & EF_MIPS_ARCH_ASE_MICROMIPS) + mach = bfd_mach_mips_micromips; else mach = STATE_ARCHITECTURE (SD)->mach; @@ -13790,7 +14103,7 @@ __EOF__ # the ${sim_multi_configs} entry. sim_multi_flags="${sim_multi_flags} -F ${filter} -M ${machine}" - # Check whether mips16 handling is needed. + # Check whether special handling is needed. case ${c} in *:*mips16*:*) # Run igen twice, once for normal mode and once for mips16. @@ -13803,6 +14116,30 @@ __EOF__ sim_multi_obj="${sim_multi_obj} m16${name}_run.o" sim_multi_flags="${sim_multi_flags} -F 16" ;; + *:*micromips32*:*) + # Run igen thrice, once for micromips32, once for micromips16, + # and once for m32. + ws="micromips_m32 micromips16 micromips32" + + # The top-level function for the micromips simulator is + # in a file micromips${name}_run.c, generated by the + # tmp-run-multi Makefile rule. + sim_multi_src="${sim_multi_src} micromips${name}_run.c" + sim_multi_obj="${sim_multi_obj} micromips${name}_run.o" + sim_multi_flags="${sim_multi_flags} -F 16,32" + ;; + *:*micromips64*:*) + # Run igen thrice, once for micromips64, once for micromips16, + # and once for m64. + ws="micromips_m64 micromips16 micromips64" + + # The top-level function for the micromips simulator is + # in a file micromips${name}_run.c, generated by the + # tmp-run-multi Makefile rule. + sim_multi_src="${sim_multi_src} micromips${name}_run.c" + sim_multi_obj="${sim_multi_obj} micromips${name}_run.o" + sim_multi_flags="${sim_multi_flags} -F 16,32,64" + ;; *) ws=m32 ;; @@ -13838,7 +14175,7 @@ __EOF__ # Check whether we added a 'default:' label. if test ${sim_seen_default} = no; then - as_fn_error "Error in configure.in: \${sim_multi_configs} doesn't have an entry for \${sim_multi_default}" "$LINENO" 5 + as_fn_error "Error in configure.ac: \${sim_multi_configs} doesn't have an entry for \${sim_multi_default}" "$LINENO" 5 fi cat << __EOF__ >> multi-run.c @@ -13882,12 +14219,14 @@ else sim_multi_src=doesnt-exist.c if test x"${sim_mach_default}" = x""; then - as_fn_error "Error in configure.in: \${sim_mach_default} not defined" "$LINENO" 5 + as_fn_error "Error in configure.ac: \${sim_mach_default} not defined" "$LINENO" 5 fi SIM_SUBTARGET="$SIM_SUBTARGET -DMIPS_MACH_DEFAULT=bfd_mach_${sim_mach_default}" fi sim_igen_flags="-F ${sim_igen_filter} ${sim_igen_machine} ${sim_igen_smp}" sim_m16_flags=" -F ${sim_m16_filter} ${sim_m16_machine} ${sim_igen_smp}" +sim_micromips16_flags=" -F ${sim_micromips16_filter} ${sim_micromips16_machine} ${sim_igen_smp}" +sim_micromips_flags=" -F ${sim_micromips_filter} ${sim_micromips_machine} ${sim_igen_smp}" @@ -13905,18 +14244,11 @@ case "${target}" in mips*tx39*) hw_enabled=yes hw_extra_devices="tx3904cpu tx3904irc tx3904tmr tx3904sio" - SIM_SUBTARGET="$SIM_SUBTARGET -DTARGET_TX3904=1" ;; *) ;; esac -if test x"$hw_enabled" != x"no"; then - enable_sim_hardware=yes -else - enable_sim_hardware=no -fi - if test "$hw_devices"; then hardware="$hw_devices" else @@ -13931,21 +14263,18 @@ sim_hw_objs="\$(SIM_COMMON_HW_OBJS) `echo $sim_hw | sed -e 's/\([^ ][^ ]*\)/dv-\ # Check whether --enable-sim-hardware was given. if test "${enable_sim_hardware+set}" = set; then : enableval=$enable_sim_hardware; +else + enable_sim_hardware="$hw_enabled" fi case ${enable_sim_hardware} in - yes) sim_hw_p=yes;; - no) sim_hw_p=no;; - ,*) sim_hw_p=yes; hardware="${hardware} `echo ${enableval} | sed -e 's/,/ /'`";; - *,) sim_hw_p=yes; hardware="`echo ${enableval} | sed -e 's/,/ /'` ${hardware}";; - *) sim_hw_p=yes; hardware="`echo ${enableval} | sed -e 's/,/ /'`"'';; + yes|no) ;; + ,*) hardware="${hardware} `echo ${enableval} | sed -e 's/,/ /'`";; + *,) hardware="`echo ${enableval} | sed -e 's/,/ /'` ${hardware}";; + *) hardware="`echo ${enableval} | sed -e 's/,/ /'`"'';; esac -if test "$sim_hw_p" != yes; then - if test "$hw_enabled" = "always"; then - as_fn_error "Sorry, but this simulator requires that hardware support -be enabled. Please configure without --disable-hw-support." "$LINENO" 5 - fi +if test "$enable_sim_hardware" = no; then sim_hw_objs= sim_hw_cflags="-DWITH_HW=0" sim_hw= @@ -13961,10 +14290,12 @@ else esac done # mingw does not support sockser - SIM_DV_SOCKSER_O="" case ${host} in *mingw*) ;; - *) SIM_DV_SOCKSER_O="dv-sockser.o" + *) # TODO: We don't add dv-sockser to sim_hw as it is not a "real" device + # that you instatiate. Instead, other code will call into it directly. + # At some point, we should convert it over. + sim_hw_objs="$sim_hw_objs dv-sockser.o" cat >>confdefs.h <<_ACEOF #define HAVE_DV_SOCKSER 1 @@ -13972,7 +14303,6 @@ _ACEOF ;; esac - if test x"$silent" != x"yes"; then echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs" fi @@ -14025,17 +14355,6 @@ fi esac fi -mips_extra_objs="$SIM_DV_SOCKSER_O" - - -if test "$sim_hw_p" = yes -a -z "$SIM_DV_SOCKSER_O"; then - case " $sim_hw " in - *" tx3904sio "*) - as_fn_error "Sorry, but tx3904sio hardware support is -unavailable for your target. Please use --disable-sim-hardware, or pass a -list of devices to enable that does not include that." "$LINENO" 5 - esac -fi # Choose simulator engine @@ -14242,20 +14561,6 @@ fi mips_extra_libs="" -for ac_header in string.h strings.h stdlib.h stdlib.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fabs in -lm" >&5 $as_echo_n "checking for fabs in -lm... " >&6; } if test "${ac_cv_lib_m_fabs+set}" = set; then : @@ -14316,15 +14621,6 @@ done -ac_sources="$sim_link_files" -ac_dests="$sim_link_links" -while test -n "$ac_sources"; do - set $ac_dests; ac_dest=$1; shift; ac_dests=$* - set $ac_sources; ac_source=$1; shift; ac_sources=$* - ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source" -done -ac_config_links="$ac_config_links $ac_config_links_1" - cgen_breaks="" if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then cgen_breaks="break cgen_rtx_error"; @@ -14437,6 +14733,7 @@ LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs + if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then as_fn_error "conditional \"GMAKE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -14445,7 +14742,10 @@ if test -z "${PLUGINS_TRUE}" && test -z "${PLUGINS_FALSE}"; then as_fn_error "conditional \"PLUGINS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi - +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error "conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi : ${CONFIG_STATUS=./config.status} ac_write_fail=0 @@ -14881,7 +15181,6 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" -config_links="$ac_config_links" config_commands="$ac_config_commands" _ACEOF @@ -14911,9 +15210,6 @@ $config_files Configuration headers: $config_headers -Configuration links: -$config_links - Configuration commands: $config_commands @@ -15305,7 +15601,6 @@ do "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; - "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;; "Makefile.sim") CONFIG_FILES="$CONFIG_FILES Makefile.sim:Makefile.in" ;; "Make-common.sim") CONFIG_FILES="$CONFIG_FILES Make-common.sim:../common/Make-common.in" ;; ".gdbinit") CONFIG_FILES="$CONFIG_FILES .gdbinit:../common/gdbinit.in" ;; @@ -15324,7 +15619,6 @@ done if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi @@ -15612,7 +15906,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_HEADERS" -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS" +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do @@ -15848,38 +16142,7 @@ $as_echo "$as_me: $ac_file is unchanged" >&6;} || as_fn_error "could not create -" "$LINENO" 5 fi ;; - :L) - # - # CONFIG_LINK - # - - if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then - : - else - # Prefer the file from the source tree if names are identical. - if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then - ac_source=$srcdir/$ac_source - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 -$as_echo "$as_me: linking $ac_source to $ac_file" >&6;} - - if test ! -r "$ac_source"; then - as_fn_error "$ac_source: file not found" "$LINENO" 5 - fi - rm -f "$ac_file" - # Try a relative symlink, then a hard link, then a copy. - case $srcdir in - [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; - *) ac_rel_source=$ac_top_build_prefix$ac_source ;; - esac - ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || - ln "$ac_source" "$ac_file" 2>/dev/null || - cp -p "$ac_source" "$ac_file" || - as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 - fi - ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;;