From patchwork Mon May 18 07:15:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier Fourdan X-Patchwork-Id: 6426601 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id F1E30C0432 for ; Mon, 18 May 2015 07:15:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 32D56205EF for ; Mon, 18 May 2015 07:15:31 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 274C0205EE for ; Mon, 18 May 2015 07:15:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8A8BE6E45B; Mon, 18 May 2015 00:15:29 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mx3-phx2.redhat.com (mx3-phx2.redhat.com [209.132.183.24]) by gabe.freedesktop.org (Postfix) with ESMTP id 44E886E45B for ; Mon, 18 May 2015 00:15:28 -0700 (PDT) Received: from zmail25.collab.prod.int.phx2.redhat.com (zmail25.collab.prod.int.phx2.redhat.com [10.5.83.31]) by mx3-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id t4I7FQCT024175; Mon, 18 May 2015 03:15:26 -0400 Date: Mon, 18 May 2015 03:15:26 -0400 (EDT) From: Olivier Fourdan To: "chunshan.zhu" Message-ID: <1962776957.330792.1431933326455.JavaMail.zimbra@redhat.com> In-Reply-To: <5559691B.3050508@gmail.com> References: <5559691B.3050508@gmail.com> MIME-Version: 1.0 X-Originating-IP: [10.36.4.178] X-Mailer: Zimbra 8.0.6_GA_5922 (ZimbraWebClient - FF37 (Linux)/8.0.6_GA_5922) Thread-Topic: build error with GCC5.1.1 Thread-Index: QF9nUiFECZ/0ZFNJBF+HHHImqP4oyw== Cc: intel-gfx@lists.freedesktop.org Subject: Re: [Intel-gfx] build error with GCC5.1.1 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hey, > gcc5.1.1 generates an error at build time. > > sna_accel.c: In function 'sna_poly_zero_line_blt': > sna_accel.c:9207:10: warning: variable 'intersects' set but not used > [-Wunused-but-set-variable] > bool intersects; > ^ > sna_accel.c:9107:6: warning: variable 'degenerate' set but not used > [-Wunused-but-set-variable] > bool degenerate = true; > ^ Well, those are "unused variable warnings" so not an error. Could be easily fixed though. > CC sna_cpu.lo > In file included from /usr/include/string.h:635: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, Right, this is a known issue in gcc 5.1, see here: http://gcc.gnu.org/PR65873 The (easy) workaround is to avoid the "-Ofast" optimization. E.g. something like that in src/sna/compiler.h: But I do not think this is something suitable for upstream as the bug lies in gcc, so it's just a workaround until the issue is fixed in gcc. HTH Cheers, Olivier. --- a/src/sna/compiler.h +++ b/src/sna/compiler.h @@ -63,7 +63,7 @@ #define sse4_2 __attribute__((target("sse4.2,sse2,fpmath=sse"))) #endif -#if HAS_GCC(4, 6) && defined(__OPTIMIZE__) +#if HAS_GCC(4, 6) && !HAS_GCC(5, 0) && defined(__OPTIMIZE__) #define fast __attribute__((optimize("Ofast"))) #else #define fast