This is the mail archive of the mailing list for the GCC project.

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: --with-sysroot newbie troubles: "ld: cannot open crt1.o"

On Mon, Jan 12, 2004 at 05:37:15PM -0800, Daniel Kegel wrote:
> 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.

In fact, you must almost always configure glibc in this fashion. 
Otherwise the /lib - /usr/lib split does not happen.

> 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.

Ah sorry, these are lib64-specific problems so I wasn't as familiar
with them.  I encountered the latter recently on MIPS64.  I tried to
fix GCC to make it go away, and it turned out to be... shall we say...
bloody hard.

Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

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