[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] tests: check if sys_lib_search_path_spec works on MSVC.
From: |
Ralf Wildenhues |
Subject: |
Re: [PATCH] tests: check if sys_lib_search_path_spec works on MSVC. |
Date: |
Mon, 27 Sep 2010 19:55:05 +0200 |
User-agent: |
Mutt/1.5.20 (2010-08-04) |
Hi Peter,
* Peter Rosin wrote on Mon, Sep 27, 2010 at 04:37:17PM CEST:
> Ok to push? Passes with MSVC, MinGW/gcc and Cygwin/gcc. If I trivially
> break the compile step, it skips as designed.
Interesting. If it were late in the release cycle, I'd be a bit wary
of this patch without a fair amount of system testing, but since we're
fairly early I think we should try it, with nits below addressed.
Please do merge the test into the tests/search-path.at file though
(if it helps you you can remove my author tag from it, or add yourself)
and name it "sys_lib_search_path on w32" or so.
A couple of questions below.
Thanks,
Ralf
> Subject: [PATCH] tests: check if sys_lib_search_path_spec works on MSVC.
>
> * tests/sys-lib.at: New test, catching regressions in
> v2.2.10-207-g09142ea.
> * Makefile.am (TESTSUITE_AT): Update.
> +AT_SETUP([sys_lib])
> +AT_KEYWORDS([libtool])
> +LDFLAGS="$LDFLAGS -no-undefined"
> +
> +AT_DATA([gc.c],
> +[[#include <windows.h>
> +HCURSOR get_cursor (void)
> +{
> + return GetCursor ();
> +}
> +]])
> +
> +eval "`$LIBTOOL --config | grep '^build_libtool_libs='`"
> +AT_CHECK([test "$build_libtool_libs" = yes || (exit 77)])
No need for the subshell for exit 77.
> +AT_CHECK([$LIBTOOL --mode=compile --tag=CC --tag=disable-static \
> + $CC $CPPFLAGS $CFLAGS -o gc.lo -c gc.c || exit 77],
> + [], [ignore], [ignore])
Why the --tag=disable-static here?
> +# Ok, compile was fine, then it should be possible to link too.
> +
> +AT_CHECK([$LIBTOOL --mode=link --tag=CC --tag=disable-static \
> + $CC $CFLAGS $LDFLAGS -o libgc.la gc.lo -rpath /nowhere -luser32],
> + [], [ignore], [ignore])
> +
> +# If -luser32 was found, then libtool will build a shared library,
> +# otherwise libtool will fall back to creating a static library.
Will creating a static library work if you used --tag=disable-static
above?
> +AT_CHECK([grep old_library=\'\' libgc.la], [], [ignore])
> +
> +AT_CLEANUP