On 1/24/21 9:07 PM, Richard Henderson wrote: > On 1/24/21 8:59 AM, Philippe Mathieu-Daudé wrote: >> On 1/23/21 11:39 AM, Bin Meng wrote: >>> From: Bin Meng <bin.m...@windriver.com> >>> >>> Import CRC16 calculation routines from Linux kernel v5.10: >>> >>> include/linux/crc-ccitt.h >>> lib/crc-ccitt.c >>> >>> to QEMU: >>> >>> include/qemu/crc-ccitt.h >>> util/crc-ccitt.c >>> >>> Signed-off-by: Bin Meng <bin.m...@windriver.com> >>> Acked-by: Alistair Francis <alistair.fran...@wdc.com> >>> --- >>> >>> (no changes since v1) >>> >>> include/qemu/crc-ccitt.h | 33 ++++++++++ >>> util/crc-ccitt.c | 127 +++++++++++++++++++++++++++++++++++++++ >>> util/meson.build | 1 + >>> 3 files changed, 161 insertions(+) >>> create mode 100644 include/qemu/crc-ccitt.h >>> create mode 100644 util/crc-ccitt.c >> ... >> >>> diff --git a/util/meson.build b/util/meson.build >>> index 540a605b78..05a376ae02 100644 >>> --- a/util/meson.build >>> +++ b/util/meson.build >>> @@ -29,6 +29,7 @@ util_ss.add(files('qemu-config.c', 'notify.c')) >>> util_ss.add(files('qemu-option.c', 'qemu-progress.c')) >>> util_ss.add(files('keyval.c')) >>> util_ss.add(files('crc32c.c')) >>> +util_ss.add(files('crc-ccitt.c')) >> >> OK but we can restrict this to system-mode emulation, as user-mode >> and tools don't require it. > > Doesn't this get put in libutil, where it is only pulled from the archive when > needed? Also, libutil is built once, not per-target.
Hmm I just sent a pull request with this change squashed in. Should I cancel it? My view is we don't install libqemuutil.a anywhere, so why overload building unused objects when some configuration don't need it? Some of the configurations I test: - build tools only - build linux-user only dbus.o and yank.o are also restricted to have_system. various objects are restricted to have_block (which is have_system or have_tools).