]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* ltmain.in (link mode) < -static-libtool-libs >: New option.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Mon, 20 Mar 2006 20:41:11 +0000 (20:41 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Mon, 20 Mar 2006 20:41:11 +0000 (20:41 +0000)
* doc/libtool.texi (Link mode, Distributing libltdl):
Document it.
Suggested by Gary Kumfert <kumfert@llnl.gov>.

ChangeLog
doc/libtool.texi
ltmain.in

index 12a715bfe9737226f7bebaa8566bca292e2be731..c4f1e9b79db34559d8b556e09f8cf207391cc2d6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-03-20  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       * ltmain.in (link mode) < -static-libtool-libs >: New option.
+       * doc/libtool.texi (Link mode, Distributing libltdl):
+       Document it.
+       Suggested by Gary Kumfert <kumfert@llnl.gov>.
+
 2006-03-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        * libtool.m4 (LT_AC_PROG_SED): Do not forget to reset IFS even
index 663262268707db65b5dc1e418bece24f69753839..d3f330a66cb1e571a86c17eaae114559f053eb39 100644 (file)
@@ -1217,10 +1217,11 @@ If the platform requires versioning, this option has no effect.
 @item -dlopen @var{file}
 Same as @samp{-dlpreopen @var{file}}, if native dlopening is not
 supported on the host platform (@pxref{Dlopened modules}) or if
-the program is linked with @samp{-static} or @samp{-all-static}.
-Otherwise, no effect.  If @var{file} is @code{self} libtool will make
-sure that the program can @code{dlopen} itself, either by enabling
-@code{-export-dynamic} or by falling back to @samp{-dlpreopen self}.
+the program is linked with @samp{-static}, @samp{-static-libtool-libs},
+or @samp{-all-static}.  Otherwise, no effect.  If @var{file} is
+@code{self} libtool will make sure that the program can @code{dlopen}
+itself, either by enabling @code{-export-dynamic} or by falling back to
+@samp{-dlpreopen self}.
 
 @item -dlpreopen @var{file}
 Link @var{file} into the output program, and add its symbols to
@@ -1318,6 +1319,11 @@ If @var{output-file} is a program, then do not link it against any
 uninstalled shared libtool libraries.  If @var{output-file} is a
 library, then only create a static library.
 
+@item -static-libtool-libs
+If @var{output-file} is a program, then do not link it against any
+shared libtool libraries (@samp{.la} files).  If @var{output-file} is a
+library, then only create a static library.
+
 @item -version-info @var{current}[:@var{revision}[:@var{age}]]
 If @var{output-file} is a libtool library, use interface version
 information @var{current}, @var{revision}, and @var{age} to build it
@@ -3592,9 +3598,10 @@ You should probably also add @samp{AC_LIBTOOL_DLOPEN} to your
 libtool will assume no dlopening mechanism is supported, and revert to
 dlpreopening, which is probably not what you want.
 
-Avoid using the @code{-static} or @code{-all-static} switches when
-linking programs with libltdl.  This will not work on all platforms,
-because the dlopening functions may not be available for static linking.
+Avoid using the @code{-static}, @code{-static-libtool-libs} or
+@code{-all-static} switches when linking programs with libltdl.  This
+will not work on all platforms, because the dlopening functions may not
+be available for static linking.
 
 The following example shows you how to embed the convenience libltdl in
 your package.  In order to use the installable variant just replace
index cff4a70bc68709c18d4213ffaa704d817e03631c..16f7ed2268ce0b658bf35b6e990012666edad501 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -1165,8 +1165,9 @@ EOF
     for arg
     do
       case $arg in
-      -all-static | -static)
-       if test "X$arg" = "X-all-static"; then
+      -all-static | -static | -static-libtool-libs)
+       case $arg in
+       -all-static)
          if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
            $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
          fi
@@ -1174,12 +1175,20 @@ EOF
            dlopen_self=$dlopen_self_static
          fi
          prefer_static_libs=yes
-       else
+         ;;
+       -static)
          if test -z "$pic_flag" && test -n "$link_static_flag"; then
            dlopen_self=$dlopen_self_static
          fi
          prefer_static_libs=built
-       fi
+         ;;
+       -static-libtool-libs)
+         if test -z "$pic_flag" && test -n "$link_static_flag"; then
+           dlopen_self=$dlopen_self_static
+         fi
+         prefer_static_libs=yes
+         ;;
+       esac
        build_libtool_libs=no
        build_old_libs=yes
        break
@@ -1739,7 +1748,7 @@ EOF
        continue
        ;;
 
-      -static)
+      -static | -static-libtool-libs)
        # The effects of -static are defined in a previous loop.
        # We used to do the same as -all-static on platforms that
        # didn't have a PIC flag, but the assumption that the effects
@@ -6817,9 +6826,9 @@ The following components of LINK-COMMAND are treated specially:
   -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
   -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
   -export-symbols SYMFILE
-                   try to export only the symbols listed in SYMFILE
+                    try to export only the symbols listed in SYMFILE
   -export-symbols-regex REGEX
-                   try to export only the symbols matching REGEX
+                    try to export only the symbols matching REGEX
   -LLIBDIR          search LIBDIR for required installed libraries
   -lNAME            OUTPUT-FILE requires the installed library libNAME
   -module           build a library that can dlopened
@@ -6833,9 +6842,11 @@ The following components of LINK-COMMAND are treated specially:
   -release RELEASE  specify package release information
   -rpath LIBDIR     the created library will eventually be installed in LIBDIR
   -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
-  -static           do not do any dynamic linking of libtool libraries
+  -static           do not do any dynamic linking of uninstalled libtool libraries
+  -static-libtool-libs
+                    do not do any dynamic linking of libtool libraries
   -version-info CURRENT[:REVISION[:AGE]]
-                   specify library version info [each variable defaults to 0]
+                    specify library version info [each variable defaults to 0]
 
 All other options (arguments beginning with \`-') are ignored.