[lfs-dev] gcc cross patch in pass1

Andrew Benton andy at benton.eu.com
Sun Mar 11 17:11:50 PDT 2012


On Sun, 11 Mar 2012 23:54:44 +0000
Matt Burgess <matthew at linuxfromscratch.org> wrote:

> On Fri, 2012-03-02 at 00:39 +0000, Andrew Benton wrote:
> > On Sat, 25 Feb 2012 19:40:49 +0000
> > Matt Burgess <matthew at linuxfromscratch.org> wrote:
> > 
> > > 
> > > Andy hit issues that were discussed in the thread starting at
> > > http://www.linuxfromscratch.org/pipermail/lfs-dev/2011-March/064617.html
> > > 
> > > When I have a bit more time, I'll try to build again without the patch,
> > > and if others could also do so, that'd be great.  Oddly, from that
> > > thread, it only seems to affect some people's builds.
> > 
> > I'm still no nearer to figuring out why I get this error. Trying to
> > follow Jeremy's new newlib build method fails for me at the first pass
> > of gcc:
> > checking for stdint.h... no
> > checking for unistd.h... no
> > checking for dlfcn.h... no
> > checking for objdir... .libs
> > checking if /mnt/lfs/sources/gcc-build/./gcc/xgcc -B/mnt/lfs/sources/gcc-build/./gcc/ -B/tools/x86_64-lfs-linux-gnu/bin/ -B/tools/x86_64-lfs-linux-gnu/lib/ -isystem /tools/x86_64-lfs-linux-gnu/include -isystem /tools/x86_64-lfs-linux-gnu/sys-include    supports -fno-rtti -fno-exceptions... no
> > checking for /mnt/lfs/sources/gcc-build/./gcc/xgcc -B/mnt/lfs/sources/gcc-build/./gcc/ -B/tools/x86_64-lfs-linux-gnu/bin/ -B/tools/x86_64-lfs-linux-gnu/lib/ -isystem /tools/x86_64-lfs-linux-gnu/include -isystem /tools/x86_64-lfs-linux-gnu/sys-include    option to produce PIC... -fPIC -DPIC
> > checking if /mnt/lfs/sources/gcc-build/./gcc/xgcc -B/mnt/lfs/sources/gcc-build/./gcc/ -B/tools/x86_64-lfs-linux-gnu/bin/ -B/tools/x86_64-lfs-linux-gnu/lib/ -isystem /tools/x86_64-lfs-linux-gnu/include -isystem /tools/x86_64-lfs-linux-gnu/sys-include    PIC flag -fPIC -DPIC works... yes
> > checking if /mnt/lfs/sources/gcc-build/./gcc/xgcc -B/mnt/lfs/sources/gcc-build/./gcc/ -B/tools/x86_64-lfs-linux-gnu/bin/ -B/tools/x86_64-lfs-linux-gnu/lib/ -isystem /tools/x86_64-lfs-linux-gnu/include -isystem /tools/x86_64-lfs-linux-gnu/sys-include    static flag -static works... no
> > checking if /mnt/lfs/sources/gcc-build/./gcc/xgcc -B/mnt/lfs/sources/gcc-build/./gcc/ -B/tools/x86_64-lfs-linux-gnu/bin/ -B/tools/x86_64-lfs-linux-gnu/lib/ -isystem /tools/x86_64-lfs-linux-gnu/include -isystem /tools/x86_64-lfs-linux-gnu/sys-include    supports -c -o file.o... yes
> > checking if /mnt/lfs/sources/gcc-build/./gcc/xgcc -B/mnt/lfs/sources/gcc-build/./gcc/ -B/tools/x86_64-lfs-linux-gnu/bin/ -B/tools/x86_64-lfs-linux-gnu/lib/ -isystem /tools/x86_64-lfs-linux-gnu/include -isystem /tools/x86_64-lfs-linux-gnu/sys-include    supports -c -o file.o... (cached) yes
> > checking whether the /mnt/lfs/sources/gcc-build/./gcc/xgcc -B/mnt/lfs/sources/gcc-build/./gcc/ -B/tools/x86_64-lfs-linux-gnu/bin/ -B/tools/x86_64-lfs-linux-gnu/lib/ -isystem /tools/x86_64-lfs-linux-gnu/include -isystem /tools/x86_64-lfs-linux-gnu/sys-include    linker (/mnt/lfs/sources/gcc-build/./gcc/collect-ld -m elf_x86_64) supports shared libraries... yes
> > checking dynamic linker characteristics... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES.
> > make[1]: *** [configure-target-zlib] Error 1
> > make[1]: Leaving directory `/mnt/lfs/sources/gcc-build'
> > make: *** [all] Error 2
> > lfs:/mnt/lfs/sources/gcc-build$ 
> 
> My output is a bit different from yours, Andy:
> 
> checking for stdint.h... yes
> checking for unistd.h... yes
> checking for dlfcn.h... yes
> checking for objdir... .libs
> checking if gcc supports -fno-rtti -fno-exceptions... no
> checking for gcc option to produce PIC... -fPIC -DPIC
> checking if gcc PIC flag -fPIC -DPIC works... yes
> checking if gcc static flag -static works... no
> checking if gcc supports -c -o file.o... yes
> checking if gcc supports -c -o file.o... (cached) yes
> checking whether the gcc linker (ld -m elf_x86_64) supports shared
> libraries... yes
> checking dynamic linker characteristics... GNU/Linux ld.so
> 
> Note how I don't have fully qualified paths or -B arguments specified.
> Do you build from your own scripts, or use jhalfs? Mine's a jhalfs
> build, in case that's making a difference.

I get the same error if I use scripts or if I copy and paste the
commands from the book. It is a bootstrapped build of gcc, and it fails
during the second or third pass (notice how it's testing xgcc). Your
output looks like the very first pass (when it's testing the host's
gcc).

Andy



More information about the lfs-dev mailing list