libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Libtool can't find libgcc_s


From: Ralf Wildenhues
Subject: Re: Libtool can't find libgcc_s
Date: Wed, 10 Nov 2010 19:59:38 +0100
User-agent: Mutt/1.5.20 (2010-08-04)

Hello Ethan,

* address@hidden 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?  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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]