Subject: Re: pkg/18309: in Zoularis running on SunOS5.8 gcc does not compile (fix provided)
To: None <dolemite@wuli.nu>
From: Lubomir Sedlacik <salo@Xtrmntr.org>
List: netbsd-bugs
Date: 10/12/2002 07:56:10
--cNdxnHkX5QqsyA0e
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Sep 16, 2002 at 10:00:12AM -0700, dolemite@wuli.nu wrote:
> >Synopsis:       in Zoularis running on SunOS5.8 gcc does not compile
> >Description:
> in Zoularis running on SunOS5.8 gcc does not compile: tested under:bash,s=
h,ksh,tcsh
> =3D=3D=3D> Building for gcc-2.95.3
> gmake[1]: Entering directory `/usr/pkgsrc/lang/gcc/work/objdir/libiberty'
> if [ x"`case "-O2 -O2 -fno-implicit-templates" in *-fpic* ) echo -fpic ;;=
 * ) echo -fPIC ;; esac`" !=3D x ] && [ ! -d pic ]; then \
>   mkdir pic; \
> else true; fi
> /bin/sh: syntax error at line 1: `end of file' unexpected
> gmake[1]: *** [stamp-picdir] Error 2
> gmake[1]: Leaving directory `/usr/pkgsrc/lang/gcc/work/objdir/libiberty'
> gmake: *** [all-libiberty] Error 2
> *** Error code 2
>=20
> Stop.
> bmake: stopped in /usr/pkgsrc/lang/gcc
> *** Error code 1
>=20
> >How-To-Repeat:
> cd /usr/pkgsrc/lang/gcc;cvs update -d -P;bmake clean;bmake install
> >Fix:

the problem is that Solaris /bin/sh doesn't handle "`case " well and
assumes that the second " is the closing one.

a simple fix is here:

--- /dev/null	Sat Oct 12 07:47:18 2002
+++ patches/patch-ad	Sat Oct 12 07:40:49 2002
@@ -1,0 +1,7 @@
+$NetBSD$
+
+--- config/mh-sparcpic.orig	Fri Feb  6 01:33:03 1998
++++ config/mh-sparcpic	Sat Oct 12 05:48:53 2002
+@@ -1,1 +1,1 @@
+-PICFLAG=3D`case "${LIBCFLAGS} ${LIBCXXFLAGS}" in *-fpic* ) echo -fpic ;; =
* ) echo -fPIC ;; esac`
++PICFLAG=3D`case '${LIBCFLAGS} ${LIBCXXFLAGS}' in *-fpic* ) echo -fpic ;; =
* ) echo -fPIC ;; esac`


regards,

--=20
-- Lubomir Sedlacik <salo@Xtrmntr.org>   ASCII Ribbon campaign against  /"\=
 --
--                  <salo@silcnet.org>   e-mail in gratuitous HTML and  \ /=
 --
--                                       Microsoft proprietary formats   X =
 --
-- PGPkey: http://Xtrmntr.org/salo.pgp                                  / \=
 --
-- Key Fingerprint: 75B2 2B96 CD75 0385 1C49  39B8 8B08 C30E 54BC 7263     =
 --

--cNdxnHkX5QqsyA0e
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.0 (NetBSD)

iD8DBQE9p7l6iwjDDlS8cmMRAjT3AKCQXd6IHnCEMZUj9QZO8pe3MQk4WACeMB66
CtqSq9X951TRt2H5tfPZFd4=
=I88S
-----END PGP SIGNATURE-----

--cNdxnHkX5QqsyA0e--