This is the mail archive of the
mailing list for the binutils project.
Re: [discuss] Re: --with-sysroot required when building 32->64 bitcrosstoolchain? (was: building a cross-compiler is hard)
Dan Kegel wrote:
Daniel Jacobowitz wrote:
It matters that it's a 32/64 bit cross environment because otherwise
I wouldn't need --with-sysroot...
You can use --with-sysroot for binutils without using it for GCC. It's
not necessarily a good idea though.
I'm trying it throughout. It's hard to figure out how to use, though.
I had been jimmying things so there is no /usr, i.e. so all libraries
in $PREFIX/lib, all includes in $PREFIX/include, as is customary when
building cross-compilers. But I get the feeling that --with-sysroot
me to do things the LSB way, with a split between /lib and /usr/lib,
so I'm giving that a shot. Needless to say, this is painful. I'm
currently stuck building crtbegin.o because for some reason
xgcc is being told to look in $PREFIX/include... gotta figure out
where I missed adding a /usr ... grumble.
Try a symlink usr -> . then?
Found where to insert the missing /usr. Now the toolchain builds,
but gcc is passing crt1.o to ld without a path! This would work
if ld searched SEARCH_DIR / -L directories for crt1.o, but it
Details at http://gcc.gnu.org/ml/gcc/2004-01/msg00521.html