]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
*** empty log message ***
authorGordon Matzigkeit <gord@gnu.ai.mit.edu>
Thu, 5 Jun 1997 16:50:29 +0000 (16:50 +0000)
committerGordon Matzigkeit <gord@gnu.org>
Thu, 5 Jun 1997 16:50:29 +0000 (16:50 +0000)
ChangeLog
libtool.m4
ltconfig.in
ltmain.sh.in

index fe42bc2d19c88599e6525281935813932200c05d..692c4c498429cd2304982f235767030f432c4207 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+Thu Jun  5 10:40:15 1997  Gordon Matzigkeit  <gord@gnu.ai.mit.edu>
+
+       * ltconfig.in (allow_undefined_flag): New variable that implements
+       `-allow-undefined'.
+
+       * ltmain.sh.in (link): Accept new `-allow-undefined' flag when
+       building libtool libraries.  This tells libtool to allow
+       unresolved symbols to exist in shared libraries.  Basically, this
+       turns off shared libraries on AIX.  Suggested by Ian Lance Taylor.
+
+Mon May 26 08:24:55 1997  Gordon Matzigkeit  <gord@gnu.ai.mit.edu>
+
+       * libtool.m4 (LD): On at least IRIX, many different flags need to
+       be propagated to the linker if they are part of the compiler
+       command line.  Reported by Anthony Green.
+
 Sat May 10 12:21:58 1997  Gordon Matzigkeit  <gord@gnu.ai.mit.edu>
 
        * ltconfig.in: Trivial port to FreeBSD 3.  From David Nugent.
index 9f47df63b6c6cd1c4c4a7c00b55f180b654a170e..abe14a7d3da49e0d057fe4a3549287f30b000518 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 5 AM_PROG_LIBTOOL
+# serial 6 AM_PROG_LIBTOOL
 AC_DEFUN(AM_PROG_LIBTOOL,
 [AC_REQUIRE([AC_CANONICAL_HOST])
 AC_REQUIRE([AC_PROG_CC])
@@ -47,12 +47,15 @@ libtool_flags="$libtool_shared$libtool_static"
 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
 
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
 [case "$host" in
 *-*-irix6*)
-  # For IRIX 6, ld needs -n32 if cc uses it.
-  if echo " $CC $CFLAGS " | egrep -e '[        ]-n32[   ]' > /dev/null; then
-    LD="${LD-ld} -n32"
-  fi
+  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
   ;;
 
 *-*-sco3.2v5*)
index 01d5b7fc155b79525df8f4be93273010c3e11592..4e3a4ab2b50a871d0fecfc3085c5e6ff52bd9703 100755 (executable)
@@ -514,6 +514,7 @@ echo $ac_t "$with_gnu_ld" 1>&6
 # See if the linker supports building shared libraries.
 echo $ac_n "checking if $linker supports shared libraries... $ac_c" 1>&6
 
+allow_undefined_flag=
 archive_cmds=
 export_dynamic_flag=
 hardcode_libdir_flag_spec=
@@ -555,6 +556,7 @@ else
   # PORTME fill in a description of your system's linker (not GNU ld)
   case "$host_os" in
   aix3*)
+    allow_undefined_flag=unsupported
     archive_cmds='/usr/ucb/nm$libobjs | egrep \" [BD] \" | sed \"s/^.* //\" > $lib.exp;$LD -o $objdir/$soname$libobjs -bE:$lib.exp -T512 -H512 -bM:SRE -lc$deplibs;$AR cru $lib $objdir/$soname'
     # Note: this linker hardcodes the directories in LIBPATH if there
     # are no directories specified by -L.
@@ -562,6 +564,7 @@ else
     ;;
 
   aix4*)
+    allow_undefined_flag=unsupported
     archive_cmds='/bin/nm -B$libobjs | egrep \" [BD] \" | sed \"s/^.* //\" > $lib.exp;$cc -o $objdir/$soname$libobjs ${wl}-bE:$lib.exp ${wl}-bM:SRE ${wl}-bnoentry$deplibs;$AR cru $lib $objdir/$soname'
     hardcode_direct=yes
     hardcode_minus_L=yes
@@ -609,7 +612,8 @@ else
     ;;
 
   osf3* | osf4*)
-    archive_cmds='$LD -shared -o $lib -soname $soname -set_version $verstring$libobjs -lc$deplibs'
+    allow_undefined_flag=' -expect_unresolved'
+    archive_cmds='$LD -shared${allow_undefined_flag} -o $lib -soname $soname -set_version $verstring$libobjs -lc$deplibs'
     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
     hardcode_libdir_separator=:
     ;;
@@ -912,6 +916,9 @@ old_postinstall_cmds='$old_postinstall_cmds'
 archive_cmds='$archive_cmds'
 postinstall_cmds='$postinstall_cmds'
 
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag='$allow_undefined_flag'
+
 # Commands used to finish a libtool library installation in a directory.
 finish_cmds='$finish_cmds'
 
index de1a350caa80991a9d2cdf92bbb906d8a56770a0..55b3ff0e61611a519f630dde0861868248e903b1 100644 (file)
@@ -279,6 +279,7 @@ if test -z "$show_help"; then
     # Go through the arguments, transforming them on the way.
     cc="$nonopt"
     args="$cc"
+    allow_undefined=no
     compile_command="$cc"
     finalize_command="$cc"
     compile_shlibpath=
@@ -325,6 +326,8 @@ if test -z "$show_help"; then
       prevarg="$arg"
 
       case "$arg" in
+      -allow-undefined) allow_undefined=yes ;;
+
       -export-dynamic)
        export_dynamic=yes
        compile_command="$compile_command $export_dynamic_flag"
@@ -716,6 +719,17 @@ if test -z "$show_help"; then
        $run $mkdir $objdir || exit $?
       fi
 
+      # Check to see if the archive will have undefined symbols.
+      if test "$allow_undefined" = yes; then
+       if "$allow_undefined_flag" = unsupported; then
+         echo "$progname: warning: undefined symbols not allowed in $host shared libraries" 1>&2
+         build_libtool_libs=no
+       fi
+      else
+       # Clear the flag.
+       allow_undefined_flag=
+      fi
+
       if test "$build_libtool_libs" = yes; then
        # Get the real and link names of the library.
        library_names=`eval echo \"$library_names_spec\"`
@@ -1644,6 +1658,7 @@ a program from several object files.
 
 The following components of LINK-COMMAND are treated specially:
 
+  -allow-undefined  allow a libtool library to reference undefined symbols
   -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
   -LLIBDIR          search LIBDIR for required installed libraries
   -lNAME            OUTPUT-FILE requires the installed library libNAME