Subject: Re: Support for different MIPS (I, II, III, IV)
To: Ian Spray <cobalt@minimal.cx>
From: Rodrigo Fernandez-Vizarra <Rodrigo.Fdz-Vizarra@infonegocio.com>
List: port-cobalt
Date: 12/09/2002 00:05:04
Hi Ian,

I compiled the lmgr with the -mips2 switch and everything compiled and 
linked right. Now I'm compiling some other dependencies to see if 
everything works.

So if I undestand right, the patch for postgresql to work in a Cobalt 
(MIPS) is very simple. Only add the following sentences to the existing 
netbsd template

case $host_cpu in
    cobalt*)  CFLAGS="$CFLAGS -mips2";;
esac



Thank you,
Rodrigo

Ian Spray wrote:

>On Sun, Dec 01, 2002 at 03:30:38AM +0100, Rodrigo Fernandez-Vizarra wrote:
>  
>
>>I've been doing some research on this and I realized that the problem is 
>>that the compiler is not using MIPS II instruction set because 
>>
>>    
>>
>I have submitted a fix to the PostgreSQL team on the 6th of June this year
>for 7.2.1 that doesn't appear to have made it anywhere useful - Googling will
>bring up my post, but failing that this is what I did to get PgSQL up on my
>Qube 2 (NetBSD 1.6):
>
>* cd /usr/pkgsrc/database/postgresql-server
>* sudo make
>* wait for it to fail (or, if you're happy with interrupting the port process
>  just break out once the patches have been applied)
>* cd work/postgresql-7.2.3/src/template
>* edit file netbsd and add the following lines:
>
>  CFLAGS=-O2
>  case $host_cpu in
>    cobalt*)  CFLAGS="$CFLAGS -mips2";;
>  esac
>
>I can't recall if I left the current netbsd file alone or if I simlply
>copied the linux one and edited the host name.  I can't recall if I left the
>netbsd CFLAGS statement (with the -pipe in it) in there or not - my ports
>tree has been cleaned since I did this.
>
>This works for me (I also modifed the kernel config, but that's all detailed
>in the PgSQL notes) and the general feeling on the PgSQL list was that this
>fix was clean and should be used.  I haven't checked the latest 7.3 to see
>if it's in there, but try this and see if you can build it all ok.
>
>I suppose the other option is to get the NetBSD PgSQL port maintainer to
>include this mod, but it seemed more useful to get it into the main tree, as
>it's a low impact fix.
>
>HTH,
>  
>