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

Re: [Xen-devel] [PATCH 1/2] tools/gdbsx: fix build with clang 3.8



On Mon, Jul 23, 2018 at 10:30:38AM +0100, Wei Liu wrote:
> Currently building gdbsx with clang 3.8 gives the following errors:
> 
> xg_main.c:783:17: error: 'aligned' attribute ignored when parsing type 
> [-Werror,-Wignored-attributes]
>     iop->uva = (uint64_aligned_t)((unsigned long)tobuf);
>                 ^~~~~~~~~~~~~~~~
> /builds/liuw/xen/tools/debugger/gdbsx/xg/../../../../tools/include/xen/arch-x86/xen-x86_32.h:105:50:
>  note: expanded from macro 'uint64_aligned_t'
>                                                  ^~~~~~~~~~
> xg_main.c:816:17: error: 'aligned' attribute ignored when parsing type 
> [-Werror,-Wignored-attributes]
>     iop->uva = (uint64_aligned_t)((unsigned long)frombuf);
>                 ^~~~~~~~~~~~~~~~
> /builds/liuw/xen/tools/debugger/gdbsx/xg/../../../../tools/include/xen/arch-x86/xen-x86_32.h:105:50:
>  note: expanded from macro 'uint64_aligned_t'
> 
> According to https://bugs.llvm.org/show_bug.cgi?id=11071, this issue has
> been fixed in clang. But we're not going to get that in 3.8.
> 
> Explicitly disable that warning to fix the build.
> 
> Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
> ---
> Cc:  Elena Ufimtseva <elena.ufimtseva@xxxxxxxxxx>
> 
> See also:
> https://patches.linaro.org/patch/27062/
> https://gitlab.com/liuw/xen/-/jobs/83610026
> ---
>  tools/debugger/gdbsx/Rules.mk | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/tools/debugger/gdbsx/Rules.mk b/tools/debugger/gdbsx/Rules.mk
> index 6e38f2df99..dd9bd0b6cf 100644
> --- a/tools/debugger/gdbsx/Rules.mk
> +++ b/tools/debugger/gdbsx/Rules.mk
> @@ -2,3 +2,7 @@ include $(XEN_ROOT)/tools/Rules.mk
>  
>  CFLAGS   += -Werror -Wmissing-prototypes 
>  # (gcc 4.3x and later)   -Wconversion -Wno-sign-conversion
> +
> +ifeq ($(clang),y)
> +CFLAGS += -Wno-ignored-attributes
> +endif

I would use

CFLAGS-$(clang) += ...

Because it's shorter.

Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

Thanks, Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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