[x264-devel] [PATCH] configure: force -O0 for the endian check

Georgi Chorbadzhiyski gf at unixsol.org
Mon Mar 12 15:16:45 CET 2012


Around 03/12/2012 03:44 PM, Måns Rullgård scribbled:
> Georgi Chorbadzhiyski <gf at unixsol.org> writes:
> 
>> 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.
> 
> -O4 is perfectly valid in clang.

Oops, you are right. I read somewhere that gcc accepts -Ox where x > max optimization
level supported but clang correctly errors out, and I was under the impression
that -O3 was the maximum supported level. Sorry about the noise.

-- 
Georgi Chorbadzhiyski
http://georgi.unixsol.org/


More information about the x264-devel mailing list