This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: x86-64 with lib and lib64


Roman Duka wrote:
i don't think gcc needs --with-sysroot if you have all you cross libraries in your target install directory under lib, lib64 and NOT split into lib and us/lib, lib64 and usr/lib64, only binutils needs --with-sysroot for correct operation (i think).

I agree, but once I was forced to use it for binutils, I figured I'd use it for gcc as well; I've been wanting to for a year, since it's supposedly the way to achieve a fully relocatable toolchain (one which doesn't have any absolute paths hardcoded into its binaries).

i abandoned my idea of having cross glibc libraris installed unger lib, usr/lib etc, it seems to cause problems

I went through with it, and it seems to work, as long as you're using --with-sysroot. Try building an x86_64 gcc-3.3-20040112 toolchain with crosstool-0.26, you'll see what I did.

i was trying to build x86_64 toolchain on my x86 machine, which was capable of producing 32 AND 64 bit binaries, in order to do this you need to enable --enable-multilib for gcc (which is usually enable by default) this will create and extra "32" directory in the gcc libdir, which will contain 32 bin startup files etc. The only trick to achieving this is to copy your 32 bit glibc libraries (which you could find under your systems /lib, /usr/lib) to the 32 bit library directory under your target install directory, i.e. prefix/x86_64-unknown-linux-gnu/lib. You need to copy the 32 bit libraries BEFORE you attempt to compile the final cross gcc, or you'll error message about missing crti.o files and incompatible glibc.so.6 libraries, this is because the final cross gcc needs 32 bit libraries under prefix/x86_64-unknown-linux-gnu/lib (or whatever you prefix/target name is) to compile its 32 bit startup files.

I haven't tried that yet, but I think I'll have to before too long. I have a feeling people will expect the -m32 option to work on toolchains compiled with crosstool. - Dan

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]