On Wed, Nov/10/2010 07:59:38PM, Ralf Wildenhues wrote: > Hello Ethan, > > * ethan.mall...@oracle.com wrote on Wed, Nov 10, 2010 at 07:48:14PM CET: > > Libtool seems to get confused about where libgcc_s is, e.g., > > > > $ /bin/sh ../../../libtool --tag=CXX --mode=link icpc -lgcc_s foo.c -o > > a.out > > libtool: link: icpc foo.c -o a.out -lgcc_s > > ld: skipping incompatible > > /usr/lib/gcc/x86_64-redhat-linux/3.4.6//libgcc_s.so when searching for > > -lgcc_s > > ld: cannot find -lgcc_s > > > > If I help it out with my own -L, it works: > > > > $ /bin/sh ../../../libtool --tag=CXX --mode=link icpc > > -L/usr/lib/gcc/x86_64-redhat-linux/4.1.2/32 -lgcc_s foo.c -o a.out > > libtool: link: icpc foo.c -o a.out > > -L/usr/lib/gcc/x86_64-redhat-linux/4.1.2/32 -lgcc_s > > > > $ ../../../libtool --version > > ltmain.sh (GNU libtool) 2.2.6b > > I think the first question to ask is why are you passing -lgcc_s in the > first place?
I don't know. Does libtoolize add -lgcc_s to postdeps? The above is a stripped down link line that happens when I build the Open MPI trunk using Intel 11.0 compilers. -Ethan > > The instance that decided that that would be necessary > should also decide which libgcc_s to use, and whether to prepend > suitable -L flags. > > Aside, please pass -l flags after the objects that need the libraries, > that is guaranteed to work portably, i.e., also for static linking. > > Cheers, > Ralf _______________________________________________ http://lists.gnu.org/mailman/listinfo/libtool