[Qemu-devel] [PATCH 0/3] contrib/rdmacm-mux: fix clang compilation

Marcel Apfelbaum posted 3 patches 5 years, 3 months ago
Test asan passed
Test checkpatch passed
Test docker-clang@ubuntu failed
Test docker-mingw@fedora passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190112150225.20294-1-marcel.apfelbaum@gmail.com
Maintainers: Yuval Shaia <yuval.shaia@oracle.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
There is a newer version of this series
Makefile                         |  2 ++
contrib/rdmacm-mux/Makefile.objs |  1 -
contrib/rdmacm-mux/main.c        | 18 +++++++++++++-----
hw/rdma/rdma_backend.c           | 16 ++++++++++++----
4 files changed, 27 insertions(+), 10 deletions(-)
[Qemu-devel] [PATCH 0/3] contrib/rdmacm-mux: fix clang compilation
Posted by Marcel Apfelbaum 5 years, 3 months ago
Fix Commit a5d2f6f877 (contrib/rdmacm-mux: Add implementation
                       of RDMA User MAD multiplexer).

The above commit introduces a new contrib target, adding a global dependency
to libumad library in case pvrdma configuration option is enabled.
Clang forbids it:
    clang-6.0: error: -libumad: 'linker' input unused
              [-Werror,-Wunused-command-line-argument]

Fix by limiting the scope to the rdmacm-mux target itself.
Fix related clang errors while at it.

Marcel Apfelbaum (3):
  contrib/rdmacm-mux: remove Wno-format-truncation flag
  hw/rdma: modify struct initialization
  contrib/rdmacm-mux: fix clang compilation

 Makefile                         |  2 ++
 contrib/rdmacm-mux/Makefile.objs |  1 -
 contrib/rdmacm-mux/main.c        | 18 +++++++++++++-----
 hw/rdma/rdma_backend.c           | 16 ++++++++++++----
 4 files changed, 27 insertions(+), 10 deletions(-)

-- 
2.17.1


Re: [Qemu-devel] [PATCH 0/3] contrib/rdmacm-mux: fix clang compilation
Posted by Cornelia Huck 5 years, 3 months ago
On Sat, 12 Jan 2019 17:02:22 +0200
Marcel Apfelbaum <marcel.apfelbaum@gmail.com> wrote:

> Fix Commit a5d2f6f877 (contrib/rdmacm-mux: Add implementation
>                        of RDMA User MAD multiplexer).
> 
> The above commit introduces a new contrib target, adding a global dependency
> to libumad library in case pvrdma configuration option is enabled.
> Clang forbids it:
>     clang-6.0: error: -libumad: 'linker' input unused
>               [-Werror,-Wunused-command-line-argument]
> 
> Fix by limiting the scope to the rdmacm-mux target itself.
> Fix related clang errors while at it.
> 
> Marcel Apfelbaum (3):
>   contrib/rdmacm-mux: remove Wno-format-truncation flag
>   hw/rdma: modify struct initialization
>   contrib/rdmacm-mux: fix clang compilation
> 
>  Makefile                         |  2 ++
>  contrib/rdmacm-mux/Makefile.objs |  1 -
>  contrib/rdmacm-mux/main.c        | 18 +++++++++++++-----
>  hw/rdma/rdma_backend.c           | 16 ++++++++++++----
>  4 files changed, 27 insertions(+), 10 deletions(-)
> 

This fixes building on x86 with clang 6 for me. On s390x with clang 7,
I run into further problems when building the s390-ccw bios (the
maintainers are aware of that), but the rdma-related errors are gone.

Tested-by: Cornelia Huck <cohuck@redhat.com>

Re: [Qemu-devel] [PATCH 0/3] contrib/rdmacm-mux: fix clang compilation
Posted by Marcel Apfelbaum 5 years, 3 months ago
Hi Cornelia,

On 1/14/19 1:42 PM, Cornelia Huck wrote:
> On Sat, 12 Jan 2019 17:02:22 +0200
> Marcel Apfelbaum <marcel.apfelbaum@gmail.com> wrote:
>
>> Fix Commit a5d2f6f877 (contrib/rdmacm-mux: Add implementation
>>                         of RDMA User MAD multiplexer).
>>
>> The above commit introduces a new contrib target, adding a global dependency
>> to libumad library in case pvrdma configuration option is enabled.
>> Clang forbids it:
>>      clang-6.0: error: -libumad: 'linker' input unused
>>                [-Werror,-Wunused-command-line-argument]
>>
>> Fix by limiting the scope to the rdmacm-mux target itself.
>> Fix related clang errors while at it.
>>
>> Marcel Apfelbaum (3):
>>    contrib/rdmacm-mux: remove Wno-format-truncation flag
>>    hw/rdma: modify struct initialization
>>    contrib/rdmacm-mux: fix clang compilation
>>
>>   Makefile                         |  2 ++
>>   contrib/rdmacm-mux/Makefile.objs |  1 -
>>   contrib/rdmacm-mux/main.c        | 18 +++++++++++++-----
>>   hw/rdma/rdma_backend.c           | 16 ++++++++++++----
>>   4 files changed, 27 insertions(+), 10 deletions(-)
>>
> This fixes building on x86 with clang 6 for me. On s390x with clang 7,
> I run into further problems when building the s390-ccw bios (the
> maintainers are aware of that), but the rdma-related errors are gone.
>
> Tested-by: Cornelia Huck <cohuck@redhat.com>

Appreciated,
Marcel