[Top][All Lists]

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

linker flag re-ordering problem

From: Mark Ellis
Subject: linker flag re-ordering problem
Date: Thu, 5 Feb 2009 12:50:38 +0000

Hi all

I seem to have encountered a problem caused by libtool re-ordering
linker command line options passed through by automake from LDFLAGS.

I have confirmed this with 2.2.4 and 2.2.6, it originated from a user
who reports that he does not have the problem with 1.5.26

He wanted to pass -Wl,--as-needed in LDFLAGS, which needs to be before
the libraries it will apply to on the linker command line, and indeed it
is in the correct place in the call to libtool

/bin/bash ../libtool --tag=CC   --mode=link gcc     -Wall -Wsign-compare
-Wno-long-long -Wall -no-undefined -version-info 0:0:0 -Wl,-z,defs
-Wl,--as-needed -o
-rpath /home/mark/sources/synce/tmp/test-2/lib dllinflate.lo extract.lo
helper.lo installshield_sfx.lo liborange_log.lo nullsoft.lo pe.lo
rsrc.lo separate.lo squeeze.lo suf.lo tomtom.lo -lsynce   -ldynamite
-lunshield   -lz -lmagic

but libtool then moves it to the end.

libtool: link: gcc
-shared  .libs/dllinflate.o .libs/extract.o .libs/helper.o 
.libs/liborange_log.o .libs/nullsoft.o .libs/pe.o .libs/rsrc.o .libs/separate.o
.libs/squeeze.o .libs/suf.o .libs/tomtom.o   /usr/lib/
-L//lib -L/usr/lib -lhal -ldbus-glib-1
-ldbus-1 /usr/lib/ /usr/lib/
-lm /usr/lib/ /usr/lib/ /usr/lib/
-lz  -Wl,-z -Wl,defs -Wl,--as-needed   -Wl,-soname -Wl,
-o .libs/

and it has no effect.

Is there some way to avoid this, or is it a bug ?

Many thanks

Attachment: signature.asc
Description: This is a digitally signed message part

reply via email to

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