Re: gcc 4.0 build failures on m68k, mips, and mipsel

From: Martin Pitt <martin(at)piware(dot)de>
To: pgsql-ports(at)postgresql(dot)org
Subject: Re: gcc 4.0 build failures on m68k, mips, and mipsel
Date: 2005-08-20 15:40:44
Message-ID: 20050820154044.GA7412@piware.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-ports

Hi again,

Martin Pitt [2005-07-24 17:59 +0200]:
> I noticed that PostgreSQL does not build any more with gcc 4.0 on
> m68k, mips, and mipsel because of bugs/incompatibilities in
> src/include/storage/s_lock.h.
> [...]
> However, since I don't have access to a mips/mipsel machine with gcc
> 4.0, I was unable to fix the problem myself, so I just disabled
> spinlocks on these two architectures in Debian for now (which sucks,
> but at least the package builds and works). Does anybody here have a
> MIPS machine and could try this?

A better workaround than disabling spinlocks at all is to compile
s_lock.c with -fno-unit-at-a-time (this is the default in gcc 4 and
breaks it; that was the reason why it worked with gcc 3.3).

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?

Thanks and have a nice weekend,

Martin
--
Martin Pitt http://www.piware.de
Ubuntu Developer http://www.ubuntu.com
Debian Developer http://www.debian.org

Attachment Content-Type Size
14-mips-gcc4.patch text/plain 1.6 KB

In response to

Responses

Browse pgsql-ports by date

  From Date Subject
Next Message Tom Lane 2005-08-20 19:10:42 Re: gcc 4.0 build failures on m68k, mips, and mipsel
Previous Message Bruce Momjian 2005-08-19 13:28:13 Re: IRIX thread-safety problems