This is the mail archive of the automake@gnu.org mailing list for the automake project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: (correction) Adding '-nostartfiles' at link stage


>>> "Yannick" == Yannick Perret <yperret@bat710.univ-lyon1.fr> writes:

 Yannick> Alexandre Duret-Lutz wrote:

[...]

 adl> Try this:

 adl>   libfc_la_LDFLAGS = -Xlinker -nostartfiles

 Yannick> I added it, and it change nothing.  The _LDFLAGS is
 Yannick> transmitted to 'libtool', but 'libtool' does not use
 Yannick> it at all... 

Yes it does, look at your output:

[...]

 Yannick> gcc -shared  fc_check.lo fc_tools.lo fc_time.lo
 Yannick> fc_ressources.lo fc_com.lo fc_memory.lo fc_fifo.lo
 Yannick> fc_semaphore.lo  -lpthread -ldl  -Wl,-nostartfiles
                                           ^^^^^^^^^^^^^^^^^
 Yannick> -Wl,-soname -Wl,libfc.so.0 -o .libs/libfc.so.0.0.0
 Yannick> fc_check.lo: In function `_init':
 Yannick> fc_check.lo(.text+0x14c): multiple definition of

Simply, my suggestion was wrong: you don't want -Xlinker, because
-nostartfiles is not a linker option (i.e., this is a gcc option
not understood by ld); instead you need

  libfc_la_LDFLAGS = -Xcompiler -nostartfiles

[...]
-- 
Alexandre Duret-Lutz



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]