[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 liborange.la
-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/installshield_sfx.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/libsynce.so
-L//lib -L/usr/lib -lhal -ldbus-glib-1
-ldbus-1 /usr/lib/libgobject-2.0.so /usr/lib/libglib-2.0.so
-lm /usr/lib/libdynamite.so /usr/lib/libunshield.so /usr/lib/libmagic.so
-lz -Wl,-z -Wl,defs -Wl,--as-needed -Wl,-soname -Wl,liborange.so.0
-o .libs/liborange.so.0.0.0
and it has no effect.
Is there some way to avoid this, or is it a bug ?
Many thanks
Mark
signature.asc
Description: This is a digitally signed message part
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- linker flag re-ordering problem,
Mark Ellis <=