qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 5/5] configure: Add -Wno-psabi


From: Alex Bennée
Subject: Re: [PATCH v2 5/5] configure: Add -Wno-psabi
Date: Thu, 11 Jun 2020 18:17:28 +0100
User-agent: mu4e 1.5.2; emacs 28.0.50

Richard Henderson <richard.henderson@linaro.org> writes:

> On 6/11/20 9:44 AM, Alex Bennée wrote:
>> 
>> Richard Henderson <richard.henderson@linaro.org> writes:
>> 
>>> On aarch64, gcc 9.3 is generating
>>>
>>> qemu/exec.c: In function ‘address_space_translate_iommu’:
>>> qemu/exec.c:431:28: note: parameter passing for argument of type \
>>>   ‘MemTxAttrs’ {aka ‘struct MemTxAttrs’} changed in GCC 9.1
>>>
>>> and many other reptitions.  This structure, and the functions
>>> amongst which it is passed, are not part of a QEMU public API.
>>> Therefore we do not care how the compiler passes the argument,
>>> so long as the compiler is self-consistent.
>>>
>>> Cc: Alex Bennée <alex.bennee@linaro.org>
>>> Cc: Peter Maydell <peter.maydell@linaro.org>
>>> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
>>> ---
>>> TODO: The only portion of QEMU which does have a public api,
>>> and so must have a stable abi, is "qemu/plugin.h".  We could
>>> test this by forcing -Wpsabi or -Werror=psabi in tests/plugin.
>>> I can't seem to make that work -- Alex?
>> 
>> modified   plugins/Makefile.objs
>> @@ -5,6 +5,7 @@
>>  obj-y += loader.o
>>  obj-y += core.o
>>  obj-y += api.o
>> +api.o-cflags := -Wpsabi
>>  
>>  # Abuse -libs suffix to only link with --dynamic-list/-exported_symbols_list
>>  # when the final binary includes the plugin object.
>> 
>> Seems to work for me.
>
> Wrong directory -- that's the part that goes into qemu, which also uses other
> qemu internal headers.  As opposed to the tests/, which only use the one
> "qemu/plugins.h" header (plus libc).

It's a sub-make so I just did:

modified   tests/plugin/Makefile
@@ -18,7 +18,7 @@ NAMES += hwprofile
 
 SONAMES := $(addsuffix .so,$(addprefix lib,$(NAMES)))
 
-QEMU_CFLAGS += -fPIC
+QEMU_CFLAGS += -fPIC -Wpsabi
 QEMU_CFLAGS += -I$(SRC_PATH)/include/qemu
 
-- 
Alex Bennée



reply via email to

[Prev in Thread] Current Thread [Next in Thread]