Message ID | 20250313034524.3069690-19-richard.henderson@linaro.org |
---|---|
State | New |
Headers | show |
Series | accel/tcg, codebase: Build once patches | expand |
On 3/12/25 20:44, Richard Henderson wrote: > Copy to libuser_ss and libsystem_ss. > This file uses semihosting/semihost.h, which has separate > implementations with and without CONFIG_USER_ONLY. > > Signed-off-by: Richard Henderson <richard.henderson@linaro.org> > --- > gdbstub/meson.build | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/gdbstub/meson.build b/gdbstub/meson.build > index 0e8099ae9c..b25db86767 100644 > --- a/gdbstub/meson.build > +++ b/gdbstub/meson.build > @@ -7,15 +7,15 @@ > # We build two versions of gdbstub, one for each mode > libuser_ss.add(files( > 'gdbstub.c', > + 'syscalls.c', > 'user.c' > )) > > libsystem_ss.add(files( > 'gdbstub.c', > + 'syscalls.c', > 'system.c' > )) > > -common_ss.add(files('syscalls.c')) > - > # The user-target is specialised by the guest > specific_ss.add(when: 'CONFIG_USER_ONLY', if_true: files('user-target.c')) So it fixes an existing issue if I'm correct? Maybe there was no consequence, but definitely a hole in our build system. Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
On 3/13/25 10:46, Pierrick Bouvier wrote: > On 3/12/25 20:44, Richard Henderson wrote: >> Copy to libuser_ss and libsystem_ss. >> This file uses semihosting/semihost.h, which has separate >> implementations with and without CONFIG_USER_ONLY. >> >> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> >> --- >> gdbstub/meson.build | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/gdbstub/meson.build b/gdbstub/meson.build >> index 0e8099ae9c..b25db86767 100644 >> --- a/gdbstub/meson.build >> +++ b/gdbstub/meson.build >> @@ -7,15 +7,15 @@ >> # We build two versions of gdbstub, one for each mode >> libuser_ss.add(files( >> 'gdbstub.c', >> + 'syscalls.c', >> 'user.c' >> )) >> libsystem_ss.add(files( >> 'gdbstub.c', >> + 'syscalls.c', >> 'system.c' >> )) >> -common_ss.add(files('syscalls.c')) >> - >> # The user-target is specialised by the guest >> specific_ss.add(when: 'CONFIG_USER_ONLY', if_true: files('user-target.c')) > > So it fixes an existing issue if I'm correct? I think it currently works accidentally, because semihosting_get_target() expands differently for user vs system. But we provide semihosting/stubs-all.c which has another copy of the user version. r~
diff --git a/gdbstub/meson.build b/gdbstub/meson.build index 0e8099ae9c..b25db86767 100644 --- a/gdbstub/meson.build +++ b/gdbstub/meson.build @@ -7,15 +7,15 @@ # We build two versions of gdbstub, one for each mode libuser_ss.add(files( 'gdbstub.c', + 'syscalls.c', 'user.c' )) libsystem_ss.add(files( 'gdbstub.c', + 'syscalls.c', 'system.c' )) -common_ss.add(files('syscalls.c')) - # The user-target is specialised by the guest specific_ss.add(when: 'CONFIG_USER_ONLY', if_true: files('user-target.c'))
Copy to libuser_ss and libsystem_ss. This file uses semihosting/semihost.h, which has separate implementations with and without CONFIG_USER_ONLY. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- gdbstub/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)