X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=sim%2Fbfin%2Fconfigure;h=9b8dd5d74208ce664c5638343b383e199456a49f;hb=1ac72f0659d64d6a14da862242db0d841d2878d0;hp=81455f6662d016ce9e7461f355ed420dba38bcd2;hpb=31e6ad7d640283af4c4f6b01fef9e6a4a17f1535;p=deliverable%2Fbinutils-gdb.git diff --git a/sim/bfin/configure b/sim/bfin/configure index 81455f6662..9b8dd5d742 100755 --- a/sim/bfin/configure +++ b/sim/bfin/configure @@ -606,8 +606,6 @@ SDL_CFLAGS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG -BFIN_SIM_EXTRA_OBJS -SIM_DV_SOCKSER_O REPORT_BUGS_TEXI REPORT_BUGS_TO PKGVERSION @@ -639,6 +637,8 @@ SED LIBTOOL PLUGINS_FALSE PLUGINS_TRUE +zlibinc +zlibdir CATOBJEXT GENCAT INSTOBJEXT @@ -749,7 +749,7 @@ SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking -with_zlib +with_system_zlib enable_plugins enable_shared enable_static @@ -1409,7 +1409,7 @@ 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] @@ -1417,18 +1417,30 @@ 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-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-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-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-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-werror treat compile warnings as errors --enable-build-warnings enable build-time compiler warnings if gcc is used --enable-sim-build-warnings @@ -1440,11 +1452,11 @@ Optional Features: 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 Some influential environment variables: @@ -2249,7 +2261,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 @@ -2311,7 +2323,6 @@ 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, @@ -7429,7 +7440,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 @@ -7454,7 +7465,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*) @@ -7473,7 +7487,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*) @@ -8155,7 +8172,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' ;; @@ -8716,20 +8733,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 dlopen" >&5 +$as_echo_n "checking for library containing dlopen... " >&6; } +if test "${ac_cv_search_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -8742,16 +8810,16 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char zlibVersion (); +char dlopen (); int main () { -return zlibVersion (); +return dlopen (); ; 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 @@ -8759,61 +8827,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_dlopen=$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_dlopen+set}" = set; then : break fi done -if test "${ac_cv_search_zlibVersion+set}" = set; then : +if test "${ac_cv_search_dlopen+set}" = set; then : else - ac_cv_search_zlibVersion=no + ac_cv_search_dlopen=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_dlopen" >&5 +$as_echo "$ac_cv_search_dlopen" >&6; } +ac_res=$ac_cv_search_dlopen 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='#' @@ -10089,7 +10128,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 @@ -12299,7 +12338,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12302 "configure" +#line 12341 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12405,7 +12444,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12408 "configure" +#line 12447 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12741,10 +12780,10 @@ fi # 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 @@ -12801,7 +12840,7 @@ if test "${with_pkgversion+set}" = set; then : *) PKGVERSION="($withval) " ;; esac else - PKGVERSION="(GDB) " + PKGVERSION="(SIM) " fi @@ -12886,14 +12925,6 @@ _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 ;; @@ -12904,31 +12935,31 @@ sim_link_links="${sim_link_links} targ-vals.def" -wire_endian="LITTLE_ENDIAN" +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=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="";; @@ -12938,10 +12969,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 @@ -12998,9 +13029,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 @@ -13234,12 +13265,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 @@ -13344,15 +13375,12 @@ 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 \ --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. @@ -13427,12 +13455,6 @@ $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; } fi -if test x"yes" != x"no"; then - enable_sim_hardware=yes -else - enable_sim_hardware=no -fi - if test ""; then hardware="" else @@ -13479,21 +13501,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="yes" 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 "yes" = "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= @@ -13509,10 +13528,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 @@ -13520,7 +13541,6 @@ _ACEOF ;; esac - if test x"$silent" != x"yes"; then echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs" fi @@ -13609,10 +13629,6 @@ fi done -BFIN_SIM_EXTRA_OBJS="${BFIN_SIM_EXTRA_OBJS} ${SIM_DV_SOCKSER_O}" -BFIN_SIM_EXTRA_OBJS=${BFIN_SIM_EXTRA_OBJS} - -