From: | Oliver Elphick <olly(at)lfix(dot)co(dot)uk> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Linux/mips compile should not use -mips2 |
Date: | 2002-03-21 10:27:52 |
Message-ID: | 1016706473.21169.113.camel@linda |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I sent a message about this yesterday, but it does not appear to have
got to the list.
According to the attached message, mips builds for Linux should not use
-mips2 in the compilation or linking. It appears that this can be
prevented by removing the mips special case from src/template/linux.
-----Forwarded Message-----
From: rmurray(at)debian(dot)org
To: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
Subject: Re: [Fwd: Mail delivery failed: returning message to sender]
Date: 20 Mar 2002 07:48:38 -0800
On Wed, Mar 20, 2002 at 09:52:52AM +0000, Oliver Elphick wrote:
> > Upstream automatically passes -mips2 to gcc on mips platforms. In the case
> > of Linux, this should not be done, as the main reason to use it (ll/sc) is
> > handled by glibc and emulated by the kernel. It also makes all of postgresql
> > unusable on DECstation mipsel machines,...
>
> The build failure appears to be that
> debian/tmp/usr/lib/postgresql/bin/postgres has somehow been deleted
> during the build. (The build log shows it being installed correctly.)
> Are you saying that this is related to use of -mips2, or is that a
> totally separate problem?
No, the kernel doesn't always have the greatest error messages...
test.c:
main(void)
{
return 1;
}
rmurray(at)resume:~$ gcc -o t test.c ; ls -l t ; ./t
-rwxr-xr-x 1 rmurray rmurray 7628 Mar 20 16:43 t
rmurray(at)resume:~$ gcc -mips2 -o t test.c ; ls -l t ; ./t
-rwxr-xr-x 1 rmurray rmurray 7628 Mar 20 16:44 t
bash: ./t: No such file or directory
The reason this worked in the past is due to a bug in binutils -- it wasn't
setting the mips2 bit in the elf header of the binary. That bug has now
been fixed, and the kernel refuses to run anything with a mips# bit set
in the header, as it is used to indicate an irix binary, according to the
comments in elf.h.
--
Ryan Murray, Debian Developer (rmurray(at)cyberhqz(dot)com, rmurray(at)debian(dot)org)
The opinions expressed here are my own.
From | Date | Subject | |
---|---|---|---|
Next Message | Zeugswetter Andreas SB SD | 2002-03-21 13:34:41 | Re: Function call crashes server |
Previous Message | Michael Meskes | 2002-03-21 09:38:43 | Vacation |