+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
# 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
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: