diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-06-19 20:06:12 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-06-21 22:20:18 -0400 |
commit | 456ef1c1d43c0407801fb2d59db355472be8a554 (patch) | |
tree | ae7c5f7bbef0f9f9b05f73d97c8131538b52a965 /sim/configure | |
parent | be0387eed099dbc2f2bdc92fbf60e04f846c3b2b (diff) | |
download | gdb-456ef1c1d43c0407801fb2d59db355472be8a554.zip gdb-456ef1c1d43c0407801fb2d59db355472be8a554.tar.gz gdb-456ef1c1d43c0407801fb2d59db355472be8a554.tar.bz2 |
sim: unify hardware settings
Move these options up to the common dir so we only test & export
them once across all ports.
Diffstat (limited to 'sim/configure')
-rwxr-xr-x | sim/configure | 54 |
1 files changed, 52 insertions, 2 deletions
diff --git a/sim/configure b/sim/configure index 2468453..dac37c6 100755 --- a/sim/configure +++ b/sim/configure @@ -639,6 +639,10 @@ ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS SIM_INLINE +sim_hw_sockser +sim_hw_cflags +SIM_ENABLE_HW_FALSE +SIM_ENABLE_HW_TRUE cgen cgendir CGEN_MAINT @@ -817,6 +821,7 @@ enable_cgen_maint enable_sim_debug enable_sim_endian enable_sim_environment +enable_sim_hardware enable_sim_inline enable_sim_profile enable_sim_stdio @@ -1514,6 +1519,7 @@ Optional Features: --enable-sim-environment=environment Specify mixed, user, virtual or operating environment + --enable-sim-hardware Whether to enable hardware/device simulation --enable-sim-inline=inlines Specify which functions should be inlined --enable-sim-profile=opts @@ -12041,7 +12047,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12044 "configure" +#line 12050 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12147,7 +12153,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12150 "configure" +#line 12156 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -13887,6 +13893,46 @@ _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_environment" >&5 $as_echo "$sim_environment" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sim hardware settings" >&5 +$as_echo_n "checking for sim hardware settings... " >&6; } +# 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 + +sim_hw_sockser= +if test "$enable_sim_hardware" = no; then + sim_hw_cflags="-DWITH_HW=0" +elif test "$enable_sim_hardware" = yes; then + sim_hw_cflags="-DWITH_HW=1" + # mingw does not support sockser + case ${host} in + *mingw*) ;; + *) # 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_sockser="dv-sockser.o" + sim_hw_cflags="$sim_hw_cflags -DHAVE_DV_SOCKSER" + ;; + esac +else + as_fn_error $? "unknown argument \"$enable_sim_hardware\"" "$LINENO" 5 +fi + if test "$enable_sim_hardware" = "yes"; then + SIM_ENABLE_HW_TRUE= + SIM_ENABLE_HW_FALSE='#' +else + SIM_ENABLE_HW_TRUE='#' + SIM_ENABLE_HW_FALSE= +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_sim_hardware}" >&5 +$as_echo "${enable_sim_hardware}" >&6; } + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking sim inline settings" >&5 $as_echo_n "checking sim inline settings... " >&6; } sim_inline="-DDEFAULT_INLINE=0" @@ -14254,6 +14300,10 @@ if test -z "${SIM_ENABLE_IGEN_TRUE}" && test -z "${SIM_ENABLE_IGEN_FALSE}"; then as_fn_error $? "conditional \"SIM_ENABLE_IGEN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${SIM_ENABLE_HW_TRUE}" && test -z "${SIM_ENABLE_HW_FALSE}"; then + as_fn_error $? "conditional \"SIM_ENABLE_HW\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 |