]> Savannah Git Hosting - gnulib.git/commitdiff
gnulib-tool: Fix link error with 'version-etc' (regression 2020-05-29).
authorBruno Haible <bruno@clisp.org>
Sat, 7 Nov 2020 20:07:04 +0000 (21:07 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 7 Nov 2020 20:07:04 +0000 (21:07 +0100)
Reported by Simon Josefsson in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-11/msg00032.html>.

* gnulib-tool (func_emit_tests_Makefile_am): Add libtests.a to
LDADD a third time, after the second occurrence of ../lib/libgnu.a.
* pygnulib/GLEmiter.py (tests_Makefile_am): Likewise.

ChangeLog
gnulib-tool
pygnulib/GLEmiter.py

index f30e1489b968ae1d97174adf27de4d7eae2a2498..90169c0595208489dfa652df3b80000774337623 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2020-11-07  Bruno Haible  <bruno@clisp.org>
+
+       gnulib-tool: Fix link error with 'version-etc' (regression 2020-05-29).
+       Reported by Simon Josefsson in
+       <https://lists.gnu.org/archive/html/bug-gnulib/2020-11/msg00032.html>.
+       * gnulib-tool (func_emit_tests_Makefile_am): Add libtests.a to
+       LDADD a third time, after the second occurrence of ../lib/libgnu.a.
+       * pygnulib/GLEmiter.py (tests_Makefile_am): Likewise.
+
 2020-11-04  Paul Eggert  <eggert@cs.ucla.edu>
 
        tests: pacify Sun C 5.9
index 1ce9c30894058400695741eab2379e3f7c5bdfa3..8b7e305dd26f53c5c6a2850b6fae154bb31f7aa2 100755 (executable)
@@ -4170,11 +4170,12 @@ func_emit_tests_Makefile_am ()
     # It needs to be passed to the linker before ${libname}.${libext}, since
     # the tests-related modules depend on the main modules.
     # It also needs to be passed to the linker after ${libname}.${libext}
-    # because the latter might contain incomplete modules (such as the 'error'
-    # module whose dependency to 'progname' is voluntarily omitted).
+    # because the latter might contain incomplete modules (such as the
+    # 'version-etc' module whose dependency to 'version-etc-fsf' is voluntarily
+    # omitted).
     # The LIBTESTS_LIBDEPS can be passed to the linker once or twice, it does
     # not matter.
-    echo "LDADD = libtests.a ${testsbase_inverse}/${sourcebase-lib}/${libname}.${libext} libtests.a ${testsbase_inverse}/${sourcebase-lib}/${libname}.${libext} \$(LIBTESTS_LIBDEPS)"
+    echo "LDADD = libtests.a ${testsbase_inverse}/${sourcebase-lib}/${libname}.${libext} libtests.a ${testsbase_inverse}/${sourcebase-lib}/${libname}.${libext} libtests.a \$(LIBTESTS_LIBDEPS)"
   else
     echo "LDADD = ${testsbase_inverse}/${sourcebase-lib}/${libname}.${libext}"
   fi
index 441d2956d8beb1e511ad4f447639ec869c5ead33..107f88cf21615803383db105c10529a9a3cdc14b 100644 (file)
@@ -1125,14 +1125,15 @@ AC_DEFUN([%V1%_LIBSOURCES], [
 
         if libtests:
             # All test programs need to be linked with libtests.a.
-            # It needs to be passed to the linker before ${libname}.${libext}, since
-            # the tests-related modules depend on the main modules.
+            # It needs to be passed to the linker before ${libname}.${libext},
+            # since the tests-related modules depend on the main modules.
             # It also needs to be passed to the linker after ${libname}.${libext}
             # because the latter might contain incomplete modules (such as the
-            # 'error' module whose dependency to 'progname' is voluntarily omitted).
-            # The LIBTESTS_LIBDEPS can be passed to the linker once or twice, it does
-            # not matter.
-            emit += 'LDADD = libtests.a %s/%s/%s.%s libtests.a %s/%s/%s.%s $(LIBTESTS_LIBDEPS)\n\n' % \
+            # 'version-etc' module whose dependency to 'version-etc-fsf' is
+            # voluntarily omitted).
+            # The LIBTESTS_LIBDEPS can be passed to the linker once or twice, it
+            # does not matter.
+            emit += 'LDADD = libtests.a %s/%s/%s.%s libtests.a %s/%s/%s.%s libtests.a $(LIBTESTS_LIBDEPS)\n\n' % \
                 (testsbase_inverse, sourcebase, libname, libext,
                  testsbase_inverse, sourcebase, libname, libext)
         else: