[Mesa-dev] [PATCH V2] mesa: use build flag to ensure stack is realigned on x86

Matt Turner mattst88 at gmail.com
Mon Dec 8 13:56:30 PST 2014


On Mon, Dec 8, 2014 at 1:54 PM, Ian Romanick <idr at freedesktop.org> wrote:
>> diff --git a/configure.ac b/configure.ac
>> index b0df1bb..7dc435a 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -253,8 +253,9 @@ AC_SUBST([VISIBILITY_CXXFLAGS])
>>  dnl
>>  dnl Optional flags, check for compiler support
>>  dnl
>> +SSE41_CFLAGS="-msse4.1"
>>  save_CFLAGS="$CFLAGS"
>> -CFLAGS="-msse4.1 $CFLAGS"
>> +CFLAGS="$SSE41_CFLAGS $CFLAGS"
>>  AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
>>  #include <smmintrin.h>
>>  int main () {
>> @@ -474,6 +475,12 @@ fi
>>  dnl
>>  dnl Arch/platform-specific settings
>>  dnl
>> +case "$target_cpu" in
>> +    i?86)
>> +        SSE41_CFLAGS="$SSE41_CFLAGS -mstackrealign"
>> +;;
>> +esac
>
> Should we only add -mstackrealign if SSE41_CFLAGS is not empty?

It looks like it's unconditionally set.


More information about the mesa-dev mailing list