mirror of
git://git.savannah.gnu.org/libtool.git
synced 2024-11-27 06:09:57 +08:00
Fix several test failures on Cygwin and MinGW.
* tests/nonrecursive.at: Use -no-undefined for foo.la. * tests/recursive.at: Likewise. * tests/subproject.at: Likewise. * tests/lt_dladvise.at: For systems where undefined symbols are not allowed, to not try to load the module libdepend. [ mingw ]: Add to list of such systems. * tests/testsuite.at (_LT_AT_TRANSLATE_TEXT_OUTPUT): New macro, to translate line ending of expout and experr files suitable for host executables. (LT_AT_CHECK, LT_AT_NOINST_EXEC_CHECK): Use it. Report by Bob Friesenhahn.
This commit is contained in:
parent
d84baeaee5
commit
1b8b9e3e5e
13
ChangeLog
13
ChangeLog
@ -1,5 +1,18 @@
|
||||
2008-03-08 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
Fix several test failures on Cygwin and MinGW.
|
||||
* tests/nonrecursive.at: Use -no-undefined for foo.la.
|
||||
* tests/recursive.at: Likewise.
|
||||
* tests/subproject.at: Likewise.
|
||||
* tests/lt_dladvise.at: For systems where undefined symbols are
|
||||
not allowed, to not try to load the module libdepend.
|
||||
[ mingw ]: Add to list of such systems.
|
||||
* tests/testsuite.at (_LT_AT_TRANSLATE_TEXT_OUTPUT): New macro,
|
||||
to translate line ending of expout and experr files suitable for
|
||||
host executables.
|
||||
(LT_AT_CHECK, LT_AT_NOINST_EXEC_CHECK): Use it.
|
||||
Report by Bob Friesenhahn.
|
||||
|
||||
Fix installcheck dependencies, fix for --program-transform-name.
|
||||
* Makefile.am (installcheck-local): Depend upon tests/atconfig
|
||||
and $(srcdir)/$(TESTSUITE).
|
||||
|
@ -173,8 +173,9 @@ hint_global (void)
|
||||
printf ("global: %d\n", moduletest (handle, "f", "i"));
|
||||
|
||||
/* Don't attempt to load moddepend unless modglobal was successfully
|
||||
loaded and the symglobal hint was taken. */
|
||||
if (info && info->is_symglobal)
|
||||
loaded and the symglobal hint was taken, and the system allows to
|
||||
to have undefined symbols. */
|
||||
if (info && info->is_symglobal && HAVE_UNDEFINED_SYMBOLS)
|
||||
{
|
||||
hint_ext ();
|
||||
}
|
||||
@ -285,10 +286,12 @@ dlopenable='resident local global'
|
||||
# ------------------------------------------------------------------------- #
|
||||
|
||||
case $host_os in
|
||||
cygwin*)
|
||||
cygwin* | mingw*)
|
||||
# These hosts do not support linking without -no-undefined
|
||||
CPPFLAGS="$CPPFLAGS -DHAVE_UNDEFINED_SYMBOLS=0"
|
||||
;;
|
||||
*)
|
||||
CPPFLAGS="$CPPFLAGS -DHAVE_UNDEFINED_SYMBOLS=1"
|
||||
dlopenable="$dlopen depend"
|
||||
$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c moddepend.c
|
||||
AT_CHECK([$LIBTOOL --mode=link $CC -module $CFLAGS $LDFLAGS -o libdepend.la \
|
||||
@ -317,8 +320,8 @@ for dlopen in -dlopen; do
|
||||
modules="${modules+$modules }$dlopen lib$module.la"
|
||||
done
|
||||
|
||||
AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT \
|
||||
$modules $LIBLTDL], [], [ignore], [ignore])
|
||||
AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT $modules $LIBLTDL],
|
||||
[], [ignore], [ignore])
|
||||
LT_AT_NOINST_EXEC_CHECK([./main], [$modules], [], [expout], [])
|
||||
done
|
||||
|
||||
|
@ -64,7 +64,7 @@ MOSTLYCLEANFILES =
|
||||
|
||||
include ltdl/Makefile.inc
|
||||
|
||||
foo_la_LDFLAGS = -module -avoid-version
|
||||
foo_la_LDFLAGS = -module -avoid-version -no-undefined
|
||||
foo_la_SOURCES = foo.c
|
||||
]])
|
||||
|
||||
|
@ -46,7 +46,7 @@ AT_DATA([Makefile.am],
|
||||
AUTOMAKE_OPTIONS = 1.7
|
||||
SUBDIRS = ltdl
|
||||
lib_LTLIBRARIES = foo.la
|
||||
foo_la_LDFLAGS = -module -avoid-version
|
||||
foo_la_LDFLAGS = -module -avoid-version -no-undefined
|
||||
foo_la_SOURCES = foo.c
|
||||
]])
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# subproject.at -- test subproject Libltdl builds -*- Autotest -*-
|
||||
#
|
||||
# Copyright (C) 2005 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2005, 2008 Free Software Foundation, Inc.
|
||||
# Written by Gary V. Vaughan, 2005
|
||||
#
|
||||
# This file is part of GNU Libtool.
|
||||
@ -44,7 +44,7 @@ AT_DATA([Makefile.am],
|
||||
AUTOMAKE_OPTIONS = 1.9
|
||||
SUBDIRS = sub/ltdl
|
||||
lib_LTLIBRARIES = foo.la
|
||||
foo_la_LDFLAGS = -module -avoid-version
|
||||
foo_la_LDFLAGS = -module -avoid-version -no-undefined
|
||||
]])
|
||||
|
||||
echo 'int dummy = 0;' > foo.c
|
||||
|
@ -173,10 +173,23 @@ m4_define([LT_ESCAPE],
|
||||
m4_define([LT_AT_CHECK],
|
||||
[echo "LT_ESCAPE([$1])"; AT_CHECK($@)])
|
||||
|
||||
|
||||
# _LT_AT_TRANSLATE_TEXT_OUTPUT(FILE)
|
||||
# ----------------------------------
|
||||
# Ensure correct line ending for expected output of host executables.
|
||||
m4_define([_LT_AT_TRANSLATE_TEXT_OUTPUT],
|
||||
[case $host_os in mingw*)
|
||||
while read -r l; do printf "%s\r\n" "$l"; done < $1 > $1.t
|
||||
mv -f $1.t $1 ;;
|
||||
esac])
|
||||
|
||||
|
||||
# LT_AT_EXEC_CHECK(EXECUTABLE, [STATUS = 0], [STDOUT], [STDERR])
|
||||
# --------------------------------------------------------------
|
||||
m4_define([LT_AT_EXEC_CHECK],
|
||||
[AT_CHECK([$1; lt_status=$?; if test $lt_status -eq 0; then :;
|
||||
[m4_if([$3], [expout], [_LT_AT_TRANSLATE_TEXT_OUTPUT([$3])])
|
||||
m4_if([$4], [experr], [_LT_AT_TRANSLATE_TEXT_OUTPUT([$4])])
|
||||
AT_CHECK([$1; lt_status=$?; if test $lt_status -eq 0; then :;
|
||||
elif test "X$host" != "X$build" && \
|
||||
{ test -x "$1" || test -x "$1"$EXEEXT; }
|
||||
then (exit 77); else (exit $lt_status); fi],[$2],[$3],[$4])
|
||||
@ -187,7 +200,9 @@ m4_define([LT_AT_EXEC_CHECK],
|
||||
# [STATUS = 0], [STDOUT], [STDERR])
|
||||
# ---------------------------------------------------------
|
||||
m4_define([LT_AT_NOINST_EXEC_CHECK],
|
||||
[AT_CHECK([$LIBTOOL --mode=execute $2 $1; lt_status=$?;
|
||||
[m4_if([$4], [expout], [_LT_AT_TRANSLATE_TEXT_OUTPUT([$4])])
|
||||
m4_if([$5], [experr], [_LT_AT_TRANSLATE_TEXT_OUTPUT([$5])])
|
||||
AT_CHECK([$LIBTOOL --mode=execute $2 $1; lt_status=$?;
|
||||
if test $lt_status -eq 0; then :;
|
||||
elif test "X$host" != "X$build" && \
|
||||
{ test -x "$1" || test -x "$1"$EXEEXT; }
|
||||
|
Loading…
Reference in New Issue
Block a user