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"
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Daniel Kegel <dkegel at google dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 8 Jan 2004 17:42:50 -0500
- Subject: Re: --with-sysroot newbie troubles: "ld: cannot open crt1.o"
- References: <3FFDD51B.3050000@google.com>
On Thu, Jan 08, 2004 at 02:09:31PM -0800, Daniel Kegel wrote:
> ============
> --- gcc-3.3-20040105/configure.in.old 2004-01-08 10:53:26.000000000 -0800
> +++ gcc-3.3-20040105/configure.in 2004-01-08 11:18:34.000000000 -0800
> @@ -1474,7 +1474,7 @@
> # being built; programs in there won't even run.
> if test "${build}" = "${host}" && test -d ${srcdir}/gcc; then
> # Search for pre-installed headers if nothing else fits.
> - FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$(build_tooldir)/bin/
> -B$(build_tooldir)/lib/ -isystem $(build_tooldir)/include'
> + FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$(build_tooldir)/bin/
> -B$(build_tooldir)/lib/ -B$(build_tooldir)/lib64/
> -B$(build_tooldir)/usr/lib/ -B$(build_tooldir)/usr/lib64/ -isystem
> $(build_tooldir)/include -isystem $(build_tooldir)/usr/include'
> fi
>
> if test "x${use_gnu_ld}" = x &&
Whatever is causing this problem is causing your later problems also.
$build_tooldir should not be your sysroot, I don't think. And the
-isystem should DEFINITELY not be necessary.
> That patch must be reasonably ok, as the resulting bootstrap compiler
> happily
> builds glibc and the final compiler.
Glibc's not a useful indicator of anything involving path searching,
since it overrides them all.
> 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.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer