Re: Recent simulator patches broke many sims

Joel Sherrill
2013-03-23T23:38:53Z

[-- Attachment #1: Type: text/plain, Size: 3846 bytes --]

I have a fix. The case for *mingw* and disabling
setting SIM_AC_OPTION_HARDWARE needed to
be outside the AC_ARG_ENABLE() for --enable-sim-hardware
to account for the "always" simulators.

2013-03-23 Joel Sherrill <joel.sherrill@oarcorp.com>

* acinclude.m4 (SIM_AC_OPTION_HARDWARE): Move the
mingw case to outside the AC_ARG_ENABLE() for
--enable-sim-hardware to account for the simulators with
"always" enabled simulator hardware.

Please review the attached patch. If it is OK, there is the next
set of questions about regenerating before I commit it.

Nearly every simulator includes common/acinclude.m4
which IMO means they need to be regenerated now.

And when you run autoheader, many end up with
changes to config.in. Which means this should be addressed.

Should I go ahead and run autoconf and autoheader in every
sim directory while committing this? Or just the directories
I previously touched?

I suspect I need to do the right thing and commit a bunch.
I don't mind doing this but ... :-D

Thoughts?

Hans.. I still think your auto-tester must not include sh64-elf or it
hadn't gotten to it yet. And it may need to test with the 3 configure
options I listed earlier for completeness.

--joel

On 3/23/2013 5:39 PM, Hans-Peter Nilsson wrote:
> My autotester alerts me to build breakages for some
> configurations, including frv-elf, iq2000-elf, m32r-elf,
> mn10300-elf; author in ChangeLog CC:ed.
>
> ...
> checking whether byte ordering is bigendian... no
> Setting hardware to -DWITH_HW=1, cfi core pal glue , $(SIM_COMMON_HW_OBJS) dv-cfi.o dv-core.o dv-pal.o dv-glue.o
> checking for log2 in -lm... yes
> configure: error: Sorry, but hardware support in this simulator
> unconditionally relies on dv-sockser.o which is unavailable for your host.
> Please fix this simulator.
> configure: error: /tmp/hpautotest-sim/src/sim/frv/configure failed for frv
> make[1]: *** [configure-sim] Error 1
> make[1]: Leaving directory `/tmp/hpautotest-sim/frv-elf'
> ...
> checking whether byte ordering is bigendian... no
> Setting hardware to -DWITH_HW=1, cfi core pal glue , $(SIM_COMMON_HW_OBJS) dv-cfi.o dv-core.o dv-pal.o dv-glue.o
> checking for log2 in -lm... yes
> configure: error: Sorry, but hardware support in this simulator
> unconditionally relies on dv-sockser.o which is unavailable for your host.
> Please fix this simulator.
> configure: error: /tmp/hpautotest-sim/src/sim/iq2000/configure failed for iq2000
> make[1]: Leaving directory `/tmp/hpautotest-sim/iq2000-elf'
> ...
> checking whether byte ordering is bigendian... no
> Setting hardware to -DWITH_HW=1, cfi core pal glue , $(SIM_COMMON_HW_OBJS) dv-cfi.o dv-core.o dv-pal.o dv-glue.o
> checking for log2 in -lm... yes
> configure: error: Sorry, but hardware support in this simulator unconditionally
> relies on dv-sockser.o which is unavailable for your host. Please fix this
> simulator.
> configure: error: /tmp/hpautotest-sim/src/sim/m32r/configure failed for m32r
> make[1]: Leaving directory `/tmp/hpautotest-sim/m32r-elf'
> ...
> checking for time.h... (cached) yes
> Setting hardware to -DWITH_HW=1, cfi core pal glue , $(SIM_COMMON_HW_OBJS) dv-cfi.o dv-core.o dv-pal.o dv-glue.o
> checking for log2 in -lm... (cached) yes
> configure: error: Sorry, but hardware support in this simulator
> unconditionally relies on dv-sockser.o which is unavailable for your host.
> Please fix this simulator.
> configure: error: /tmp/hpautotest-sim/src/sim/mn10300/configure failed for mn10300
> make[1]: *** [configure-sim] Error 1
> make[1]: Leaving directory `/tmp/hpautotest-sim/mn10300-elf'
>
> brgds, H-P

--
Joel Sherrill, Ph.D. Director of Research & Development
joel.sherrill@OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985

[-- Attachment #2: acinclude_diff.txt --]
[-- Type: text/plain, Size: 1379 bytes --]

diff --git a/sim/common/acinclude.m4 b/sim/common/acinclude.m4
index 7f98903..c716a3a 100644
--- a/sim/common/acinclude.m4
+++ b/sim/common/acinclude.m4
@@ -622,6 +622,18 @@ hardware="$hardware [$3]"
sim_hw_cflags="-DWITH_HW=1"
sim_hw="$hardware"
sim_hw_objs="\$(SIM_COMMON_HW_OBJS) `echo $sim_hw | sed -e 's/\([[^ ]][[^ ]]*\)/dv-\1.o/g'`"
+# mingw does not support sockser
+# Check this independent of --enable-sim-hardware because SIM_DV_SOCKSER_O
+# may be used by simulators which "always" are enabled.
+SIM_DV_SOCKSER_O=""
+case ${host} in
+ *mingw*) ;;
+ *) SIM_DV_SOCKSER_O="dv-sockser.o"
+ AC_DEFINE_UNQUOTED(
+ [HAVE_DV_SOCKSER], 1, [Define if dv-sockser is usable.])
+ ;;
+esac
+AC_SUBST(SIM_DV_SOCKSER_O)
AC_ARG_ENABLE(sim-hardware,
[ --enable-sim-hardware=LIST Specify the hardware to be included in the build.],
[
@@ -647,16 +659,6 @@ else
*) sim_hw="$sim_hw $i" ; sim_hw_objs="$sim_hw_objs dv-$i.o";;
esac
done
- # mingw does not support sockser
- SIM_DV_SOCKSER_O=""
- case ${host} in
- *mingw*) ;;
- *) SIM_DV_SOCKSER_O="dv-sockser.o"
- AC_DEFINE_UNQUOTED(
- [HAVE_DV_SOCKSER], 1, [Define if dv-sockser is usable.])
- ;;
- esac
- AC_SUBST(SIM_DV_SOCKSER_O)
fi
if test x"$silent" != x"yes" && test "$sim_hw_p" = "yes"; then
echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs"