Hello Thomas,

* Thomas Epperson wrote on Mon, Oct 06, 2008 at 12:41:19PM CEST:
> kernel_LDFLAGS = -nostdlib -lgcc -T $(srcdir)/x86/link.ld
> 
> I need to specify nostdlib and lgcc at the same time. But when I do it this
> way, lgcc gets ignored and the functions in it do not get linked in. I think
> this is a problem with the order in which nostdlib and lgcc are called.
> nostdlib gets caught in COLLECT_GCC_OPTIONS while lgcc gets passed to the
> collect2 program (output gathered from the -v flag).

I don't think your issue has to do with automake at all; it rather looks
like a GCC issue.  I can't tell if all you need is to use '-Wl,' or if
there is some limitation in the gcc driver that you need to work around.

> I can do away with the nostdlib option, but that causes undesired libraries
> to be linked in (which is bad).

Maybe --as-needed helps you (see the gnulib module lib-ignore for how to
use it portably).

Hope that helps.

Cheers,
Ralf


Reply via email to