From 6f5427b530c7eef272f31fc589cb92e4fab8e429 Mon Sep 17 00:00:00 2001 From: "Gary V. Vaughan" Date: Sat, 30 Jun 2001 20:31:34 +0000 Subject: [PATCH] Merge test improvements from multi-language-branch: * tests/defs: Find and set the value of CC probed by libtool.m4 * tests/link-2.test: Use a .lo wrapper script, and the value of CC set by defs instead of hardcoding gcc. * tests/link.test: Use the value of CC set by defs instead of hardcoding gcc. * tests/quote.test: Ditto. * tests/suffix.test: Ditto. --- ChangeLog | 9 +++++++++ tests/defs | 4 ++++ tests/link-2.test | 17 ++++++++++++++--- tests/link.test | 2 +- tests/quote.test | 6 +++--- tests/suffix.test | 2 +- 6 files changed, 32 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0c3b3ab2..15d60edc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2001-06-30 Gary V. Vaughan + Merge test improvements from multi-language-branch: + * tests/defs: Find and set the value of CC probed by libtool.m4 + * tests/link-2.test: Use a .lo wrapper script, and the value of + CC set by defs instead of hardcoding gcc. + * tests/link.test: Use the value of CC set by defs instead of + hardcoding gcc. + * tests/quote.test: Ditto. + * tests/suffix.test: Ditto. + * libtool.m4 (AC_LIBTOOL_PROG_COMPILER_PIC) [aix*]: Always set lt_prog_compiler_wl to `-Wl'. Reported by Albert Chin-A-Young diff --git a/tests/defs b/tests/defs index 214207de..97109116 100644 --- a/tests/defs +++ b/tests/defs @@ -12,6 +12,7 @@ progname=`echo "$0" | sed 's%^.*/%%'` libtool="../libtool" make="${MAKE-make}" +SHELL="${CONFIG_SHELL-/bin/sh}" prefix="./_inst" if test "$need_prefix" = yes; then @@ -23,6 +24,9 @@ else prefix=NONE fi +# Extract CC from the libtool configuration +eval `$libtool --config | grep '^CC='` + # See how redirections should work. case "$VERBOSE" in NO | no | 0 | "") diff --git a/tests/link-2.test b/tests/link-2.test index df3c00e9..55f360a2 100755 --- a/tests/link-2.test +++ b/tests/link-2.test @@ -10,10 +10,21 @@ if test -z "$srcdir"; then fi . $srcdir/defs || exit 1 -# Try a sample link command. -linkresult=`$libtool -n --mode=link gcc -o something foo.o hell.lo` +rm -f hell.lo +cat > hell.lo <&1; exit 0) | grep 'cannot'; then : else - echo "recognized $name as a valid source file" + echo "incorrectly recognized $name as a valid source file" status=1 fi done