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

[Xen-devel] [PATCH 31/34] tools: Disable ignored-attributes warning when compiling with clang



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];
                                           ^~~~~~~~~~
../../tools/include/xen/foreign/x86_64.h:13:36: note: expanded from macro 
'__align8__'
 # define __align8__ __attribute__((aligned (8)))

Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx>
Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Cc: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 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)
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.