On Mon, Nov 04, 2013 at 04:00:48PM +0200, Martin Storsjö wrote:
> MSVC does support most of C99 since the 2013 version. Try to
> detect whether the compiler in the path needs to run the C99
> converter or not. When the converter is omitted, the compilation
s/the compilation/compilation/
> Prior to this, users could still use --cc="c99conv -noconv cl"
> to run MSVC 2013 to achieve the same.
s/to run/when running/
> --- a/configure
> +++ b/configure
> @@ -2279,6 +2279,16 @@ case "$toolchain" in
> ;;
> msvc)
> cc_default="c99wrap cl"
> + # Check whether cl.exe supports C99 or not. From MSVC 2013 onwards,
> + # it does support C99, but we still need to use c99wrap for passing
> + # command line parameters with a space (for avoiding msys path
> + # mangling/conversion issues).
> + cat <<EOF > $TMPDIR/c99test.c
> + struct s { int a, b; } a = { .b = 42 };
> +EOF
> + check_cmd c99wrap -noconv cl -c -Fo $TMPDIR/c99test.o
> $TMPDIR/c99test.c &&
> + cc_default="c99wrap -noconv cl"
> + rm -f $TMPDIR/c99test.{c,o}
You absolutely must not create a temporary file with a predictable name.
This is a security risk.
Overall the patch feels hackish due to the fact that you run the test so
early and configure is not yet prepared to properly run compilation tests.
I suggest you try detecting the msvc version in probe_cc() and adding
-noconv to the compiler _flags there. If I am not mistaken, that should
work just as well and be cleaner.
Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel