Re: ltmain.sh patch: -all-dynamic option
Ralf Wildenhues ralf.wildenh...@gmx.de writes: Hello Karl-Andre', * Karl-Andre' Skevik wrote on Sat, Oct 30, 2010 at 11:46:38AM CEST: I have an application that builds a library for use with LD_PRELOAD, which should only be built dynamically. I have used a modification like the one below to achieve this: *** ltmain.sh.orig Sat Oct 30 11:35:37 2010 --- ltmain.sh Sat Oct 30 11:37:50 2010 *** *** 5173,5178 --- 5173,5185 fi prefer_static_libs=yes ;; + -all-dynamic) + if test $build_libtool_libs = no; then + func_warning unable to build only dynamic libraries in this configuration + fi + build_old_libs=no + prefer_static_libs=no + ;; -static) if test -z $pic_flag test -n $link_static_flag; then dlopen_self=$dlopen_self_static Would it be possible to have this kind of functionality included in the official libtool distribution? Thanks for the report and patch. What does -all-dynamic bring you that either of the following won't? Hello, thank you for the feedback. - configure with --disable-static, The package also builds normal libraries that should be build both as static and dynamic, so this option can unfortunately not be used. - add --tag=disable-static to AM_LIBTOOLFLAGS or libfoo_la_LIBTOOLFLAGS. At least with libtool 1.5.26 this does not appear to have any effect, a static library still gets built and installed. Regards, Karl-Andre' Skevik Inferno Nettverk A/S
Re: ltmain.sh patch: -all-dynamic option
* Karl-Andre' Skevik wrote on Tue, Nov 02, 2010 at 09:26:33AM CET: Ralf Wildenhues writes: * Karl-Andre' Skevik wrote on Sat, Oct 30, 2010 at 11:46:38AM CEST: I have an application that builds a library for use with LD_PRELOAD, which should only be built dynamically. I have used a modification like the one below to achieve this: Thanks for the report and patch. What does -all-dynamic bring you that either of the following won't? - configure with --disable-static, The package also builds normal libraries that should be build both as static and dynamic, so this option can unfortunately not be used. OK. - add --tag=disable-static to AM_LIBTOOLFLAGS or libfoo_la_LIBTOOLFLAGS. At least with libtool 1.5.26 this does not appear to have any effect, a static library still gets built and installed. Libtool 1.5.26 is old, and the 1.5 branch not maintained any more. We have arrived at 2.4, please consider updating. That said, I *think* that this should have worked with 1.5.x already; but you need Automake = 1.10 for support of the *_LIBTOOLFLAGS special variables. I'm guessing that you have an older Automake, because the following minimal example gets me a libfoo that is not built statically. Please report whether it does for you, and if you get a static libfoo.a, please try to modify the example so it exposes the failure in your setup. Thanks, Ralf cat configure.ac \EOF AC_INIT([a], [1]) AM_INIT_AUTOMAKE([foreign]) AC_PROG_CC AC_PROG_LIBTOOL AC_CONFIG_FILES([Makefile]) AC_OUTPUT EOF cat Makefile.am \EOF lib_LTLIBRARIES = libfoo.la libfoo_la_LIBTOOLFLAGS = --tag=disable-static EOF : libfoo.c autoreconf -vi ./configure make make install
ltmain.sh patch: -all-dynamic option
Hello, I have an application that builds a library for use with LD_PRELOAD, which should only be built dynamically. I have used a modification like the one below to achieve this: *** ltmain.sh.orig Sat Oct 30 11:35:37 2010 --- ltmain.sh Sat Oct 30 11:37:50 2010 *** *** 5173,5178 --- 5173,5185 fi prefer_static_libs=yes ;; + -all-dynamic) + if test $build_libtool_libs = no; then + func_warning unable to build only dynamic libraries in this configuration + fi + build_old_libs=no + prefer_static_libs=no + ;; -static) if test -z $pic_flag test -n $link_static_flag; then dlopen_self=$dlopen_self_static Would it be possible to have this kind of functionality included in the official libtool distribution? Regards, Karl-Andre' Skevik Inferno Nettverk A/S