libtool-patches
[Top][All Lists]
Advanced

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

Re: Two small libltdl patches.


From: Ralf Wildenhues
Subject: Re: Two small libltdl patches.
Date: Tue, 26 Aug 2008 11:59:54 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Hi Peter,

* Peter O'Gorman wrote on Sat, Aug 23, 2008 at 11:59:00PM CEST:
> 
> On systems without argz we were exporting unmangled symbols argz_count
> and argz_add from libltdl. Not really a good idea. Rather than mangle
> the names, since we do not use either function, they were removed.

> Subject: [PATCH] Remove unnecessary global argz functions.
> 
> * libltdl/argz.c (argz_add,argz_count): Remove.

* Peter O'Gorman wrote on Mon, Aug 25, 2008 at 04:43:57AM CEST:
> 
> I just went back and re-read the argz threads on bug-libtool. The two
> functions were added back in February, the June thread then decided that
> libtool could keep its own argz and only have the functions it needs,
> while gnulib's could "evolve along glibc's".

ACK.

> Now that I look at the patch again, I see that I forgot to remove the
> functions from argz_.h :)
> 
> So, with the functions also removed from the header, ok?

Yes, certainly.  I think a NEWS entry would be good, too, as well as
a test so we don't regress again.  What do you think of this?  You
can squash it into your patch when you commit.

The test doesn't work on many systems (only those that need argz.c,
and only those without leading underscore in symbol names) and skips
resp. doesn't expose a failure elsewhere, but I think that should be
sufficient.

Thanks,
Ralf

        * NEWS: Update.
        * tests/ltdl-api.at: New file.
        * Makefile.am: Adjust.

diff --git a/NEWS b/NEWS
index e0d1062..c85f741 100644
--- a/NEWS
+++ b/NEWS
@@ -21,6 +21,9 @@ New in 2.2.??: 2008-08-??: git version 2.2.5a, Libtool team:
 
   - Several testsuite issues have been fixed, thanks to user feedback.
 
+  - Fix 2.2 regression that caused argz symbols to be exported from
+    libltdl unrenamed on systems that do not have working argz.
+
 New in 2.2.4: 2008-05-04: git version 2.2.3a, Libtool team:
 
 * New features:
diff --git a/Makefile.am b/Makefile.am
index 0085c7f..1417e84 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -454,6 +454,7 @@ TESTSUITE_AT        = tests/testsuite.at \
                  tests/am-subdir.at \
                  tests/lt_dlexit.at \
                  tests/lt_dladvise.at \
+                 tests/ltdl-api.at \
                  tests/need_lib_prefix.at \
                  tests/standalone.at \
                  tests/subproject.at \
diff --git a/tests/ltdl-api.at b/tests/ltdl-api.at
new file mode 100644
index 0000000..b811ae3
--- /dev/null
+++ b/tests/ltdl-api.at
@@ -0,0 +1,36 @@
+# ltdl-api.at -- test libltdl API                -*- Autotest -*-
+#
+#   Copyright (C) 2008 Free Software Foundation, Inc.
+#   Written by Ralf Wildenhues, 2008.
+#
+#   This file is part of GNU Libtool.
+#
+# GNU Libtool is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# GNU Libtool is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING.  If not, a copy
+# can be downloaded from  http://www.gnu.org/licenses/gpl.html,
+# or obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+####
+
+AT_SETUP([ltdl API])
+AT_KEYWORDS([libltdl])
+
+# Ensure that no symbols from argz are unrenamed.
+eval `$LIBTOOL --config | $EGREP '^(NM|global_symbol_pipe|objext)='`
+argz_o=$abs_top_builddir/libltdl/argz.$objext
+AT_CHECK([test -f "$argz_o" || exit 77])
+AT_CHECK([eval "$NM \"\$argz_o\" | $global_symbol_pipe"],
+        [], [stdout], [ignore])
+AT_CHECK([grep "^T argz_" stdout], [1])
+
+AT_CLEANUP




reply via email to

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