|
From: Tom H. <to...@co...> - 2005-09-12 10:00:31
|
In message <200...@ja...>
sv...@va... wrote:
> Modified: branches/ASPACEM/Makefile.tool.am
> ===================================================================
> --- branches/ASPACEM/Makefile.tool.am 2005-09-11 00:48:18 UTC (rev 4616)
> +++ branches/ASPACEM/Makefile.tool.am 2005-09-11 10:06:07 UTC (rev 4617)
> @@ -23,7 +23,7 @@
>
> ## Nb: do not call this variables "TOOL_LINKADD" and "TOOL_LDFLAGS" -- that
> ## makes automake think we are building something called "TOOLS".
> -TOOL_LINKADD = $(COREGRIND_LIBS) $(COREGRIND_LIBS) -lgcc
> +TOOL_LINKADD = -Wl,-whole-archive $(COREGRIND_LIBS) -Wl,-no-whole-archive -lgcc
> TOOL_LINKFLAGS = \
> -static \
> -Wl,-defsym,valt_load_address=@VALT_LOAD_ADDRESS@ \
Unfortunately this doesn't work on my machine:
running: automake -a
cachegrind/Makefile.am:16: linker flags such as `-Wl,-whole-archive' belong in `cachegrind_LDFLAGS
lackey/Makefile.am:7: linker flags such as `-Wl,-whole-archive' belong in `lackey_LDFLAGS
massif/Makefile.am:17: linker flags such as `-Wl,-whole-archive' belong in `massif_LDFLAGS
memcheck/Makefile.am:23: linker flags such as `-Wl,-whole-archive' belong in `memcheck_LDFLAGS
none/Makefile.am:7: linker flags such as `-Wl,-whole-archive' belong in `none_LDFLAGS
error: while running 'automake -a'
Of course you can't actually move those flags to LDFLAGS as you can't
then turn them off again.
What does seem to work for me is going back to the old code (and in
fact getting rid of the second duplicate library) and then adding to
the LDFLAGS a "-u _start" option to tell the linker that _start is
needed which then causes a chain reaction of pulling in required code
from the libraries.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|