[Mesa-dev] [PATCH] mesa/autoconf: attempt to use gnu99 on older gcc compilers

Dave Airlie airlied at gmail.com
Thu Jan 22 20:36:13 PST 2015


On 22 January 2015 at 11:35, Matt Turner <mattst88 at gmail.com> wrote:
> On Wed, Jan 21, 2015 at 5:28 PM, Dave Airlie <airlied at gmail.com> wrote:
>> From: Dave Airlie <airlied at redhat.com>
>>
>> anonymous structs/union don't work with c99 but do work with gnu99
>> on gcc 4.4.
>>
>> This on top of Jason's designated initialisers changes, make
>> Mesa build on RHEL6 again.
>>
>> Signed-off-by: Dave Airlie <airlied at redhat.com>
>> ---
>>  configure.ac |   12 +++++++++++-
>>  1 files changed, 11 insertions(+), 1 deletions(-)
>>
>> diff --git a/configure.ac b/configure.ac
>> index a4c5c74..9420a90 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -145,6 +145,7 @@ AC_MSG_RESULT([$acv_mesa_CLANG])
>>  dnl If we're using GCC, make sure that it is at least version 4.2.0.  Older
>>  dnl versions are explictly not supported.
>>  GEN_ASM_OFFSETS=no
>> +USE_GNU99=no
>>  if test "x$GCC" = xyes -a "x$acv_mesa_CLANG" = xno; then
>>      AC_MSG_CHECKING([whether gcc version is sufficient])
>>      major=0
>> @@ -163,6 +164,9 @@ if test "x$GCC" = xyes -a "x$acv_mesa_CLANG" = xno; then
>>          AC_MSG_RESULT([yes])http://tldp.org/LDP/abs/html/special-chars.html
>>      fi
>>
>> +    if test $GCC_VERSION_MAJOR -lt 4 -o $GCC_VERSION_MAJOR -eq 4 -a $GCC_VERSION_MINOR -lt 6 ; then
>
> Can't we just do this test...
>

I like grouping the tests for version stuff in the same place, and
also the side effect Ian mentioned with clang
that we might not care about.

But I'm not really caring much either way.

it at least fixes the RHEL6 tinderbox on top of the other changes Jason pushed.
Dave.


More information about the mesa-dev mailing list