From: Mike Frysinger Date: Tue, 24 Mar 2015 02:19:41 +0000 (-0400) Subject: sim: fix sim-hardware configure option X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=30452bbe7e68581cdb0cd5004e6c4d4d5c9536e8;p=binutils-gdb.git sim: fix sim-hardware configure option The current default handling for the --enable-sim-hardware option ends up forcing the value to whatever is set as the first argument when calling the macro (by virtue of how autoconf works). Relocate the setup code to the 4th parameter of the AC_ARG_ENABLE macro to fix it. This was caused by the simplification work in 1517bd274290e06af498ef7e49. Reported-by: Hans-Peter Nilsson --- diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog index 4d2619c200c..d0615a879ca 100644 --- a/sim/bfin/ChangeLog +++ b/sim/bfin/ChangeLog @@ -1,3 +1,7 @@ +2015-03-24 Mike Frysinger + + * configure: Regenerate. + 2015-03-23 Mike Frysinger * configure: Regenerate. diff --git a/sim/bfin/configure b/sim/bfin/configure index f3e2a7a8533..2aa95633bf4 100755 --- a/sim/bfin/configure +++ b/sim/bfin/configure @@ -13511,12 +13511,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 @@ -13563,6 +13557,8 @@ 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 diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index 1cfb4d32611..655d98ac22d 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,8 @@ +2015-03-24 Mike Frysinger + + * acinclude.m4 (SIM_AC_OPTION_HARDWARE): Move default option setting + of enable_sim_hardware to AC_ARG_ENABLE. + 2015-03-23 Mike Frysinger * acinclude.m4 (SIM_AC_OPTION_HARDWARE): Delete SIM_DV_SOCKSER_O. diff --git a/sim/common/acinclude.m4 b/sim/common/acinclude.m4 index 3e9fb2fe40a..6522fea1219 100644 --- a/sim/common/acinclude.m4 +++ b/sim/common/acinclude.m4 @@ -590,12 +590,6 @@ dnl arg[2] is a space separated list of devices that override the defaults dnl arg[3] is a space separated list of extra target specific devices. AC_DEFUN([SIM_AC_OPTION_HARDWARE], [ -if test x"[$1]" != x"no"; then - enable_sim_hardware=yes -else - enable_sim_hardware=no -fi - if test "[$2]"; then hardware="[$2]" else @@ -609,7 +603,8 @@ sim_hw_objs="\$(SIM_COMMON_HW_OBJS) `echo $sim_hw | sed -e 's/\([[^ ]][[^ ]]*\)/ AC_ARG_ENABLE(sim-hardware, [AS_HELP_STRING([--enable-sim-hardware=LIST], - [Specify the hardware to be included in the build.])]) + [Specify the hardware to be included in the build.])], + ,[enable_sim_hardware="[$1]"]) case ${enable_sim_hardware} in yes|no) ;; ,*) hardware="${hardware} `echo ${enableval} | sed -e 's/,/ /'`";; diff --git a/sim/cris/ChangeLog b/sim/cris/ChangeLog index d5871222f0b..4a8d1811eba 100644 --- a/sim/cris/ChangeLog +++ b/sim/cris/ChangeLog @@ -1,3 +1,7 @@ +2015-03-24 Mike Frysinger + + * configure: Regenerate. + 2015-03-23 Mike Frysinger * Makefile.in (CONFIG_DEVICES): Delete. diff --git a/sim/cris/configure b/sim/cris/configure index 08bc6810d4f..7b3795cdcd7 100755 --- a/sim/cris/configure +++ b/sim/cris/configure @@ -13411,12 +13411,6 @@ $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; } fi -if test x"no" != x"no"; then - enable_sim_hardware=yes -else - enable_sim_hardware=no -fi - if test ""; then hardware="" else @@ -13431,6 +13425,8 @@ 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="no" fi case ${enable_sim_hardware} in diff --git a/sim/frv/ChangeLog b/sim/frv/ChangeLog index d7f23f19be0..2e4f8b69fea 100644 --- a/sim/frv/ChangeLog +++ b/sim/frv/ChangeLog @@ -1,3 +1,7 @@ +2015-03-24 Mike Frysinger + + * configure: Regenerate. + 2015-03-23 Mike Frysinger * configure: Regenerate. diff --git a/sim/frv/configure b/sim/frv/configure index 06f015feb51..39a1567b5d5 100755 --- a/sim/frv/configure +++ b/sim/frv/configure @@ -13413,12 +13413,6 @@ fi -if test x"no" != x"no"; then - enable_sim_hardware=yes -else - enable_sim_hardware=no -fi - if test """"; then hardware="""" else @@ -13433,6 +13427,8 @@ 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="no" fi case ${enable_sim_hardware} in diff --git a/sim/iq2000/ChangeLog b/sim/iq2000/ChangeLog index d5acc6c6e3f..1f95a08d045 100644 --- a/sim/iq2000/ChangeLog +++ b/sim/iq2000/ChangeLog @@ -1,3 +1,7 @@ +2015-03-24 Mike Frysinger + + * configure: Regenerate. + 2015-03-23 Mike Frysinger * Makefile.in (CONFIG_DEVICES): Delete. diff --git a/sim/iq2000/configure b/sim/iq2000/configure index cbf66747185..49c0f3a75ca 100755 --- a/sim/iq2000/configure +++ b/sim/iq2000/configure @@ -13438,12 +13438,6 @@ fi -if test x"no" != x"no"; then - enable_sim_hardware=yes -else - enable_sim_hardware=no -fi - if test """"; then hardware="""" else @@ -13458,6 +13452,8 @@ 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="no" fi case ${enable_sim_hardware} in diff --git a/sim/lm32/ChangeLog b/sim/lm32/ChangeLog index 653c10d34b3..8d917b4dff9 100644 --- a/sim/lm32/ChangeLog +++ b/sim/lm32/ChangeLog @@ -1,3 +1,7 @@ +2015-03-24 Mike Frysinger + + * configure: Regenerate. + 2015-03-23 Mike Frysinger * configure: Regenerate. diff --git a/sim/lm32/configure b/sim/lm32/configure index 6a520566e08..d1110fab1f5 100755 --- a/sim/lm32/configure +++ b/sim/lm32/configure @@ -13391,12 +13391,6 @@ fi -if test x"yes" != x"no"; then - enable_sim_hardware=yes -else - enable_sim_hardware=no -fi - if test ""; then hardware="" else @@ -13411,6 +13405,8 @@ 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 diff --git a/sim/m32r/ChangeLog b/sim/m32r/ChangeLog index e5d013ed26d..48f2e475aab 100644 --- a/sim/m32r/ChangeLog +++ b/sim/m32r/ChangeLog @@ -1,3 +1,7 @@ +2015-03-24 Mike Frysinger + + * configure: Regenerate. + 2015-03-23 Mike Frysinger * configure: Regenerate. diff --git a/sim/m32r/configure b/sim/m32r/configure index dc22e7fcdb3..bd17e874f13 100755 --- a/sim/m32r/configure +++ b/sim/m32r/configure @@ -13453,12 +13453,6 @@ fi -if test x"no" != x"no"; then - enable_sim_hardware=yes -else - enable_sim_hardware=no -fi - if test """"; then hardware="""" else @@ -13473,6 +13467,8 @@ 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="no" fi case ${enable_sim_hardware} in diff --git a/sim/m68hc11/ChangeLog b/sim/m68hc11/ChangeLog index 67815b158f2..fc18f38e452 100644 --- a/sim/m68hc11/ChangeLog +++ b/sim/m68hc11/ChangeLog @@ -1,3 +1,7 @@ +2015-03-24 Mike Frysinger + + * configure: Regenerate. + 2015-03-23 Mike Frysinger * configure: Regenerate. diff --git a/sim/m68hc11/configure b/sim/m68hc11/configure index e056512979a..1fccfb5d2e8 100755 --- a/sim/m68hc11/configure +++ b/sim/m68hc11/configure @@ -13421,12 +13421,6 @@ case "${target}" in ;; 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 @@ -13441,6 +13435,8 @@ 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 diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog index 6f3c938720f..d5f8ec086e6 100644 --- a/sim/mips/ChangeLog +++ b/sim/mips/ChangeLog @@ -1,3 +1,7 @@ +2015-03-24 Mike Frysinger + + * configure: Regenerate. + 2015-03-23 Mike Frysinger * configure: Regenerate. diff --git a/sim/mips/configure b/sim/mips/configure index 60c1cf811ed..03f34f272ab 100755 --- a/sim/mips/configure +++ b/sim/mips/configure @@ -14007,12 +14007,6 @@ case "${target}" in ;; 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 @@ -14027,6 +14021,8 @@ 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 diff --git a/sim/mn10300/ChangeLog b/sim/mn10300/ChangeLog index d188ddaa583..cf8a025f1dd 100644 --- a/sim/mn10300/ChangeLog +++ b/sim/mn10300/ChangeLog @@ -1,3 +1,7 @@ +2015-03-24 Mike Frysinger + + * configure: Regenerate. + 2015-03-23 Mike Frysinger * Makefile.in (MN10300_OBJS): Delete dv-sockser.o. diff --git a/sim/mn10300/configure b/sim/mn10300/configure index 5c0327a611c..d539b06fdf7 100755 --- a/sim/mn10300/configure +++ b/sim/mn10300/configure @@ -13535,12 +13535,6 @@ fi fi -if test x"yes" != x"no"; then - enable_sim_hardware=yes -else - enable_sim_hardware=no -fi - if test ""; then hardware="" else @@ -13555,6 +13549,8 @@ 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 diff --git a/sim/sh64/ChangeLog b/sim/sh64/ChangeLog index b96e54280ed..8c3c872d182 100644 --- a/sim/sh64/ChangeLog +++ b/sim/sh64/ChangeLog @@ -1,3 +1,7 @@ +2015-03-24 Mike Frysinger + + * configure: Regenerate. + 2015-03-23 Mike Frysinger * configure: Regenerate. diff --git a/sim/sh64/configure b/sim/sh64/configure index efd5484fd6a..68517552d6a 100755 --- a/sim/sh64/configure +++ b/sim/sh64/configure @@ -13438,12 +13438,6 @@ fi -if test x"no" != x"no"; then - enable_sim_hardware=yes -else - enable_sim_hardware=no -fi - if test """"; then hardware="""" else @@ -13458,6 +13452,8 @@ 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="no" fi case ${enable_sim_hardware} in