On 13/3/25 17:36, Pierrick Bouvier wrote:
On 3/12/25 20:44, Richard Henderson wrote:
All this is working toward building accel/tcg/translator.c once,
but it got late and I decided to stop at a convenient milestone.
In the process, I discovered that we have already added files to
common_ss which indirectly depend on CONFIG_USER_ONLY. Sometimes
this is harmless, and sometimes it really is not. For instance,
plugin/api.c is affected by different translation-block.h layout.
Maybe it's finally a good reason to tackle user/system at the same time
we make the rest of the files common.
The only solution I can see is to poison CONFIG_USER_ONLY outside
of specific contexts. I hoisted some existing magic in tcg/ and
gdbstub/ to build separate shared_libraries for user and system,
as that's the only way to add extra command-line -Defines.
It's a good approach (make common + poison is what prevent regressions
and ensure we progress).
Working on target code, I found the need to have a common-{arch} lib,
allowing to share code between variants of a given arch (arm vs
aarch64), with a specific define too.
Are really ARM & Aarch64 different architectures (QEMU wise)?