]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
*** empty log message ***
authorGordon Matzigkeit <gord@gnu.ai.mit.edu>
Wed, 11 Jun 1997 17:13:23 +0000 (17:13 +0000)
committerGordon Matzigkeit <gord@gnu.org>
Wed, 11 Jun 1997 17:13:23 +0000 (17:13 +0000)
ChangeLog
Makefile.am
NEWS
TODO
doc/libtool.texi
doc/platforms.texi
ltmain.sh.in

index baee154afa36574357a46a8a95622e3c3147ad63..10b3511ea1cb06c6982284ba0248977fe9e592d5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+Wed Jun 11 11:04:59 1997  Gordon Matzigkeit  <gord@gnu.ai.mit.edu>
+
+       * Makefile.am (ltconfig, ltmain.sh): Only move if $(srcdir) is not
+       the current directory.  Reported by Tom Tromey.
+
+Tue Jun 10 12:26:00 1997  Gordon Matzigkeit  <gord@gnu.ai.mit.edu>
+
+       * Makefile.am (ltconfig, ltmain.sh): Be sure to move these files
+       into $(srcdir) once they are created.
+
+       * ltmain.sh.in (link): Disable building static libraries.
+       People should use their favourite AR and RANLIB commands.
+       Disable building old-style objects if `--disable-static' is
+       given.  Suggested by Tom Lees and Stephen Kulow.
+
 Sun Jun  8 12:10:14 1997  Gordon Matzigkeit  <gord@gnu.ai.mit.edu>
 
        * ltconfig.in (host_cpu, host_vendor, host_os): Patch up
index b3ee93fbd68c986512e128fe755e08ecf3f9f40f..ca2a6584a51d7392283cf8cac78217b046b391ec 100644 (file)
@@ -44,9 +44,11 @@ libtoolize: libtoolize.in $(top_builddir)/config.status
 $(srcdir)/ltconfig: ltconfig.in $(top_builddir)/config.status
        CONFIG_FILES=ltconfig CONFIG_HEADERS= $(top_builddir)/config.status
        chmod +x ltconfig
+       mv ltconfig $(srcdir)/ltconfig
 
 $(srcdir)/ltmain.sh: ltmain.sh.in $(top_builddir)/config.status
        CONFIG_FILES=ltmain.sh CONFIG_HEADERS= $(top_builddir)/config.status
+       mv ltmain.sh $(srcdir)/ltmain.sh
 
 # Distribute the demo subdirectory.
 dist-hook: $(demo_distfiles)
diff --git a/NEWS b/NEWS
index 93bc434f622e573c2c16ae60165a8216ac0ceb75..36662eec91d69c0a05071a717082818829f0598e 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,7 @@ New in 0.9g:
   libraries on platforms that have shared libs.
 * New `-allow-undefined' link flag to build shared libs that contain
   references to unresolved symbols.
+* Removed all support for creating static-only libraries.
 * Basic support for dynamically loaded modules: new `-export-dynamic'
   linking flag and corresponding `dlname' mode.
 * New `--features' flag to display configured libtool attributes.
diff --git a/TODO b/TODO
index cfee6c636485dc41d920079b8e40135b6440c49b..9ca6954f0d0c1049d7ebe269d4a636d38bab641c 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,7 +1,3 @@
-* For 1.0: disable building old-style objects if --disable-static is
-given.  Update all documentation accordingly.  Suggested by Tom Lees
-and Stephen Kulow.
-
 * A better check to detect broken collect2 on AIX, once the bug is
 fixed in GCC.
 
index e41071a5be7cf519b03bb80ad9ac0ddc6904bd6a..1e31f60d49f67a468ad42012dc3f40f3fae05b5a 100644 (file)
@@ -321,8 +321,8 @@ compatibility.
 
 @item
 The install @file{Makefile} target should warn the package installer to set
-@var{LD_LIBRARY_PATH} (or equivalent) or run @code{ldconfig(8)}, if
-required.
+the proper environment variables (@var{LD_LIBRARY_PATH} or equivalent),
+or run @code{ldconfig(8)}.
 @end enumerate
 
 @node Other implementations
@@ -341,11 +341,11 @@ have been more or less abandoned as influences.
 @section A postmortem analysis of other implementations
 
 @cindex Other implementations, flaws in
-@cindex Reuseability of library systems
+@cindex Reusability of library systems
 In all fairness, each of the implementations that I examined do the job
 that they were intended to do, for a number of different host systems.
 However, none of these solutions seem to function well as a generalized,
-reuseable component.
+reusable component.
 
 @cindex Complexity of library systems
 Most were too complex for me to use (much less modify) without
@@ -414,7 +414,7 @@ A NetBSD/i386 1.2 platform with shared libraries.
 @end table
 
 You can follow these examples on your own platform, using the
-pre-configured libtool script that was installed with libtool
+preconfigured libtool script that was installed with libtool
 (@pxref{Configuring}).
 
 Source files for the following examples are taken from the @file{demo}
@@ -476,7 +476,7 @@ burger$
 Shared libraries, however, may only be built from
 @dfn{position-independent code} (PIC).  So, special flags must be passed
 to the compiler to tell it to generate PIC rather than the standard
-position-dependant code.
+position-dependent code.
 
 @cindex Library object file
 @cindex @samp{.lo} files
@@ -840,38 +840,17 @@ burger#
 
 @cindex Static linking
 @cindex Convenience libraries
-Sometimes it is desirable to create a static archive that can never be
-shared.  The most frequent case is when you have a ``convenience
-library'' that is a collection of related object files without a really
-nice interface.
-
-@c FIXME: we should update this section
 Why return to @code{ar} and @code{ranlib} silliness when you've had a
-taste of libtool?  libtool works consistently with standard object
-files, static libraries, and programs created without libtool's help.
-
-So, to create a static library:
-
-@enumerate 1
-@item
-Compile the object files with or without libtool.  It doesn't matter
-whether these objects are PIC (end with the @samp{.lo} suffix) or not.
-
-@item
-Link the files in the same way you would a libtool library, but use a
-@samp{.a} suffix (instead of @samp{.la}):
+taste of libtool?  Well, sometimes it is desirable to create a static
+archive that can never be shared.  The most frequent case is when you
+have a ``convenience library'' that is a collection of related object
+files without a really nice interface.
 
-@example
-burger$ @kbd{libtool gcc -o libhello.a main.o foo.lo hello.lo -lm}
-rm -f libhello.a
-ar cru libhello.a main.o foo.o hello.o
-ranlib libhello.a
-burger$
-@end example
+To do this, you should ignore libtool entirely, and just use the old
+@code{ar} and @code{ranlib} commands to create a static library.
 
-@item
 If you want to install the library (but you probably don't), then you
-can use libtool to do it, too:
+may use libtool if you want:
 
 @example
 burger$ @kbd{libtool ./install-sh -c libhello.a /local/lib/libhello.a}
@@ -879,7 +858,10 @@ burger$ @kbd{libtool ./install-sh -c libhello.a /local/lib/libhello.a}
 ranlib /local/lib/libhello.a
 burger$
 @end example
-@end enumerate
+
+Using libtool for static library installation protects your library from
+being accidentally stripped (if the installer used the @samp{-s} flag),
+as well as automatically running the correct @code{ranlib} command.
 
 @cindex Standalone binaries
 Another common situation where static linking is desirable is in
@@ -1098,7 +1080,7 @@ This mode deletes installed libraries (and other files).
 The first @var{mode-arg} is the name of the program to use to delete
 files (typically @file{/bin/rm}).
 
-The remaning @var{mode-args} are either flags for the deletion program
+The remaining @var{mode-args} are either flags for the deletion program
 (beginning with a `-'), or the names of files to delete.
 
 @node Integrating libtool
@@ -1120,8 +1102,8 @@ that your users can install hassle-free shared libraries.
 @cindex Makefile.am
 @cindex Makefile.in
 
-Libtool is fully integrated with Automake (@pxref{Top,,, automake, The
-Automake Manual}), starting with Automake version 1.2.
+Libtool is fully integrated with Automake (@pxref{Top,, Introduction,
+automake, The Automake Manual}), starting with Automake version 1.2.
 
 If you want to use libtool in a regular @file{Makefile} (or
 @file{Makefile.in}), you are on your own.  If you're not using Automake
@@ -1892,7 +1874,7 @@ the term is used to refer to two different concepts:
 @item
 Compiling and linking a program against a shared library, which is
 resolved automatically at run time by the dynamic linker.  In this
-process, dynamic linking is transparant to the application.
+process, dynamic linking is transparent to the application.
 
 @item
 The application calling functions such as
@@ -1915,8 +1897,8 @@ On most operating systems, dlopened modules must be compiled as PIC.
 This restriction simplifies the implementation of the @code{dlopen(3)}
 family of functions by avoiding symbol relocation.  ``True'' dlopen
 implementations, such as the unportable GNU DLD 3 implementation
-(@pxref{Top,,, dld, The DLD Manual}), don't have this restriction, as
-they can perform relocation at runtime.
+(@pxref{Top,, Introduction, dld, The DLD Manual}), don't have this
+restriction, as they can perform relocation at runtime.
 
 As of version @value{VERSION}, libtool provides only minimal support for
 dlopened modules, and this support is guaranteed to change and be
@@ -2234,7 +2216,7 @@ behaviour you think is a problem is not already mentioned as a feature.
 
 Then, you should read the Emacs guide to reporting bugs (@pxref{Bugs, ,
 Reporting Bugs, emacs, The Emacs Manual}).  Some of the details
-listed there are specific to Emacs, but the priciple behind them is a
+listed there are specific to Emacs, but the principle behind them is a
 general one.
 
 Finally, send a bug report to @value{BUGADDR} with any appropriate
index 1b21ba9da40e105d0002b93ea14ca4cc8cd76fad..baf3af914384c56ea7c8355d3e7092253f64bb9a 100644 (file)
@@ -12,18 +12,18 @@ hppa1.1-hp-hpux9.05          gcc       0.8       ok
 hppa1.1-hp-hpux10.10         cc        0.8       ok
 i386-unknown-freebsd2.1.5    gcc       0.5       ok
 i386-unknown-gnu0.0          gcc       0.5       ok
-i386-unknown-netbsd1.2       gcc       0.9f      ok
-i586-unknown-linux1.3.20     gcc       0.9       ok
-i586-unknown-linux2.0.16     gcc       0.9f      ok
+i386-unknown-netbsd1.2       gcc       0.9g      ok
+i586-pc-linux-gnu1.3.20      gcc       0.9       ok
+i586-pc-linux-gnu2.0.16      gcc       0.9g      ok
 mips-sgi-irix5.3             cc        0.8       ok
 mips-sgi-irix5.3             gcc       0.8       ok
 mips-sgi-irix6.2             cc -32    0.9       ok
 mips-sgi-irix6.2             cc -n32   0.9       ok
-powerpc-ibm-aix4.1.4.0       xlc       0.9d      ok
-powerpc-ibm-aix4.1.4.0       gcc       0.9a      ok
+powerpc-ibm-aix4.1.4.0       xlc       0.9g      ok
+powerpc-ibm-aix4.1.4.0       gcc       0.9g      ok
 rs6000-ibm-aix3.2.5          xlc       0.9e      ok
 rs6000-ibm-aix3.2.5          gcc       0.9e      ok*
-rs6000-ibm-aix4.1.4.0        xlc       0.9f      ok
+rs6000-ibm-aix4.1.4.0        xlc       0.9g      ok
 rs6000-ibm-aix4.1.4.0        gcc       0.9e      ok
 sparc-sun-linux2.1.23        gcc       0.9       ok
 sparc-sun-sunos4.1.3_U1      cc        0.9       ok
@@ -31,7 +31,7 @@ sparc-sun-sunos4.1.3_U1      gcc       0.9       ok
 sparc-sun-solaris2.4         cc        0.9       ok
 sparc-sun-solaris2.4         gcc       0.9       ok
 sparc-sun-solaris2.5         cc        0.9       ok
-sparc-sun-solaris2.5         gcc       0.9f      ok
+sparc-sun-solaris2.5         gcc       0.9g      ok
 --------------------------------------------------------
 
 * Libtool will not build shared libraries because of a bug in
index 4c8b5b127ed90a30bd81b98947f7ea78b4e240c0..bf01ee68c5cb56c9a838d5ded6e8705a556e1acc 100644 (file)
@@ -229,9 +229,14 @@ if test -z "$show_help"; then
       exit 1
     fi
 
-    # Delete any old library objects.
-    $run $rm $obj $libobj
-    trap "$run $rm $obj $libobj; exit 1" 1 2 15
+    # Delete any leftover library objects.
+    if test "$build_old_libs" = yes; then
+      $run $rm $obj $libobj
+      trap "$run $rm $obj $libobj; exit 1" 1 2 15
+    else
+      $run $rm $libobj
+      trap "$run $rm $libobj; exit 1" 1 2 15
+    fi
 
     # Only build a PIC object if we are building libtool libraries.
     if test "$build_libtool_libs" = yes; then
@@ -239,7 +244,7 @@ if test -z "$show_help"; then
       $show "$base_compile$pic_flag -DPIC $srcfile"
       if eval "$run $base_compile$pic_flag -DPIC $srcfile"; then :
       else
-       $run $rm $obj
+       test -n "$obj" && $run $rm $obj
        exit 1
       fi
 
@@ -255,16 +260,18 @@ if test -z "$show_help"; then
       $run $mv $obj $libobj || exit 1
     fi
 
-    # Compile the position-dependent object.
-    $show "$base_compile $srcfile"
-    if eval "$run $base_compile $srcfile"; then :
-    else
-      $run $rm $obj $libobj
-      exit 1
+    # Only build a position-dependent object if we build old libraries.
+    if test "$build_old_libs" = yes; then
+      $show "$base_compile $srcfile"
+      if eval "$run $base_compile $srcfile"; then :
+      else
+        $run $rm $obj $libobj
+        exit 1
+      fi
     fi
 
-    # Create an invalid object file if no PIC, so that we don't accidentally
-    # link it.
+    # Create an invalid libtool object if no PIC, so that we don't accidentally
+    # link it into a program.
     if test "$build_libtool_libs" != yes; then
       $show "echo timestamp > $libobj"
       eval "$run echo timestamp > $libobj" || exit $?
@@ -534,7 +541,11 @@ if test -z "$show_help"; then
          fi
         else
           # Transform directly to old archives if we don't build new libraries.
-         test -z "$old_library" || linklib="$old_library"
+          if test -n "$pic_flag" && test -z "$old_library"; then
+            echo "$progname: cannot find static library for \`$arg'" 1>&2
+           exit 1
+         fi
+         test -n "$old_library" && linklib="$old_library"
           compile_command="$compile_command $dir/$linklib"
          finalize_command="$finalize_command $dir/$linklib"
         fi
@@ -578,20 +589,6 @@ if test -z "$show_help"; then
       exit 1
       ;;
 
-    *.a)
-      # Old archive.
-      libname=`echo "$output" | sed 's/\.a$//'`
-      build_old_libs=yes
-
-      if test -n "$install_libdir"; then
-        echo "$progname: warning: \`-rpath' is ignored while linking old-style libraries" 1>&2
-      fi
-
-      if test -n "$vinfo"; then
-       echo "$progname: warning: \`-version-info' is ignored while linking old-style libraries" 1>&2
-      fi
-      ;;
-
     *.la)
       libname=`echo "$output" | sed 's/\.la$//'`
 
@@ -1032,10 +1029,7 @@ EOF
     # See if we need to build an old-fashioned archive.
     if test "$build_old_libs" = "yes"; then
       # Now set the variables for building old libraries.
-      case "$output" in
-      *.a) oldlib="$output" ;;
-      *) oldlib="$objdir/$libname.a" ;;
-      esac
+      oldlib="$objdir/$libname.a"
 
       # Transform .lo files to .o files.
       oldobjs="$objs"`echo "$libobjs " | sed 's/[^     ]*\.a //g; s/\.lo /.o /g; s/ $//g'`