This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
src/sim/common ChangeLog Make-common.in
- From: brobecke at sourceware dot org
- To: gdb-cvs at sourceware dot org
- Date: 19 Dec 2011 04:33:39 -0000
- Subject: src/sim/common ChangeLog Make-common.in
CVSROOT: /cvs/src
Module name: src
Changes by: brobecke@sourceware.org 2011-12-19 04:33:39
Modified files:
sim/common : ChangeLog Make-common.in
Log message:
Work around Solaris bourne shell limitation when building the sim
Building the sim on a sparc-solaris 2.8 machine fails when configured
with no extra sim hardware:
> for hw in ; do \
> echo "extern const struct hw_descriptor
> dv_${hw}_descriptor[];" ; \
> done >> tmp-hw.h
> echo 'const char version[] = "'"`sed q
> /[...]/../../gdb/version.in`"'";'
> >> version.c-tmp
> /bin/sh: -c: line 1: syntax error near unexpected token `;'
> /bin/sh: -c: line 1: `for hw in ; do \'
> make[3]: *** [hw-config.h] Error 2
The same thing happens with the version of bash that we got from
Sun as well (which is very old: 2.03.0(1)-release).
The problems comes from the fact that both shells are buggy, and
reject the following script:
for hw in ; do
[...]
done
The above is what sim/common/Makefile.in tries to execute when
generating hw-config.h.
In order to allow users to build out of the box on these machines,
this patch works around this bug. It does rely on the fact that
none of the tokens in SIM_HW contain whitespaces.
sim/common/ChangeLog:
* Make-common.in (hw-config.h): Work around bug in Solaris 2.8
system bourne shell.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/sim/common/ChangeLog.diff?cvsroot=src&r1=1.266&r2=1.267
http://sourceware.org/cgi-bin/cvsweb.cgi/src/sim/common/Make-common.in.diff?cvsroot=src&r1=1.40&r2=1.41