On 07/08/20 14:20, Cornelia Huck wrote: >> - on an s390x system, it mostly builds, but I end up with a bunch of >> link errors for libblock.fa, where it fails to find various ZSTD_ >> symbols > Still happening after switching to the latest version of your branch. >
Fixed thusly: diff --git a/block/meson.build b/block/meson.build index c59e9ebd94..cd3bff5d80 100644 --- a/block/meson.build +++ b/block/meson.build @@ -40,7 +40,7 @@ block_ss.add(files( 'vmdk.c', 'vpc.c', 'write-threshold.c', -)) +), zstd) block_ss.add(when: [zlib, 'CONFIG_QCOW1'], if_true: files('qcow.c')) block_ss.add(when: 'CONFIG_VDI', if_true: files('vdi.c')) diff --git a/configure b/configure index 54c60bc8d6..610801ddaa 100755 --- a/configure +++ b/configure @@ -2623,8 +2623,6 @@ if test "$zstd" != "no" ; then if $pkg_config --atleast-version=$libzstd_minver libzstd ; then zstd_cflags="$($pkg_config --cflags libzstd)" zstd_libs="$($pkg_config --libs libzstd)" - LIBS="$zstd_libs $LIBS" - QEMU_CFLAGS="$QEMU_CFLAGS $zstd_cflags" zstd="yes" else if test "$zstd" = "yes" ; then @@ -7394,6 +7392,8 @@ fi if test "$zstd" = "yes" ; then echo "CONFIG_ZSTD=y" >> $config_host_mak + echo "ZSTD_CFLAGS=$zstd_cflags" >> $config_host_mak + echo "ZSTD_LIBS=$zstd_libs" >> $config_host_mak fi if test "$libiscsi" = "yes" ; then diff --git a/meson.build b/meson.build index 155f7f8065..0323968aec 100644 --- a/meson.build +++ b/meson.build @@ -141,6 +141,11 @@ if 'CONFIG_LIBISCSI' in config_host libiscsi = declare_dependency(compile_args: config_host['LIBISCSI_CFLAGS'].split(), link_args: config_host['LIBISCSI_LIBS'].split()) endif +zstd = not_found +if 'CONFIG_ZSTD' in config_host + zstd = declare_dependency(compile_args: config_host['ZSTD_CFLAGS'].split(), + link_args: config_host['ZSTD_LIBS'].split()) +endif gbm = not_found if 'CONFIG_GBM' in config_host gbm = declare_dependency(compile_args: config_host['GBM_CFLAGS'].split(),