From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH 31/34] tools: Disable ignored-attributes warning when compiling with clang Date: Thu, 27 Mar 2014 17:14:14 +0000 Message-ID: <1395940454.22909.225.camel@kazak.uk.xensource.com> References: <1395766541-23979-1-git-send-email-julien.grall@linaro.org> <1395766541-23979-32-git-send-email-julien.grall@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WTDsh-0005Y7-Gs for xen-devel@lists.xenproject.org; Thu, 27 Mar 2014 17:14:19 +0000 In-Reply-To: <1395766541-23979-32-git-send-email-julien.grall@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: xen-devel@lists.xenproject.org, tim@xen.org, Ian Jackson , stefano.stabellini@citrix.com, Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Tue, 2014-03-25 at 16:55 +0000, Julien Grall wrote: > Clang 3.5 will fail to build most of the tools because aligned attribute > is not used sometimes: > > In file included from xc_core.c:64: > In file included from ./xg_private.h:30: > In file included from ./xenctrl.h:55: > ../../tools/include/xen/foreign/x86_64.h:198:47: error: 'aligned' attribute ignored when parsing type [-Werror,-Wignored-attributes] > __align8__ uint64_t evtchn_pending[sizeof(__align8__ uint64_t) * 8]; > ^~~~~~~~~~ > ../../tools/include/xen/foreign/x86_64.h:13:36: note: expanded from macro '__align8__' > # define __align8__ __attribute__((aligned (8))) > ^~~~~~~~~~~ > ../../tools/include/xen/foreign/x86_64.h:199:44: error: 'aligned' attribute ignored when parsing type [-Werror,-Wignored-attributes] > __align8__ uint64_t evtchn_mask[sizeof(__align8__ uint64_t) * 8]; Is sizeof(__align8__ uint64_t) != sizeof(uint64_t) under any circumstances? IOW can't we just drop the __align8__ here? > ^~~~~~~~~~ > ../../tools/include/xen/foreign/x86_64.h:13:36: note: expanded from macro '__align8__' > # define __align8__ __attribute__((aligned (8))) > > Signed-off-by: Julien Grall > Cc: Ian Jackson > Cc: Stefano Stabellini > Cc: Ian Campbell > --- > tools/Rules.mk | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/tools/Rules.mk b/tools/Rules.mk > index 13d8fc1..6fb746f 100644 > --- a/tools/Rules.mk > +++ b/tools/Rules.mk > @@ -17,6 +17,8 @@ XEN_LIBXENSTAT = $(XEN_ROOT)/tools/xenstat/libxenstat/src > XEN_BLKTAP2 = $(XEN_ROOT)/tools/blktap2 > XEN_LIBVCHAN = $(XEN_ROOT)/tools/libvchan > > +CFLAGS-$(clang) += -Wno-ignored-attributes > + > CFLAGS_xeninclude = -I$(XEN_INCLUDE) > > CFLAGS_libxenctrl = -I$(XEN_LIBXC) $(CFLAGS_xeninclude)