Hi Ralf,
Thanks for the reply.
On Thu, 2011-01-13 at 08:24 +0100, Ralf Wildenhues wrote:
> * Richard Purdie wrote on Wed, Jan 12, 2011 at 12:06:13AM CET:
> > Firstly, for the first time ever for us, it appears libtool is no longer
> > relinking our libraries at install time.
>
> That's weird, I don't think the sysroot feature should've caused this
> change. Not quite sure though.
>
> > This is welcome as we're cross
> > compiling to a sysroot and we'd never want to actually run them in situ
> > so this could probably save us some build time. It does however mean we
> > never go for a relink step so we're hitting codepaths and issues that
> > I've never seen. For reference, we always used to set installed="no" in
> > our "staged" libraries prior to sysroot support since this let us hack
> > around the lack of sysroot support easier.
> >
> > Anyhow, the problem I'm seeing is that the final library has an RPATH
> > including the sysroot prefix when make is calling libtool with
> > -rpath /usr/lib at link time. I looked at the code in ltmain.m4sh
> > starting at line 7240 (see the end of the email for a quotation) and
> > firstly, I don't understand why the func_replace_sysroot call is inside
> > the $hardcode_libdir_separator test? Surely it should be outside it and
> > happen whenever $hardcode_libdir_flag_spec is set?
Firstly let me be upfront and clear, I do have some patches applied on
top of libtool 2.4 to address some problems. These are:
http://git.pokylinux.org/cgit.cgi/poky-contrib/tree/meta/recipes-devtools/libtool/libtool/rename-with-sysroot.patch?h=sgarman/libtool-sysroot
(to stop conflicts with gcc/binutils configure options)
http://git.pokylinux.org/cgit.cgi/poky-contrib/tree/meta/recipes-devtools/libtool/libtool/prefix.patch?h=sgarman/libtool-sysroot
(renamed "libtool" to <TARGET_PREFIX>-libtool, which is mainly useful to
detect when our libtool patches aren't being noticed)
http://git.pokylinux.org/cgit.cgi/poky-contrib/tree/meta/recipes-devtools/libtool/libtool/trailingslash.patch?h=sgarman/libtool-sysroot
(a path comparison problem I never did get to the bottom of to report
properly but the fix appears harmless)
http://git.pokylinux.org/cgit.cgi/poky-contrib/tree/meta/recipes-devtools/libtool/libtool/use-sysroot-in-libpath.patch?h=sgarman/libtool-sysroot
(a sysroot fix I believe is in libtool git now)
I don't believe any of these are contributing to the issues I'm seeing
though.
http://git.pokylinux.org/cgit.cgi/poky-contrib/tree/meta/recipes-devtools/libtool/libtool/fix-final-rpath.patch?h=sgarman/libtool-sysroot
is a WIP patch which addresses some of the problems I refer to in this
email thread. Its not applied for the tests below.
> Please show the --mode={link,install} commands plus all of their output,
> also './libtool --config'. Please also show how exactly you invoke
> configure. Thanks.
A link command and output showing the problem:
/bin/sh ./i586-poky-linux-libtool --tag=CC --mode=link i586-poky-linux-gcc
-march=i586
--sysroot=/media/build2/builds/rptest/b2/tmp/sysroots/i586-poky-linux
-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2 -ggdb
-feliminate-unused-debug-types -no-undefined -export-dynamic -version-number
0:44:0 -Wl,--version-script=libpng.vers -Wl,-O1 -Wl,--hash-style=gnu
-Wl,--as-needed -o libpng12.la -rpath /usr/lib libpng12_la-png.lo
libpng12_la-pngset.lo libpng12_la-pngget.lo libpng12_la-pngrutil.lo
libpng12_la-pngtrans.lo libpng12_la-pngwutil.lo libpng12_la-pngread.lo
libpng12_la-pngrio.lo libpng12_la-pngwio.lo libpng12_la-pngwrite.lo
libpng12_la-pngrtran.lo libpng12_la-pngwtran.lo libpng12_la-pngmem.lo
libpng12_la-pngerror.lo libpng12_la-pngpread.lo -lz -lm
i586-poky-linux-libtool: link: i586-poky-linux-gcc -march=i586
--sysroot=/media/build2/builds/rptest/b2/tmp/sysroots/i586-poky-linux -shared
-fPIC -DPIC .libs/libpng12_la-png.o .libs/libpng12_la-pngset.o
.libs/libpng12_la-pngget.o .libs/libpng12_la-pngrutil.o
.libs/libpng12_la-pngtrans.o .libs/libpng12_la-pngwutil.o
.libs/libpng12_la-pngread.o .libs/libpng12_la-pngrio.o
.libs/libpng12_la-pngwio.o .libs/libpng12_la-pngwrite.o
.libs/libpng12_la-pngrtran.o .libs/libpng12_la-pngwtran.o
.libs/libpng12_la-pngmem.o .libs/libpng12_la-pngerror.o
.libs/libpng12_la-pngpread.o -Wl,-rpath
-Wl,/media/build2/builds/rptest/b2/tmp/sysroots/i586-poky-linux/usr/lib
/media/build2/builds/rptest/b2/tmp/sysroots/i586-poky-linux/usr/lib/libz.so -lm
-march=i586
--sysroot=/media/build2/builds/rptest/b2/tmp/sysroots/i586-poky-linux -O2
-Wl,--version-script=libpng.vers -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed
-Wl,-soname -Wl,libpng12.so.0 -o .libs/libpng12.so.0.44.0
i586-poky-linux-libtool: link: (cd ".libs" && rm -f "libpng12.so.0" && ln -s
"libpng12.so.0.44.0" "libpng12.so.0")
i586-poky-linux-libtool: link: (cd ".libs" && rm -f "libpng12.so" && ln -s
"libpng12.so.0.44.0" "libpng12.so")
mv -f .deps/libpng_la-pngwtran.Tpo .deps/libpng_la-pngwtran.Plo
i586-poky-linux-libtool: link: i586-poky-linux-ar cru .libs/libpng12.a
libpng12_la-png.o libpng12_la-pngset.o libpng12_la-pngget.o
libpng12_la-pngrutil.o libpng12_la-pngtrans.o libpng12_la-pngwutil.o
libpng12_la-pngread.o libpng12_la-pngrio.o libpng12_la-pngwio.o
libpng12_la-pngwrite.o libpng12_la-pngrtran.o libpng12_la-pngwtran.o
libpng12_la-pngmem.o libpng12_la-pngerror.o libpng12_la-pngpread.o
i586-poky-linux-libtool: link: i586-poky-linux-ranlib .libs/libpng12.a
i586-poky-linux-libtool: link: ( cd ".libs" && rm -f "libpng12.la" && ln -s
"../libpng12.la" "libpng12.la" )
i586-poky-linux-libtool: compile: i586-poky-linux-gcc -march=i586
--sysroot=/media/build2/builds/rptest/b2/tmp/sysroots/i586-poky-linux
-DHAVE_CONFIG_H -I. -DPNG_CONFIGURE_LIBPNG -fexpensive-optimizations
-fomit-frame-pointer -frename-registers -O2 -ggdb
-feliminate-unused-debug-types -MT libpng_la-pngpread.lo -MD -MP -MF
.deps/libpng_la-pngpread.Tpo -c pngpread.c -o libpng_la-pngpread.o >/dev/null
2>&1
i586-poky-linux-libtool: compile: i586-poky-linux-gcc -march=i586
--sysroot=/media/build2/builds/rptest/b2/tmp/sysroots/i586-poky-linux
-DHAVE_CONFIG_H -I. -DPNG_CONFIGURE_LIBPNG -fexpensive-optimizations
-fomit-frame-pointer -frename-registers -O2 -ggdb
-feliminate-unused-debug-types -MT libpng_la-pngrtran.lo -MD -MP -MF
.deps/libpng_la-pngrtran.Tpo -c pngrtran.c -o libpng_la-pngrtran.o >/dev/null
2>&1
mv -f .deps/libpng_la-pngpread.Tpo .deps/libpng_la-pngpread.Plo
mv -f .deps/libpng_la-pngrtran.Tpo .deps/libpng_la-pngrtran.Plo
And the corresponding install step:
/bin/sh ./i586-poky-linux-libtool --mode=install /usr/bin/install -c
libpng12.la libpng.la
'/media/build2/builds/rptest/b2/tmp/work/i586-poky-linux/libpng-1.2.44-r0/image/usr/lib'
i586-poky-linux-libtool: install: /usr/bin/install -c .libs/libpng12.so.0.44.0
/media/build2/builds/rptest/b2/tmp/work/i586-poky-linux/libpng-1.2.44-r0/image/usr/lib/libpng12.so.0.44.0
i586-poky-linux-libtool: install: (cd
/media/build2/builds/rptest/b2/tmp/work/i586-poky-linux/libpng-1.2.44-r0/image/usr/lib
&& { ln -s -f libpng12.so.0.44.0 libpng12.so.0 || { rm -f libpng12.so.0 && ln
-s libpng12.so.0.44.0 libpng12.so.0; }; })
i586-poky-linux-libtool: install: (cd
/media/build2/builds/rptest/b2/tmp/work/i586-poky-linux/libpng-1.2.44-r0/image/usr/lib
&& { ln -s -f libpng12.so.0.44.0 libpng12.so || { rm -f libpng12.so && ln -s
libpng12.so.0.44.0 libpng12.so; }; })
i586-poky-linux-libtool: install: /usr/bin/install -c .libs/libpng12.lai
/media/build2/builds/rptest/b2/tmp/work/i586-poky-linux/libpng-1.2.44-r0/image/usr/lib/libpng12.la
i586-poky-linux-libtool: install: /usr/bin/install -c .libs/libpng.so.3.44.0
/media/build2/builds/rptest/b2/tmp/work/i586-poky-linux/libpng-1.2.44-r0/image/usr/lib/libpng.so.3.44.0
i586-poky-linux-libtool: install: (cd
/media/build2/builds/rptest/b2/tmp/work/i586-poky-linux/libpng-1.2.44-r0/image/usr/lib
&& { ln -s -f libpng.so.3.44.0 libpng.so.3 || { rm -f libpng.so.3 && ln -s
libpng.so.3.44.0 libpng.so.3; }; })
i586-poky-linux-libtool: install: (cd
/media/build2/builds/rptest/b2/tmp/work/i586-poky-linux/libpng-1.2.44-r0/image/usr/lib
&& { ln -s -f libpng.so.3.44.0 libpng.so || { rm -f libpng.so && ln -s
libpng.so.3.44.0 libpng.so; }; })
i586-poky-linux-libtool: install: /usr/bin/install -c .libs/libpng.lai
/media/build2/builds/rptest/b2/tmp/work/i586-poky-linux/libpng-1.2.44-r0/image/usr/lib/libpng.la
i586-poky-linux-libtool: install: /usr/bin/install -c .libs/libpng12.a
/media/build2/builds/rptest/b2/tmp/work/i586-poky-linux/libpng-1.2.44-r0/image/usr/lib/libpng12.a
i586-poky-linux-libtool: install: chmod 644
/media/build2/builds/rptest/b2/tmp/work/i586-poky-linux/libpng-1.2.44-r0/image/usr/lib/libpng12.a
i586-poky-linux-libtool: install: i586-poky-linux-ranlib
/media/build2/builds/rptest/b2/tmp/work/i586-poky-linux/libpng-1.2.44-r0/image/usr/lib/libpng12.a
i586-poky-linux-libtool: install: /usr/bin/install -c .libs/libpng.a
/media/build2/builds/rptest/b2/tmp/work/i586-poky-linux/libpng-1.2.44-r0/image/usr/lib/libpng.a
i586-poky-linux-libtool: install: chmod 644
/media/build2/builds/rptest/b2/tmp/work/i586-poky-linux/libpng-1.2.44-r0/image/usr/lib/libpng.a
i586-poky-linux-libtool: install: i586-poky-linux-ranlib
/media/build2/builds/rptest/b2/tmp/work/i586-poky-linux/libpng-1.2.44-r0/image/usr/lib/libpng.a
i586-poky-linux-libtool: install: warning: remember to run
`i586-poky-linux-libtool --finish /usr/lib'
and the configure call
/media/build2/builds/rptest/b2/tmp/work/i586-poky-linux/libpng-1.2.44-r0/libpng-1.2.44/configure
--build=x86_64-linux --host=i586-poky-linux --target=i586-poky-linux
--prefix=/usr --exec_prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin
--libexecdir=/usr/libexec --datadir=/usr/share --sysconfdir=/etc
--sharedstatedir=/com --localstatedir=/var --libdir=/usr/lib
--includedir=/usr/include --oldincludedir=/usr/include
--infodir=/usr/share/info --mandir=/usr/share/man
--with-libtool-sysroot=/media/build2/builds/rptest/b2/tmp/sysroots/i586-poky-linux
The libtool --config output is attached.
> > Changing that helps a bit and I end up with an RPATH of "=/usr/lib" so
> > the sysroot prefix is gone but the "=" is there. I suspect that isn't
> > valid so I added the following code after the func_replace_sysroot call
> >
> > func_stripname '=' '' "$libdir"
> > libdir=$func_stripname_result
> >
> > and then I get an RPATH of "/usr/lib" which is ok to a point.
>
> The replacing of '=' can be achieved by running 'libtool --mode=finish
> LIB' later, although I see we don't document this everywhere yet.
I looked at this and see it changes the .la file but would/should it
relink the binary to encode a different RPATH value? I'm not sure
libtool would have the context to make that change at "finish" time?
> > Of course this is listed in $sys_lib_dlsearch_path_spec so shouldn't be
> > getting added at all. Its coming to this function via $compile_rpath
> > which is being set around line 5939 which in turn is coming from absdir.
> > absdir is being compared against $sys_lib_dlsearch_path_spec but without
> > adding/removing any sysroot prefixes.
>
> Hmm, that sounds like a bug indeed.
>
> > I'd really therefore like to ask what behaviour to be expecting from
> > libtool before I try and write patches to fix any of this. To summarise
> > some of my questions:
>
> I can answer them only with more information, sorry.
See above, let me know if you need anything further.
Cheers,
Richard
sh-4.1$ ./i586-poky-linux-libtool --config
# A sed program that does not truncate output.
SED="/bin/sed"
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
Xsed="$SED -e 1s/^X//"
# A grep program that handles long lines.
GREP="/bin/grep"
# An ERE matcher.
EGREP="/bin/grep -E"
# A literal string matcher.
FGREP="/bin/grep -F"
# Shell to use when invoking shell scripts.
SHELL="/bin/sh"
# An echo program that protects backslashes.
ECHO="printf %s\\n"
# Assembler program.
AS="i586-poky-linux-as"
# DLL creation program.
DLLTOOL="dlltool"
# Object dumper program.
OBJDUMP="i586-poky-linux-objdump"
# Which release of libtool.m4 was used?
macro_version=2.4
macro_revision=1.3293
# Whether or not to build shared libraries.
build_libtool_libs=yes
# Whether or not to build static libraries.
build_old_libs=yes
# What type of objects to build.
pic_mode=default
# Whether or not to optimize for fast installation.
fast_install=yes
# The host system.
host_alias=i586-poky-linux
host=i586-poky-linux-gnu
host_os=linux-gnu
# The build system.
build_alias=x86_64-linux
build=x86_64-pc-linux-gnu
build_os=linux-gnu
# A BSD- or MS-compatible name lister.
NM="/media/build2/builds/rptest/b2/tmp/sysroots/x86_64-linux/usr/bin/i586-poky-linux/i586-poky-linux-nm
-B"
# Whether we need soft or hard links.
LN_S="ln -s"
# What is the maximum length of a command?
max_cmd_len=1572864
# Object file suffix (normally "o").
objext=o
# Executable file suffix (normally "").
exeext=
# whether the shell understands "unset".
lt_unset=unset
# turn spaces into newlines.
SP2NL="tr \\040 \\012"
# turn newlines into spaces.
NL2SP="tr \\015\\012 \\040\\040"
# convert $build file names to $host format.
to_host_file_cmd=func_convert_file_noop
# convert $build files to toolchain format.
to_tool_file_cmd=func_convert_file_noop
# Method to check whether dependent libraries are shared objects.
deplibs_check_method="pass_all"
# Command to use when deplibs_check_method = "file_magic".
file_magic_cmd="\$MAGIC_CMD"
# How to find potential files when deplibs_check_method = "file_magic".
file_magic_glob=""
# Find potential files using nocaseglob when deplibs_check_method =
"file_magic".
want_nocaseglob="no"
# Command to associate shared and link libraries.
sharedlib_from_linklib_cmd="printf %s\\n"
# The archiver.
AR="i586-poky-linux-ar"
# Flags to create an archive.
AR_FLAGS="cru"
# How to feed a file listing to the archiver.
archiver_list_spec="@"
# A symbol stripping program.
STRIP="i586-poky-linux-strip"
# Commands used to install an old-style archive.
RANLIB="i586-poky-linux-ranlib"
old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib"
old_postuninstall_cmds=""
# Whether to use a lock for old archive extraction.
lock_old_archive_extraction=no
# A C compiler.
LTCC="i586-poky-linux-gcc -march=i586
--sysroot=/media/build2/builds/rptest/b2/tmp/sysroots/i586-poky-linux"
# LTCC compiler flags.
LTCFLAGS="-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2
-ggdb -feliminate-unused-debug-types"
# Take the output of nm and produce a listing of raw symbols and C names.
global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[
][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p' | sed '/ __gnu_lto/d'"
# Transform the output of nm in a proper C declaration.
global_symbol_to_cdecl="sed -n -e 's/^T .* \\(.*\\)\$/extern int \\1();/p' -e
's/^[ABCDGIRSTW]* .* \\(.*\\)\$/extern char \\1;/p'"
# Transform the output of nm in a C name address pair.
global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\)[ ]*\$/
{\\\"\\1\\\", (void *) 0},/p' -e 's/^[ABCDGIRSTW]* \\([^ ]*\\) \\([^ ]*\\)\$/
{\"\\2\", (void *) \\&\\2},/p'"
# Transform the output of nm in a C name address pair when lib prefix is needed.
global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \\([^ ]*\\)[ ]*\$/
{\\\"\\1\\\", (void *) 0},/p' -e 's/^[ABCDGIRSTW]* \\([^ ]*\\) \\(lib[^
]*\\)\$/ {\"\\2\", (void *) \\&\\2},/p' -e 's/^[ABCDGIRSTW]* \\([^ ]*\\) \\([^
]*\\)\$/ {\"lib\\2\", (void *) \\&\\2},/p'"
# Specify filename containing input files for $NM.
nm_file_list_spec="@"
# The root where to search for dependent libraries,and in which our libraries
should be installed.
lt_sysroot=/media/build2/builds/rptest/b2/tmp/sysroots/i586-poky-linux
# The name of the directory that contains temporary libtool files.
objdir=.libs
# Used to examine libraries when file_magic_cmd begins with "file".
MAGIC_CMD=file
# Must we lock files when doing compilation?
need_locks="no"
# Manifest tool.
MANIFEST_TOOL=":"
# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
DSYMUTIL=""
# Tool to change global to local symbols on Mac OS X.
NMEDIT=""
# Tool to manipulate fat objects and archives on Mac OS X.
LIPO=""
# ldd/readelf like tool for Mach-O binaries on Mac OS X.
OTOOL=""
# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
OTOOL64=""
# Old archive suffix (normally "a").
libext=a
# Shared library suffix (normally ".so").
shrext_cmds=".so"
# The commands to extract the exported symbol list from a shared archive.
extract_expsyms_cmds=""
# Variables whose values should be saved in libtool wrapper scripts and
# restored at link time.
variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX
COMPILER_PATH LIBRARY_PATH"
# Do we need the "lib" prefix for modules?
need_lib_prefix=no
# Do we need a version for libraries?
need_version=no
# Library versioning type.
version_type=linux
# Shared library runtime path variable.
runpath_var=LD_RUN_PATH
# Shared library path variable.
shlibpath_var=LD_LIBRARY_PATH
# Is shlibpath searched before the hard-coded library search path?
shlibpath_overrides_runpath=no
# Format of library name prefix.
libname_spec="lib\$name"
# List of archive names. First name is the real one, the rest are links.
# The last name is the one that the linker finds with -lNAME
library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix
\${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
# The coded name of the library, if different from the real name.
soname_spec="\${libname}\${release}\${shared_ext}\$major"
# Permission mode override for installation of shared libraries.
install_override_mode=""
# Command to use after installation of a shared archive.
postinstall_cmds=""
# Command to use after uninstallation of a shared archive.
postuninstall_cmds=""
# Commands used to finish a libtool library installation in a directory.
finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
# As "finish_cmds", except a single script fragment to be evaled but
# not shown.
finish_eval=""
# Whether we should hardcode library paths into libraries.
hardcode_into_libs=yes
# Compile-time system search path for libraries.
sys_lib_search_path_spec="/media/build2/builds/rptest/b2/tmp/sysroots/x86_64-linux/usr/lib/i586-poky-linux/gcc/i586-poky-linux/4.5.1
/media/build2/builds/rptest/b2/tmp/sysroots/x86_64-linux/usr/i586-poky-linux/lib
/media/build2/builds/rptest/b2/tmp/sysroots/i586-poky-linux/lib
/media/build2/builds/rptest/b2/tmp/sysroots/i586-poky-linux/usr/lib/i586-poky-linux/4.5.1
/media/build2/builds/rptest/b2/tmp/sysroots/i586-poky-linux/usr/lib "
# Run-time system search path for libraries.
sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/lib/mesa /usr/lib32/mesa
/usr/lib/alsa-lib /usr/local/lib /lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu "
# Whether dlopen is supported.
dlopen_support=unknown
# Whether dlopen of programs is supported.
dlopen_self=unknown
# Whether dlopen of statically linked programs is supported.
dlopen_self_static=unknown
# Commands to strip libraries.
old_striplib="i586-poky-linux-strip --strip-debug"
striplib="i586-poky-linux-strip --strip-unneeded"
# The linker used to build libraries.
LD="i586-poky-linux-ld
--sysroot=/media/build2/builds/rptest/b2/tmp/sysroots/i586-poky-linux"
# How to create reloadable object files.
reload_flag=" -r"
reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
# Commands used to build an old-style archive.
old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$oldlib"
# A language specific compiler.
CC="i586-poky-linux-gcc -march=i586
--sysroot=/media/build2/builds/rptest/b2/tmp/sysroots/i586-poky-linux"
# Is the compiler the GNU compiler?
with_gcc=yes
# Compiler flag to turn off builtin functions.
no_builtin_flag=" -fno-builtin"
# Additional compiler flags for building library objects.
pic_flag=" -fPIC -DPIC"
# How to pass a linker flag through the compiler.
wl="-Wl,"
# Compiler flag to prevent dynamic linking.
link_static_flag="-static"
# Does compiler simultaneously support -c and -o options?
compiler_c_o="yes"
# Whether or not to add -lc for building shared libraries.
build_libtool_need_lc=no
# Whether or not to disallow shared libs when runtime libs are static.
allow_libtool_libs_with_static_runtimes=no
# Compiler flag to allow reflexive dlopens.
export_dynamic_flag_spec="\${wl}--export-dynamic"
# Compiler flag to generate shared objects directly from archives.
whole_archive_flag_spec="\${wl}--whole-archive\$convenience
\${wl}--no-whole-archive"
# Whether the compiler copes with passing no objects directly.
compiler_needs_object="no"
# Create an old-style archive from a shared archive.
old_archive_from_new_cmds=""
# Create a temporary old-style archive to link instead of a shared archive.
old_archive_from_expsyms_cmds=""
# Commands used to build a shared archive.
archive_cmds="\$CC -shared \$pic_flag \$libobjs \$deplibs \$compiler_flags
\${wl}-soname \$wl\$soname -o \$lib"
archive_expsym_cmds="echo \\\"{ global:\\\" > \$output_objdir/\$libname.ver~
cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >>
\$output_objdir/\$libname.ver~
echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~
\$CC -shared \$pic_flag \$libobjs \$deplibs \$compiler_flags
\${wl}-soname \$wl\$soname \${wl}-version-script
\${wl}\$output_objdir/\$libname.ver -o \$lib"
# Commands used to build a loadable module if different from building
# a shared archive.
module_cmds=""
module_expsym_cmds=""
# Whether we are building with GNU ld or not.
with_gnu_ld="yes"
# Flag that allows shared libraries with undefined symbols to be built.
allow_undefined_flag=""
# Flag that enforces no undefined symbols.
no_undefined_flag=""
# Flag to hardcode $libdir into a binary during linking.
# This must work even if $libdir does not exist
hardcode_libdir_flag_spec="\${wl}-rpath \${wl}\$libdir"
# If ld is used when linking, flag to hardcode $libdir into a binary
# during linking. This must work even if $libdir does not exist.
hardcode_libdir_flag_spec_ld=""
# Whether we need a single "-rpath" flag with a separated argument.
hardcode_libdir_separator=""
# Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
# DIR into the resulting binary.
hardcode_direct=no
# Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
# DIR into the resulting binary and the resulting library dependency is
# "absolute",i.e impossible to change by setting ${shlibpath_var} if the
# library is relocated.
hardcode_direct_absolute=no
# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
# into the resulting binary.
hardcode_minus_L=no
# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
# into the resulting binary.
hardcode_shlibpath_var=unsupported
# Set to "yes" if building a shared library automatically hardcodes DIR
# into the library and all subsequent libraries and executables linked
# against it.
hardcode_automatic=no
# Set to yes if linker adds runtime paths of dependent libraries
# to runtime path list.
inherit_rpath=no
# Whether libtool must link a program against all its dependency libraries.
link_all_deplibs=unknown
# Set to "yes" if exported symbols are required.
always_export_symbols=no
# The commands to list exported symbols.
export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe |
\$SED 's/.* //' | sort | uniq > \$export_symbols"
# Symbols that should not be listed in the preloaded symbols.
exclude_expsyms="_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*"
# Symbols that must always be exported.
include_expsyms=""
# Commands necessary for linking programs (against libraries) with templates.
prelink_cmds=""
# Commands necessary for finishing linking programs.
postlink_cmds=""
# Specify filename containing input files.
file_list_spec=""
# How to hardcode a shared library path into an executable.
hardcode_action=immediate
_______________________________________________
http://lists.gnu.org/mailman/listinfo/libtool