This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: --with-sysroot newbie troubles: "ld: cannot open crt1.o"
Daniel Jacobowitz wrote:
I verified using strace that gcc / ld makes no attempt to search for crt1.o;
it simply tries to open it in the current directory.
That's the bug. Find out why GCC is not searching.
The following seem to be important when building a sysroot'd gcc/glibc x86 -> x86_64
cross toolchain:
1. you must configure glibc with --prefix=/usr; there seem to be several
things that rely on this as a special case.
2. $sysroot/lib/ must exist before building the final gcc, even though it is not
used, because $sysroot/lib64 is reached via $sysroot/lib/../lib64
I did those, and I now have a toolchain that can compile hello, world.
- Dan