mirror of
git://git.savannah.gnu.org/libtool.git
synced 2025-01-12 14:06:37 +08:00
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.
This commit is contained in:
parent
c02df12c80
commit
6f5427b530
@ -1,5 +1,14 @@
|
||||
2001-06-30 Gary V. Vaughan <gary@gnu.org>
|
||||
|
||||
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 <china@thewrittenword.com>
|
||||
|
@ -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 | "")
|
||||
|
@ -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 <<EOF
|
||||
# Generated by libtool
|
||||
pic_object=none
|
||||
non_pic_object=hell.o
|
||||
EOF
|
||||
|
||||
test $? -eq 0 || exit 1
|
||||
# Try a sample link command.
|
||||
linkresult=`$libtool -n --mode=link $CC -o something foo.o hell.lo`
|
||||
|
||||
res=$?
|
||||
|
||||
rm -f hell.lo
|
||||
|
||||
test $res -eq 0 || exit 1
|
||||
|
||||
echo "$linkresult"
|
||||
case "$linkresult" in
|
||||
|
@ -11,7 +11,7 @@ fi
|
||||
. $srcdir/defs || exit 1
|
||||
|
||||
# Try a sample link command.
|
||||
linkresult=`$libtool -n --mode=link gcc -o gettext ../lib/libnlsut.a`
|
||||
linkresult=`$libtool -n --mode=link $CC -o gettext ../lib/libnlsut.a`
|
||||
test $? -eq 0 || exit 1
|
||||
|
||||
echo "$linkresult"
|
||||
|
@ -36,7 +36,7 @@ else
|
||||
# This shell has a builtin print -r that does the trick.
|
||||
echo='print -r'
|
||||
elif test -f /bin/ksh && test "X$CONFIG_SHELL" != X/bin/ksh; then
|
||||
# If we have ksh, try running $0 again with it.
|
||||
# If we have ksh, try running ltconfig again with it.
|
||||
CONFIG_SHELL=/bin/ksh
|
||||
export CONFIG_SHELL
|
||||
exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"}
|
||||
@ -62,14 +62,14 @@ for mode in compile link install; do
|
||||
# preargs and postargs need to go through libtool unmodified.
|
||||
case "$mode" in
|
||||
compile)
|
||||
preargs="gcc -c"
|
||||
preargs="$CC -c"
|
||||
preflag=
|
||||
flag="-DVAR="
|
||||
postargs="foo.c"
|
||||
;;
|
||||
|
||||
link)
|
||||
preargs="gcc -o hell -g -O"
|
||||
preargs="$CC -o hell -g -O"
|
||||
preflag=-Wl,
|
||||
flag="-someflag="
|
||||
postargs="foo.o"
|
||||
|
@ -29,7 +29,7 @@ done
|
||||
for name in $bad_names; do
|
||||
if ($libtool -n --mode=compile compiler -c $name 2>&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
|
||||
|
Loading…
Reference in New Issue
Block a user