+2008-04-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Fix regression over 1.5.26 with ccache $CC -all-static.
+ * libltdl/config/ltmain.m4sh (func_mode_link): Add
+ $link_static_flag to compile_command and link_command only
+ later, instead of right after a possible compiler wrapper.
+ * tests/static.at (ccache -all-static): New test.
+ * THANKS: Update.
+ Report by Richard Purdie.
+
2008-04-22 Andreas Schwab <schwab@suse.de>
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Rainer Orth ro@TechFak.Uni-Bielefeld.DE
Rainer Tammer tammer@tammer.net
Ralf Menzel menzel@ls6.cs.uni-dortmund.de
+ Richard Purdie rpurdie@rpsys.net
Robert Ă–gren lists@roboros.com
Roberto Bagnara bagnara@cs.unipr.it
Roland Mainz roland.mainz@nrubsig.org
fi
if test -n "$link_static_flag"; then
dlopen_self=$dlopen_self_static
- # See comment for -static flag below, for more details.
- func_append compile_command " $link_static_flag"
- func_append finalize_command " $link_static_flag"
fi
prefer_static_libs=yes
;;
case $arg in
-all-static)
- # The effects of -all-static are defined in a previous loop.
+ if test -n "$link_static_flag"; then
+ # See comment for -static flag below, for more details.
+ func_append compile_command " $link_static_flag"
+ func_append finalize_command " $link_static_flag"
+ fi
continue
;;
done
AT_CLEANUP
+
+
+AT_SETUP([ccache -all-static])
+
+AT_DATA([ccache],
+[[#! /bin/sh
+# poor man's ccache clone
+case $1 in
+-*) echo "bogus argument: $1" >&2; exit 1 ;;
+esac
+exec "$@"
+]])
+chmod +x ./ccache
+
+AT_DATA([a.c],
+[[int main(void) { return 0; }
+]])
+
+AT_CHECK([$CC $CPPFLAGS $CFLAGS -c a.c], [], [ignore])
+AT_CHECK([$LIBTOOL --mode=link --tag=CC ./ccache $CC $CFLAGS $LDFLAGS -all-static a.$OBJEXT -o a],
+ [], [ignore])
+
+AT_CLEANUP