[Bug bootstrap/35804] New: Bootstrap of combined gcc + binutils, with --enable-shared, with sysroot fails

oblivian at users dot sourceforge dot net gcc-bugzilla@gcc.gnu.org
Wed Apr 2 16:19:00 GMT 2008


Hello,

This bug is a continuation from
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35752 and
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35532. It appears that native
retargeting of the compiler is not supported in the 4.3/4.4 series in favor of
the sysroot option.  When trying to build a pass 1 compiler with combined gcc
and binutils in a single directory, sysroot seems to be appending an extra
sysroot prefix in the linker during libgcc linking.

The current build setup I'm trying is to install in order to the sysroot
directory of /tools:

Linux headers
glibc-pass-1 full compile with native toolchain so that crt files exist.
bootstrap gcc+binutils toolchain against new glibc.

I have tried configuring the gcc+binutils toolchain with the following three
sets of options and it still has the same problem:

configue --prefix=/tools/usr \
         --with-sysroot=/tools \
         --with-pic \
         --disable-nls \
         --disable-libmudflap \
         --disable-libssp \
         --enable-languages=c \
         --enable-checking=release \
         --disable-werror \
         --enable-bootstrap

configue --prefix=/tools/usr \
         --with-sysroot=/tools \
         --with-build-sysroot=/tools \
         --with-pic \
         --disable-nls \
         --disable-libmudflap \
         --disable-libssp \
         --enable-languages=c \
         --enable-checking=release \
         --disable-werror \
         --enable-bootstrap

configue --prefix=/usr \
         --with-sysroot=/tools \
         --with-build-sysroot=/tools \
         --with-pic \
         --disable-nls \
         --disable-libmudflap \
         --disable-libssp \
         --enable-languages=c \
         --enable-checking=release \
         --disable-werror \
         --enable-bootstrap

And building with:
LDFLAGS_FOR_TARGET="--sysroot=/tools" CPPFLAGS_FOR_TARGET="--sysroot=/tools"
make

Everything compiles up to stage 1 libgcc which errors out on the final link
command with the linker error of:
/media/disk-3/build/tools/toolchain-pass-1/build/gcc/../ld/ld-new: cannot find
/tools/lib/libc.so.6 inside /tools

Unfortunately, /tools/lib/libc.so.6 exists and if I create a link to /tools
inside of the tools directory (recursive symlink) the link will complete and
continue to stage 2

I'm pretty sure I shouldn't have to create a link to . for this to work
properly .


-- 
           Summary: Bootstrap of combined gcc + binutils, with --enable-
                    shared, with sysroot fails
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: critical
          Priority: P3
         Component: bootstrap
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: oblivian at users dot sourceforge dot net
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35804



More information about the Gcc-bugs mailing list