egcs/ld issues
David S. Miller
davem@dm.cobaltmicro.com
Thu Jul 30 06:00:00 GMT 1998
sparc64-linux targets are not supported at all
let me get to the base of things here and explain where all these
problems surface from, since I am partly responsible for creating it
Currently Linux systems on UltraSparcs use a specially hacked up
binutils and gcc pair to compile 64-bit kernels, _THIS_ is all they
can be used reliably for. This is the /usr/local/sparc64-linux-gcc
you see on the system, and what the kernel makefiles invoke to build
the kernel.
The problem arised that 'uname' on UltraSparc Linux systems output
"sparc64" as the system type. This is correct. However all current
userland environments shipped on such systems are completely 32-bit,
no 64-bit userland exists yet.
So this uname output confuses all the configure scripts on the system
into thinking the machine is sparc64-linux-gnu or whathaveyou, which
due to the 32-bit environment is incorrect.
The solution to this problem is to create a "32-bit uname" environment
for yourself. This is quite simple, just code up a program which does
something like:
int main(int argc, char **argv, char **envp)
{
personality(PER_LINUX32);
execve(argv[1], &argv[1], envp);
}
Use this to spawn your shell from which you'll perform all
compilations and gcc/binutils tree configurations. When I login,
before I do gcc work, I usually just go:
sparc32 /bin/bash
cd src/gcc
./configure
etc. and it just works. The only real effect of the PER_LINUX32
personality is to return "sparc" instead of "sparc64" from uname
system call invocations.
Later,
David S. Miller
davem@dm.cobaltmicro.com
More information about the Gcc
mailing list