X-Original-To: pgsql-ports-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id BC67AD7B09 for ; Thu, 25 Aug 2005 04:43:19 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 70506-07 for ; Thu, 25 Aug 2005 07:43:17 +0000 (GMT) Received: from mail.pironet-ndh.com (mail01.pironet-ndh.com [194.64.31.10]) by svr1.postgresql.org (Postfix) with ESMTP id 953C1D7A8D for ; Thu, 25 Aug 2005 04:43:15 -0300 (ADT) Received: from mail.fbn-dd.de (mail.fbn-dd.de [195.227.105.178]) by mail.pironet-ndh.com (Postfix) with ESMTP id 51E9D10B167 for ; Thu, 25 Aug 2005 09:43:12 +0200 (CEST) Received: from sonne.intranet.fbn-dd.de (192-168-0-1.transfer-000.intranet.fbn-dd.de [192.168.0.1]) by mail.fbn-dd.de (Postfix) with ESMTP id 4CD3B51A51 for ; Thu, 25 Aug 2005 09:43:19 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by sonne.intranet.fbn-dd.de (Postfix) with ESMTP id C906F22A1C for ; Thu, 25 Aug 2005 09:43:12 +0200 (CEST) Received: from sonne.intranet.fbn-dd.de (localhost [127.0.0.1]) by localhost (AvMailGate-2.0.1.16) id 31755-3F9B81A6; Thu, 25 Aug 2005 09:43:12 +0200 Received: from localhost.localdomain (10-28-130-200.intranet-28-130.fbn-dd.de [10.28.130.200]) by sonne.intranet.fbn-dd.de (Postfix) with ESMTP id 31F7522A1C for ; Thu, 25 Aug 2005 09:43:12 +0200 (CEST) Received: by localhost.localdomain (Postfix, from userid 1000) id 6BF22FEC; Thu, 25 Aug 2005 09:43:12 +0200 (CEST) Date: Thu, 25 Aug 2005 09:43:12 +0200 From: Martin Pitt To: pgsql-ports@postgresql.org Subject: Re: gcc 4.0 build failures on m68k, mips, and mipsel Message-ID: <20050825074312.GA8461@piware.de> Mail-Followup-To: pgsql-ports@postgresql.org References: <20050724155941.GA27638@piware.de> <20050820154044.GA7412@piware.de> <2290.1124565042@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0ntfKIWw70PvrIHh" Content-Disposition: inline In-Reply-To: <2290.1124565042@sss.pgh.pa.us> User-Agent: Mutt/1.5.9i X-AntiVirus: checked by AntiVir MailGate (version: 2.0.1.16; AVE: 6.31.1.0; VDF: 6.31.1.177; host: sonne) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.05 required=5 tests=[FORGED_RCVD_HELO=0.05] X-Spam-Level: X-Archive-Number: 200508/14 X-Sequence-Number: 2189 --0ntfKIWw70PvrIHh Content-Type: multipart/mixed; boundary="+HP7ph2BbKc20aGI" Content-Disposition: inline --+HP7ph2BbKc20aGI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi!=20 Tom Lane [2005-08-20 15:10 -0400]: > Martin Pitt writes: > > However, Thiemo Seufer dealt with this and created a proper tas() > > function for PostgreSQL on mips, which also works with gcc 4. Of > > course this is much better, so I applied his patch in Debian. > > I attach the patch. Do you consider applying it upstream? >=20 > Hm, does this patch actually compile as-is? I'd think you'd need to > have the MIPS definition of slock_t placed earlier than the assembly > code fragment. Sorry, I got the patch against 7.4 and I couldn't check it against 8.0 I fixed it for 8.0, and the new packages have finally built successfully on mips: http://buildd.debian.org/fetch.php?&pkg=3Dpostgresql-7.4&ver=3D1%3A7.4.8-17= &arch=3Dmips&stamp=3D1124942993&file=3Dlog&as=3Draw http://buildd.debian.org/fetch.php?&pkg=3Dpostgresql-8.0&ver=3D8.0.3-14&arc= h=3Dmips&stamp=3D1124946041&file=3Dlog&as=3Draw I attach the updated patch against 8.0. Sorry for the confusion, and thanks! Martin --=20 Martin Pitt http://www.piware.de Ubuntu Developer http://www.ubuntu.com Debian Developer http://www.debian.org --+HP7ph2BbKc20aGI Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="14-mips-gcc4.patch" Content-Transfer-Encoding: quoted-printable diff -ruN postgresql-8.0.3-old/src/backend/storage/lmgr/s_lock.c postgresql= -8.0.3/src/backend/storage/lmgr/s_lock.c --- postgresql-8.0.3-old/src/backend/storage/lmgr/s_lock.c 2004-12-31 23:01= :05.000000000 +0100 +++ postgresql-8.0.3/src/backend/storage/lmgr/s_lock.c 2005-08-23 19:30:19.= 000000000 +0200 @@ -172,7 +172,7 @@ #endif /* __m68k__ */ =20 =20 -#if defined(__mips__) && !defined(__sgi) +#if defined(__mips__) && !defined(__sgi) && !defined(__linux__) static void tas_dummy() { diff -ruN postgresql-8.0.3-old/src/include/storage/s_lock.h postgresql-8.0.= 3/src/include/storage/s_lock.h --- postgresql-8.0.3-old/src/include/storage/s_lock.h 2005-08-23 19:30:18.0= 00000000 +0200 +++ postgresql-8.0.3/src/include/storage/s_lock.h 2005-08-23 19:31:29.00000= 0000 +0200 @@ -445,7 +445,32 @@ #define HAS_TEST_AND_SET =20 typedef unsigned int slock_t; -#endif + +#define TAS(lock) tas(lock) + +static __inline__ int +tas(volatile slock_t *lock) +{ + register volatile slock_t *__l =3D lock; + register int __r; + + __asm__ __volatile__( + " .set push \n" + " .set mips2 \n" + " .set noreorder \n" + " .set nomacro \n" + "1: ll %0, %1 \n" + " bne %0, $0, 1f \n" + " xori %0, 1 \n" + " sc %0, %1 \n" + " beq %0, $0, 1b \n" + " sync \n" + "1: .set pop " + : "=3D&r" (__r), "+R" (*__l)); + return __r; +} + +#endif /* mips */ =20 =20 #endif /* __GNUC__ */ --+HP7ph2BbKc20aGI-- --0ntfKIWw70PvrIHh Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFDDXaQDecnbV4Fd/IRAr/XAKCDHtg2BIsH0ekrMvjW5tj0tWoBNwCfYB3+ ePjMTjRBWk+L+9TyIERJ4H8= =M2vq -----END PGP SIGNATURE----- --0ntfKIWw70PvrIHh--