libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Dropping dependencies of a -no-undefined library


From: Alexandre Oliva
Subject: Dropping dependencies of a -no-undefined library
Date: 03 Mar 2001 18:50:32 -0300
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley)

We shouldn't attempt to build a shared library in case we drop
dependencies.  It will either fail or build an incomplete library.
Here's a patch that fixes this.  Ok to install?

Index: ChangeLog
from  Alexandre Oliva  <address@hidden>

        * ltmain.in: When dropping dependencies of a -no-undefined
        library, give up on building a shared library.

Index: ltmain.in
===================================================================
RCS file: /cvsroot/libtool/libtool/ltmain.in,v
retrieving revision 1.243
diff -u -p -r1.243 ltmain.in
--- ltmain.in 2000/12/20 22:40:59 1.243
+++ ltmain.in 2001/03/03 21:47:27
@@ -1,7 +1,8 @@
 # ltmain.sh - Provide generalized library-building support services.
 # NOTE: Changing this file will not affect anything until you rerun ltconfig.
 #
-# Copyright (C) 1996-2000 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
 # Originally by Gordon Matzigkeit <address@hidden>, 1996
 #
 # This program is free software; you can redistribute it and/or modify
@@ -2611,6 +2612,21 @@ EOF
            echo "*** The inter-library dependencies that have been dropped 
here will be"
            echo "*** automatically added whenever a program is linked with 
this library"
            echo "*** or is declared to -dlopen it."
+
+           if test $allow_undefined = no; then
+             echo
+             echo "*** Since this library must not contain undefined symbols,"
+             echo "*** because either the platform does not support them or"
+             echo "*** it was explicitly requested with -no-undefined,"
+             echo "*** libtool will only create a static version of it."
+             if test "$build_old_libs" = no; then
+               oldlibs="$output_objdir/$libname.$libext"
+               build_libtool_libs=module
+               build_old_libs=yes
+             else
+               build_libtool_libs=no
+             fi
+           fi
          fi
        fi
        # Done checking deplibs!
-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  address@hidden, redhat.com}
CS PhD student at IC-Unicamp        address@hidden, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

reply via email to

[Prev in Thread] Current Thread [Next in Thread]