[x264-devel] [PATCH] configure: force -O0 for the endian check
Georgi Chorbadzhiyski
gf at unixsol.org
Mon Mar 12 14:42:39 CET 2012
Around 03/07/2012 02:36 PM, Gil Pedersen scribbled:
> The clang compiler won't output standard object code when -O4 is set, causing the checks to fail.
> ---
> configure | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/configure b/configure
> index 16970b8..69a38ae 100755
> --- a/configure
> +++ b/configure
> @@ -713,7 +713,7 @@ define SYS_$SYS
> # skip endianness check for Intel Compiler, as all supported platforms are little. the -ipo flag will also cause the check to fail
> if [ $compiler = GNU ]; then
> echo "int i[2] = {0x42494745,0}; double f[2] = {0x1.0656e6469616ep+102,0};" > conftest.c
> - $CC $CFLAGS conftest.c -c -o conftest.o 2>/dev/null || die "endian test failed"
> + $CC $CFLAGS -O0 conftest.c -c -o conftest.o 2>/dev/null || die "endian test failed"
> if (${cross_prefix}strings -a conftest.o | grep -q BIGE) && (${cross_prefix}strings -a conftest.o | grep -q FPendian) ; then
> define WORDS_BIGENDIAN
> elif !(${cross_prefix}strings -a conftest.o | grep -q EGIB && ${cross_prefix}strings -a conftest.o | grep -q naidnePF) ; then
-O4 is not valid optimization flag. clang is kind of correct to error out. Isn't it
better to fix the place where -O4 is set.
--
Georgi Chorbadzhiyski
http://georgi.unixsol.org/
More information about the x264-devel
mailing list