Re: How to recursively search libs using gcc

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

 



On 13 January 2011 10:28, Name lastlong wrote:
> Hi,
>
> We have an option "--start-group <archive or obj files> --end-group"
> to LD that searches the libs recursively.
>
> What do I need to do (if I want to use gcc for linking and not LD) for searching libs recursively using gcc?
>
> I know following workaround;
> #gcc -Wl,--start-group <obj or archive files> -Wl,--end-group

That's not a workaround, it's how to tell gcc to pass arguments to the
linker, so that's the right way to do it.
That's described in the man page for gnu ld.

> Is there any other way?

gcc '-Wl,-(' <obj or archive files> '-Wl,-)'

But it is just the same as using start-group/end-group

> Does gcc, by default, searches libs recursively?

No.  You can see the options passed to the linker by using 'gcc -v ...'


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux