mirror of
https://gitlab.com/qemu-project/qemu.git
synced 2024-12-05 12:16:31 +03:00
4408155ac5
The non-standard .fa library suffix breaks the link source
de-duplication done by Meson so drop it.
The lack of link source de-duplication causes AddressSanitizer to
complain ODR violations, and makes GNU ld abort when combined with
clang's LTO.
Fortunately, the non-standard suffix is not necessary anymore for
two reasons.
First, the non-standard suffix was necessary for fork-fuzzing.
Meson wraps all standard-suffixed libraries with --start-group and
--end-group. This made a fork-fuzz.ld linker script wrapped as well and
broke builds. Commit d2e6f9272d
("fuzz: remove fork-fuzzing
scaffolding") dropped fork-fuzzing so we can now restore the standard
suffix.
Second, the libraries are not even built anymore, because it is
possible to just use the object files directly via extract_all_objects().
The occurences of the suffix were detected and removed by performing
a tree-wide search with 'fa' and .fa (note the quotes and dot).
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-ID: <20240524-xkb-v4-4-2de564e5c859@daynix.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
38 lines
1.3 KiB
Meson
38 lines
1.3 KiB
Meson
#
|
|
# The main gdbstub still relies on per-build definitions of various
|
|
# types. The bits pushed to system/user.c try to use guest agnostic
|
|
# types such as hwaddr.
|
|
#
|
|
|
|
# We need to build the core gdb code via a library to be able to tweak
|
|
# cflags so:
|
|
|
|
gdb_user_ss = ss.source_set()
|
|
gdb_system_ss = ss.source_set()
|
|
|
|
# We build two versions of gdbstub, one for each mode
|
|
gdb_user_ss.add(files('gdbstub.c', 'user.c'))
|
|
gdb_system_ss.add(files('gdbstub.c', 'system.c'))
|
|
|
|
gdb_user_ss = gdb_user_ss.apply({})
|
|
gdb_system_ss = gdb_system_ss.apply({})
|
|
|
|
libgdb_user = static_library('gdb_user',
|
|
gdb_user_ss.sources() + genh,
|
|
c_args: '-DCONFIG_USER_ONLY',
|
|
build_by_default: false)
|
|
|
|
libgdb_system = static_library('gdb_system',
|
|
gdb_system_ss.sources() + genh,
|
|
build_by_default: false)
|
|
|
|
gdb_user = declare_dependency(objects: libgdb_user.extract_all_objects(recursive: false))
|
|
user_ss.add(gdb_user)
|
|
gdb_system = declare_dependency(objects: libgdb_system.extract_all_objects(recursive: false))
|
|
system_ss.add(gdb_system)
|
|
|
|
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'))
|