]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
*** empty log message ***
authorGordon Matzigkeit <gord@gnu.ai.mit.edu>
Tue, 12 Aug 1997 15:19:11 +0000 (15:19 +0000)
committerGordon Matzigkeit <gord@gnu.org>
Tue, 12 Aug 1997 15:19:11 +0000 (15:19 +0000)
ChangeLog
NEWS
TODO
libtool.m4
ltconfig.in
ltmain.sh.in

index 92fce9de74321399fdebb6701d0e35adef6cc3cf..4ced02d07a359b1a130f0fb56f24c5e981c68d06 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,28 @@
+Fri Aug  1 10:06:55 1997  Gordon Matzigkeit  <gord@gnu.ai.mit.edu>
+
+       * ltmain.sh.in (link): Add -dlopen and -dlpreopen support for
+       libtool objects.  This means that dlopened modules no longer need
+       to be shared libraries.
+
+       * ltconfig.in (pic_flag): GCC on Irix 6 always builds PIC.
+       Reported by Ian Lance Taylor.
+
+       * libtool.m4 (LD): Always add `-n32' to the linker if we are using
+       GCC on Irix 6.  Reported by Ian Lance Taylor.
+
+Wed Jul 30 13:11:09 1997  Gordon Matzigkeit  <gord@gnu.ai.mit.edu>
+
+       * libtool.m4 (AM_PROG_LIBTOOL): Explicitly check enable_shared and
+       enable_static rather than just enableval.  This allows
+       configure.in scripts to set their own defaults.  Suggested by
+       Tommy Reilly.
+
 Tue Jul 29 11:52:10 1997  Gordon Matzigkeit  <gord@gnu.ai.mit.edu>
 
        * ltmain.sh.in: Add NLS environment variable handling copied from
        ltconfig.in.  Reported by Akim Demaille.
+       (link): If allow_undefined_flag is not supported, then turn on old
+       libraries.  Reported by Akim Demaille.
 
        * demo/dlmain.c (main): Use dld_preloaded_symbol_count to display
        a message about the sortedness of the symbol table.
diff --git a/NEWS b/NEWS
index c6bf3315aa13153d292a7e5d96462485171b652e..ff36ae9f6b124797d5b315835dd3bfb8c7621d86 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,8 @@ New in 1.0b:
   flags.
 * New tests for a BSD-compatible `nm' program, required for dlopened
   modules.
+* Allow configure.in to change the defaults for AM_PROG_LIBTOOL's
+  `--enable-{shared,static}' by setting `enable_{shared,static}=no'.
 \f
 New in 1.0:
 * Bug fixes.
diff --git a/TODO b/TODO
index 9f3299496827e4b4d900d331b0d68dffb82778a1..ca5765509a1ffa7576d6b0f93743ba6b08634669 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,3 +1,28 @@
+* Kenneth Albanowski suggests an `execute' mode, where the paths from
+libtool libraries are extracted and put into shlibpath_var, then a
+command is executed with the wrapped binary as argument.
+
+ KA> And 'libtool --mode=execute java test Java/libJavaPisock.la
+ KA> libsock/libpisock.la' turns into:
+
+ KA> LD_LIBRARY_PATH="libsock/.libs:Java/.libs" java test
+
+I think this is a good idea, but the nonobvious behaviour with libtool
+library arguments should be enabled by a flag, such as -dlopen LIB.
+Maybe -dlpreopen LIB should put these libraries in LD_PRELOAD.
+
+Use *db | *dbx as triggers for this mode.
+
+* Implement full multi-language support.  Currently, this is only for
+C++, but there are beginnings of this in the manual (Other Languages).
+This includes writing libtool not to be so dependent on the compiler
+used to configure it.
+
+We especially need this for C++ linking, for which libtool currently
+does not handle static constructors properly, even on operating
+systems that support them.  ``Don't use static constructors'' is no
+longer a satisfactory answer.
+
 * Another form of convenience library, suggested by Alexandre Oliva,
 is to have undocumented utility libraries, where only the shared
 version is installed.
@@ -13,11 +38,6 @@ probably static.
 * A better check to detect broken collect2 on AIX, once the bug is
 fixed in GCC.
 
-* Implement full multi-language support.  Currently, this is only for
-C++, but there are beginnings of this in the manual (Other Languages).
-This includes writing libtool not to be so dependent on the compiler
-used to configure it.
-
 * Need to finalize the documentation, and give a specification of
 `.la' files so that people can depend on their format.  This also
 needs to be done so that DLD uses a public interface to libtool
index 54b0225cb1163675c482c13d12b20a32538ce96a..3bfc9d13bcc6b779ace2392fa0a1cc7b9def55f5 100644 (file)
@@ -21,7 +21,7 @@
 ## configuration script generated by Autoconf, you may include it under
 ## the same distribution terms that you use for the rest of that program.
 
-# serial 9 AM_PROG_LIBTOOL
+# serial 10 AM_PROG_LIBTOOL
 AC_DEFUN(AM_PROG_LIBTOOL,
 [AC_REQUIRE([AC_CANONICAL_HOST])
 AC_REQUIRE([AC_PROG_RANLIB])
@@ -37,14 +37,24 @@ AC_SUBST(LIBTOOL)
 dnl Allow the --disable-shared flag to stop us from building shared libs.
 AC_ARG_ENABLE(shared,
 [  --enable-shared         build shared libraries [default=yes]],
-test "$enableval" = no && libtool_shared=" --disable-shared",
-libtool_shared=)
+[if test "$enableval" = no; then
+  enable_shared=no
+else
+  enable_shared=yes
+fi])
+libtool_shared=
+test "$enable_shared" = no && libtool_shared=" --disable-shared"
 
 dnl Allow the --disable-static flag to stop us from building static libs.
 AC_ARG_ENABLE(static,
 [  --enable-static         build static libraries [default=yes]],
-test "$enableval" = no && libtool_static=" --disable-static",
-libtool_static=)
+[if test "$enableval" = no; then
+  enable_static=no
+else
+  enable_static=yes
+fi])
+libtool_static=
+test "$enable_static" = no && libtool_static=" --disable-static"
 
 libtool_flags="$libtool_shared$libtool_static"
 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
@@ -55,11 +65,15 @@ test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
 # libtool support.
 [case "$host" in
 *-*-irix6*)
+  ac_save_CFLAGS="$CFLAGS"
+  # -n32 always needs to be added to the linker when using GCC.
+  test "$ac_cv_prog_gcc" = yes && CFLAGS="$CFLAGS -n32"
   for f in '-32' '-64' '-cckr' '-n32' '-mips1' '-mips2' '-mips3' '-mips4'; do
     if echo " $CC $CFLAGS " | egrep -e "[      ]$f[     ]" > /dev/null; then
       LD="${LD-ld} $f"
     fi
   done
+  CFLAGS="$ac_save_CFLAGS"
   ;;
 
 *-*-sco3.2v5*)
index 62c1fabe2b3240c38863026c1bf3db512e88cba2..3149dcc220a58f9183b2773a32e4c86dd47c39a8 100755 (executable)
@@ -398,11 +398,20 @@ link_static_flag=
 no_builtin_flag=
 
 if test "$with_gcc" = yes; then
-  pic_flag='-fPIC'
   profile_flag_pattern='-pg?'
   wl='-Wl,'
   link_static_flag='-static'
   no_builtin_flag=' -fno-builtin'
+
+  case "$host_os" in
+  irix5* | irix6*)
+    # PIC is the default for these OSes.
+    pic_flag=
+    ;;
+  *)
+    pic_flag='-fPIC'
+    ;;
+  esac
 else
   # PORTME Check for PIC flags for the system compiler.
   case "$host_os" in
index 1ce3b3f05a350823d71232f15c443cbf9749e5c7..2b695ad4c8c365d271f2a7c549565244530ac177 100644 (file)
@@ -348,7 +348,7 @@ if test -z "$show_help"; then
         case "$prev" in
         dlfiles|dlprefiles)
           case "$arg" in
-          *.la) ;;  # We handle this case below.
+          *.la | *.lo) ;;  # We handle these cases below.
           *)
             dlprefiles="$dlprefiles $arg"
             test "$prev" = dlfiles && dlfiles="$dlfiles $arg"
@@ -444,7 +444,23 @@ if test -z "$show_help"; then
 
       *.lo)
         # A library object.
-        libobjs="$libobjs $arg"
+       if test "$prev" = dlfiles; then
+         dlfiles="$dlfiles $arg"
+         if test "$build_libtool_libs" = yes; then
+           prev=
+           continue
+         else
+           # If libtool objects are unsupported, then we need to preload.
+           prev=dlprefiles
+         fi
+       fi
+
+       if test "$prev" = dlprefiles; then
+         # Preload the old-style object.
+         dlprefiles="$dlprefiles "`echo "$arg" | sed 's/\.lo$/\.o/'`
+         prev=
+       fi
+       libobjs="$libobjs $arg"
         ;;
 
       *.la)
@@ -806,6 +822,7 @@ if test -z "$show_help"; then
         if test "$allow_undefined_flag" = unsupported; then
           echo "$progname: warning: undefined symbols not allowed in $host shared libraries" 1>&2
           build_libtool_libs=no
+         build_old_libs=yes
         fi
       else
         # Clear the flag.
@@ -964,7 +981,7 @@ if test -z "$show_help"; then
 
       if test "$export_dynamic" = yes && test -n "$global_symbol_pipe" && test -n "$NM"; then
         # Add our own program objects to the preloaded list.
-        dlprefiles=`echo "$objs$libobjs$dlprefiles " | sed -e 's/\.lo /.o/g' -e 's/ $//'`
+        dlprefiles=`echo "$objs$dlprefiles " | sed -e 's/\.lo /.o /g' -e 's/ $//'`
 
         # Discover the nlist of each of the dlfiles.
         dlsyms="$objdir/${output}S.c"