[PATCH] meson: Fix meson build with --enable-libdaxctl

Bruce Rogers posted 1 patch 3 years, 8 months ago
Test docker-mingw@fedora failed
Test FreeBSD passed
Test checkpatch passed
Test docker-quick@centos7 failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200824155212.789568-1-brogers@suse.com
configure   | 1 +
meson.build | 6 +++++-
2 files changed, 6 insertions(+), 1 deletion(-)
[PATCH] meson: Fix meson build with --enable-libdaxctl
Posted by Bruce Rogers 3 years, 8 months ago
The daxctl library needs to be linked against when daxctl is asked for
in configure.

Signed-off-by: Bruce Rogers <brogers@suse.com>
---
 configure   | 1 +
 meson.build | 6 +++++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index 67832e3bab..15de7d10de 100755
--- a/configure
+++ b/configure
@@ -7488,6 +7488,7 @@ fi
 
 if test "$libdaxctl" = "yes" ; then
   echo "CONFIG_LIBDAXCTL=y" >> $config_host_mak
+  echo "LIBDAXCTL_LIBS=$libdaxctl_libs" >> $config_host_mak
 fi
 
 if test "$bochs" = "yes" ; then
diff --git a/meson.build b/meson.build
index df5bf728b5..0a24e5c31a 100644
--- a/meson.build
+++ b/meson.build
@@ -380,6 +380,10 @@ if 'CONFIG_LIBPMEM' in config_host
   libpmem = declare_dependency(compile_args: config_host['LIBPMEM_CFLAGS'].split(),
                                link_args: config_host['LIBPMEM_LIBS'].split())
 endif
+libdaxctl = not_found
+if 'CONFIG_LIBDAXCTL' in config_host
+  libdaxctl = declare_dependency(link_args: config_host['LIBDAXCTL_LIBS'].split())
+endif
 
 # Create config-host.h
 
@@ -786,7 +790,7 @@ common_ss.add(files('cpus-common.c'))
 
 subdir('softmmu')
 
-specific_ss.add(files('disas.c', 'exec.c', 'gdbstub.c'), capstone, libpmem)
+specific_ss.add(files('disas.c', 'exec.c', 'gdbstub.c'), capstone, libpmem, libdaxctl)
 specific_ss.add(files('exec-vary.c'))
 specific_ss.add(when: 'CONFIG_TCG', if_true: files(
   'fpu/softfloat.c',
-- 
2.28.0


Re: [PATCH] meson: Fix meson build with --enable-libdaxctl
Posted by Marc-André Lureau 3 years, 8 months ago
Hi

On Mon, Aug 24, 2020 at 7:52 PM Bruce Rogers <brogers@suse.com> wrote:

> The daxctl library needs to be linked against when daxctl is asked for
> in configure.
>
> Signed-off-by: Bruce Rogers <brogers@suse.com>
>

I guess we should cover it too in the CI.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>

---
>  configure   | 1 +
>  meson.build | 6 +++++-
>  2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/configure b/configure
> index 67832e3bab..15de7d10de 100755
> --- a/configure
> +++ b/configure
> @@ -7488,6 +7488,7 @@ fi
>
>  if test "$libdaxctl" = "yes" ; then
>    echo "CONFIG_LIBDAXCTL=y" >> $config_host_mak
> +  echo "LIBDAXCTL_LIBS=$libdaxctl_libs" >> $config_host_mak
>  fi
>
>  if test "$bochs" = "yes" ; then
> diff --git a/meson.build b/meson.build
> index df5bf728b5..0a24e5c31a 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -380,6 +380,10 @@ if 'CONFIG_LIBPMEM' in config_host
>    libpmem = declare_dependency(compile_args:
> config_host['LIBPMEM_CFLAGS'].split(),
>                                 link_args:
> config_host['LIBPMEM_LIBS'].split())
>  endif
> +libdaxctl = not_found
> +if 'CONFIG_LIBDAXCTL' in config_host
> +  libdaxctl = declare_dependency(link_args:
> config_host['LIBDAXCTL_LIBS'].split())
> +endif
>
>  # Create config-host.h
>
> @@ -786,7 +790,7 @@ common_ss.add(files('cpus-common.c'))
>
>  subdir('softmmu')
>
> -specific_ss.add(files('disas.c', 'exec.c', 'gdbstub.c'), capstone,
> libpmem)
> +specific_ss.add(files('disas.c', 'exec.c', 'gdbstub.c'), capstone,
> libpmem, libdaxctl)
>  specific_ss.add(files('exec-vary.c'))
>  specific_ss.add(when: 'CONFIG_TCG', if_true: files(
>    'fpu/softfloat.c',
> --
> 2.28.0
>
>
>

-- 
Marc-André Lureau
Re: [PATCH] meson: Fix meson build with --enable-libdaxctl
Posted by Paolo Bonzini 3 years, 8 months ago
Queued, thanks.

Paolo

Il lun 24 ago 2020, 17:52 Bruce Rogers <brogers@suse.com> ha scritto:

> The daxctl library needs to be linked against when daxctl is asked for
> in configure.
>
> Signed-off-by: Bruce Rogers <brogers@suse.com>
> ---
>  configure   | 1 +
>  meson.build | 6 +++++-
>  2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/configure b/configure
> index 67832e3bab..15de7d10de 100755
> --- a/configure
> +++ b/configure
> @@ -7488,6 +7488,7 @@ fi
>
>  if test "$libdaxctl" = "yes" ; then
>    echo "CONFIG_LIBDAXCTL=y" >> $config_host_mak
> +  echo "LIBDAXCTL_LIBS=$libdaxctl_libs" >> $config_host_mak
>  fi
>
>  if test "$bochs" = "yes" ; then
> diff --git a/meson.build b/meson.build
> index df5bf728b5..0a24e5c31a 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -380,6 +380,10 @@ if 'CONFIG_LIBPMEM' in config_host
>    libpmem = declare_dependency(compile_args:
> config_host['LIBPMEM_CFLAGS'].split(),
>                                 link_args:
> config_host['LIBPMEM_LIBS'].split())
>  endif
> +libdaxctl = not_found
> +if 'CONFIG_LIBDAXCTL' in config_host
> +  libdaxctl = declare_dependency(link_args:
> config_host['LIBDAXCTL_LIBS'].split())
> +endif
>
>  # Create config-host.h
>
> @@ -786,7 +790,7 @@ common_ss.add(files('cpus-common.c'))
>
>  subdir('softmmu')
>
> -specific_ss.add(files('disas.c', 'exec.c', 'gdbstub.c'), capstone,
> libpmem)
> +specific_ss.add(files('disas.c', 'exec.c', 'gdbstub.c'), capstone,
> libpmem, libdaxctl)
>  specific_ss.add(files('exec-vary.c'))
>  specific_ss.add(when: 'CONFIG_TCG', if_true: files(
>    'fpu/softfloat.c',
> --
> 2.28.0
>
>