Thanks for the reply Ian. You are right --sysroot is messing the path. But I think this is specific to llvm-gcc the gnu gcc-4.2.1 works fine with --sysroot. --- On Wed, 1/27/10, Ian Lance Taylor <iant@xxxxxxxxxx> wrote: > From: Ian Lance Taylor <iant@xxxxxxxxxx> > Subject: Re: cannot find -lgcc_s > To: "john blair" <mailtome200420032002@xxxxxxxxx> > Cc: gcc-help@xxxxxxxxxxx > Date: Wednesday, January 27, 2010, 8:57 PM > john blair <mailtome200420032002@xxxxxxxxx> > writes: > > > I am trying to build llvm-gcc4.2-2.6. > > llvm-gcc is not gcc. You may have better luck asking > on an LLVM > mailing list. > > > > libgcc_s.so* is presnet under > /local/tools/lin32/llvm-gcc4.2-2.6/lib > > > libraries: > =/local/tools/lin32/llvm-gcc4.2-2.6/lib/gcc/i686-linux/4.2.1/:/local/tools/lin32/llvm-gcc4.2-2.6/lib/gcc/i686-linux/4.2.1/../../../../i686-linux/lib/i686-linux/4.2.1/:/local/tools/lin32/llvm-gcc4.2-2.6/lib/gcc/i686-linux/4.2.1/../../../../i686-linux/lib/:/local/tools/lin32/glibc-2.2.5-44/local/tools/lin32/llvm-gcc4.2-2.6/lib/i686-linux/4.2.1/:/local/tools/lin32/glibc-2.2.5-44/local/tools/lin32/llvm-gcc4.2-2.6/lib/:/local/tools/lin32/glibc-2.2.5-44/lib/i686-linux/4.2.1/:/local/tools/lin32/glibc-2.2.5-44/lib/:/local/tools/lin32/glibc-2.2.5-44/usr/lib/i686-linux/4.2.1/:/local/tools/lin32/glibc-2.2.5-44/usr/lib/ > > The library would normally be found via a search path like > > /local/tools/lin32/llvm-gcc4.2-2.6/lib/gcc/i686-linux/4.2.1/../../../ > > Does that path work? > > The path may be being disabled due to your --sysroot > argument: > /local/tools/lin32/glibc-2.2.5-44. Using --sysroot > tells gcc where to > find all system libraries, and libgcc_s.so is put into a > system > directory so that the dynamic linker can find it at > runtime. You may > need to copy libgcc_s.so into > /local/tools/lin32/glibc-2.2.5-44/lib > along with the other system directories. > > Ian >