Re: [RFC PATCH] sna: Fix build with gcc 5.0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hi Chris,

On 24/04/15 10:11, Chris Wilson wrote:
On Fri, Apr 24, 2015 at 09:43:37AM +0200, Olivier Fourdan wrote:
gcc generates an error at build time because it fails to inline some
functions:

   blt.c: In function 'affine_blt':
   blt.c:980:1: error: inlining failed in call to always_inline
   'bilinear_weight': optimization level attribute mismatch

Does this mean anything more specific (than just it not being able to
inline)?

  Note: It could be a gcc bug, I am not sure, I don't know enough of
        gcc internals to tell, that's why I post this patch as "RFC".

Since bilinear_weight() is trivial and bilinear_interpolation() is only
called from one location, I wonder what is up?

Humm, that looks definitely dodgy, now the build fails a bit further when _FORTIFY_SOURCE is set to 2:


In file included from /usr/include/string.h:639:0,
                 from /usr/include/xorg/os.h:53,
                 from /usr/include/xorg/misc.h:115,
                 from /usr/include/xorg/xf86str.h:37,
                 from sna.h:43,
                 from blt.c:32:
blt.c: In function 'memcpy_from_tiled_x__swizzle_9_10_11':
/usr/include/bits/string3.h:50:42: error: inlining failed in call to always_inline 'memcpy': optimization level attribute mismatch
 __NTH (memcpy (void *__restrict __dest, const void *__restrict __src,
                                          ^
blt.c:474:1314: error: called from here
In file included from /usr/include/string.h:639:0,
                 from /usr/include/xorg/os.h:53,
                 from /usr/include/xorg/misc.h:115,
                 from /usr/include/xorg/xf86str.h:37,
                 from sna.h:43,
                 from blt.c:32:
/usr/include/bits/string3.h:50:42: error: inlining failed in call to always_inline 'memcpy': optimization level attribute mismatch
 __NTH (memcpy (void *__restrict __dest, const void *__restrict __src,
                                          ^
blt.c:474:1605: error: called from here
In file included from /usr/include/string.h:639:0,
                 from /usr/include/xorg/os.h:53,
                 from /usr/include/xorg/misc.h:115,
                 from /usr/include/xorg/xf86str.h:37,
                 from sna.h:43,
                 from blt.c:32:
/usr/include/bits/string3.h:50:42: error: inlining failed in call to always_inline 'memcpy': optimization level attribute mismatch
 __NTH (memcpy (void *__restrict __dest, const void *__restrict __src,
                                          ^
blt.c:474:1865: error: called from here
Makefile:650: recipe for target 'blt.lo' failed


Yet, *not* setting _FORTIFY_SOURCE seems to work around the issue. I find it weird the error is with the inlining of memcpy() ...

I'll double check on the gcc side and report back once I know more :)

Cheers,
Olivier
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux