On 19/10/26 23:20, Pierrick Bouvier wrote:
When linking multiple targets together, we usually have conflicts with helper
names. So far, it was solved using ad-hoc renaming, but multiple people pointed 
it
would be better to have a general mechanism for it, so here it is.

A previous series attempted that:
https://lore.kernel.org/qemu-devel/[email protected]/,
but it was relying on (binary) symbol renaming, which is not a portable 
solution.
Instead, this series approaches the problem from source code directly.
It requires more change, but it's cleaner IMHO.

Series follows these steps:

First, we make sure all helpers and definition are using HELPER() macro. A lot
of helpers were already defined this way, we just make sure it's exhaustive.
After that we don't have any 'helper_' left on any target code. This is a big
change touching the whole codebase, but it's a simple mechanical change. As long
as it compiles and links, we know it's correct.

I started to do the same manually 3 weeks ago and gave up after
converting the 3rd target, thanks for covering all of them.

Pierrick Bouvier (26):
   target/alpha: define and call helpers using HELPER macro
   target/arm: define and call helpers using HELPER macro
   target/avr: define and call helpers using HELPER macro
   target/hppa: define and call helpers using HELPER macro
   target/i386: define and call helpers using HELPER macro
   target/loongarch: define and call helpers using HELPER macro
   target/m68k: define and call helpers using HELPER macro
   target/microblaze: define and call helpers using HELPER macro
   target/mips: define and call helpers using HELPER macro
   target/or1k: define and call helpers using HELPER macro
   target/ppc: define and call helpers using HELPER macro
   target/riscv: define and call helpers using HELPER macro
   target/rx: define and call helpers using HELPER macro
   target/s390x: define and call helpers using HELPER macro
   target/sh4: define and call helpers using HELPER macro
   target/sparc: define and call helpers using HELPER macro

patches 1 to 17:
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>


Reply via email to