This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Crossbuilding sparc64 and x86-64
- From: Bo Thorsen <bo at sonofthor dot dk>
- To: gcc at gcc dot gnu dot org, discuss at x86-64 dot org
- Date: Mon, 4 Mar 2002 16:38:09 +0100
- Subject: Crossbuilding sparc64 and x86-64
- Organization: SuSE Labs
Hi,
After I committed the change to i386/linux64.h which makes 64 and 32 bit gcc
link against different crt*.o files, things have become more difficult.
It's done in the exact same way sparc/linux64.h does it: By setting absolute
paths to the crt files in STARTFILE_SPEC. The 32 bit ones are not with
absolute paths though, only the 64 bit ones.
Now, I'm just rebuilding the entire x86-64 linux, and this bit me. Setting up
glibc headers and compiling binutils and gcc went as usual. Then when
compiling glibc, it failed because it couldn't find /usr/lib64/crti.o. This
is correct, since that file is a part of glibc and it's being compiled. This
problem wasn't there before I added the 32/64 bit linking functionality.
So, the question: I have been looking at the other architectures that can
also compile to both 32 and 64 bit and these seem to follow this scheme. Is
there really no other way than doing this? It involves some truly horrible
links to be set up temporarily in /usr/lib64 while compiling the toolchain.
If no other way presently exists, how about adding a
-crtfiles="/work/.../crtfilesdir" switch? If this could be done, please give
me a hint, since I don't know how to get arguments to the specs.
Other suggestions will be welcome too.
Bo.
--
Bo Thorsen | Praestevejen 4
Free software developer | 5290 Marslev
SuSE Labs | Denmark