qemu-ppc
[Top][All Lists]
Advanced

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

Re: [PATCH] ppc: qtest already exports qtest_rtas_call()


From: Juan Quintela
Subject: Re: [PATCH] ppc: qtest already exports qtest_rtas_call()
Date: Tue, 31 Oct 2023 11:15:14 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux)

David Gibson <david@gibson.dropbear.id.au> wrote:
> On Mon, Oct 30, 2023 at 05:41:36PM +0100, Cédric le Goater wrote:
>> On 10/30/23 17:38, Juan Quintela wrote:
>> > Having two functions with the same name is a bad idea.  As spapr only
>> > uses the function locally, made it static.
>> > 
>> > When you compile with clang, you get this compilation error:
>> > 
>> > /usr/bin/ld: tests/qtest/libqos/libqos.fa.p/.._libqtest.c.o: in function 
>> > `qtest_rtas_call':
>> > /scratch/qemu/clang/full/all/../../../../../mnt/code/qemu/full/tests/qtest/libqtest.c:1195:
>> > multiple definition of `qtest_rtas_call';
>> > libqemu-ppc64-softmmu.fa.p/hw_ppc_spapr_rtas.c.o:/scratch/qemu/clang/full/all/../../../../../mnt/code/qemu/full/hw/ppc/spapr_rtas.c:536:
>> > first defined here
>> > clang-16: error: linker command failed with exit code 1 (use -v to see 
>> > invocation)
>> > ninja: build stopped: subcommand failed.
>> > make: *** [Makefile:162: run-ninja] Error 1
>> > 
>> > Signed-off-by: Juan Quintela <quintela@redhat.com>
>> 
>> 
>> Reviewed-by: Cédric Le Goater <clg@kaod.org>
>
> I think changing the name of one of the functions would be even
> better.  Making it static means it won't confuse the compiler, but it
> can still confuse people.

I think that made it static when it is not used anywhere else is a good
idea.

After that, I don't understand it enough to make a rename that makes
sense.

This patch is the typical fix for "make all" with clang fails here.
I let ppc maintainers to do anything more sensible.

Later, Juan.




reply via email to

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