qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] buildsys: Move seccomp cflags/libs to per object
@ 2017-09-07  8:53 Fam Zheng
  2017-09-07 17:52 ` Philippe Mathieu-Daudé
  2017-09-08  8:10 ` Eduardo Otubo
  0 siblings, 2 replies; 4+ messages in thread
From: Fam Zheng @ 2017-09-07  8:53 UTC (permalink / raw)
  To: qemu-devel; +Cc: Eduardo Otubo

Like many other libraries, libseccomp cflags and libs should only apply
to the building of necessary objects. Do so in the usual way with the
help of per object variables.

Signed-off-by: Fam Zheng <famz@redhat.com>
---
 Makefile.objs | 2 ++
 configure     | 6 ++++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index 24a4ea08b8..d9cf7ad791 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -70,6 +70,8 @@ common-obj-y += backends/
 common-obj-y += chardev/
 
 common-obj-$(CONFIG_SECCOMP) += qemu-seccomp.o
+qemu-seccomp.o-cflags := $(SECCOMP_CFLAGS)
+qemu-seccomp.o-libs := $(SECCOMP_LIBS)
 
 common-obj-$(CONFIG_FDT) += device_tree.o
 
diff --git a/configure b/configure
index fb7e34a901..fb81a0189b 100755
--- a/configure
+++ b/configure
@@ -2052,8 +2052,8 @@ if test "$seccomp" != "no" ; then
 
     if test "$libseccomp_minver" != "" &&
        $pkg_config --atleast-version=$libseccomp_minver libseccomp ; then
-        libs_softmmu="$libs_softmmu $($pkg_config --libs libseccomp)"
-        QEMU_CFLAGS="$QEMU_CFLAGS $($pkg_config --cflags libseccomp)"
+        seccomp_cflags="$($pkg_config --cflags libseccomp)"
+        seccomp_libs="$($pkg_config --libs libseccomp)"
         seccomp="yes"
     else
         if test "$seccomp" = "yes" ; then
@@ -5875,6 +5875,8 @@ fi
 
 if test "$seccomp" = "yes"; then
   echo "CONFIG_SECCOMP=y" >> $config_host_mak
+  echo "SECCOMP_CFLAGS=$seccomp_cflags" >> $config_host_mak
+  echo "SECCOMP_LIBS=$seccomp_libs" >> $config_host_mak
 fi
 
 # XXX: suppress that
-- 
2.13.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] buildsys: Move seccomp cflags/libs to per object
  2017-09-07  8:53 [Qemu-devel] [PATCH] buildsys: Move seccomp cflags/libs to per object Fam Zheng
@ 2017-09-07 17:52 ` Philippe Mathieu-Daudé
  2017-09-08  8:10 ` Eduardo Otubo
  1 sibling, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-09-07 17:52 UTC (permalink / raw)
  To: Fam Zheng, qemu-devel; +Cc: Eduardo Otubo

On 09/07/2017 05:53 AM, Fam Zheng wrote:
> Like many other libraries, libseccomp cflags and libs should only apply
> to the building of necessary objects. Do so in the usual way with the
> help of per object variables.
> 
> Signed-off-by: Fam Zheng <famz@redhat.com>

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> ---
>   Makefile.objs | 2 ++
>   configure     | 6 ++++--
>   2 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/Makefile.objs b/Makefile.objs
> index 24a4ea08b8..d9cf7ad791 100644
> --- a/Makefile.objs
> +++ b/Makefile.objs
> @@ -70,6 +70,8 @@ common-obj-y += backends/
>   common-obj-y += chardev/
>   
>   common-obj-$(CONFIG_SECCOMP) += qemu-seccomp.o
> +qemu-seccomp.o-cflags := $(SECCOMP_CFLAGS)
> +qemu-seccomp.o-libs := $(SECCOMP_LIBS)
>   
>   common-obj-$(CONFIG_FDT) += device_tree.o
>   
> diff --git a/configure b/configure
> index fb7e34a901..fb81a0189b 100755
> --- a/configure
> +++ b/configure
> @@ -2052,8 +2052,8 @@ if test "$seccomp" != "no" ; then
>   
>       if test "$libseccomp_minver" != "" &&
>          $pkg_config --atleast-version=$libseccomp_minver libseccomp ; then
> -        libs_softmmu="$libs_softmmu $($pkg_config --libs libseccomp)"
> -        QEMU_CFLAGS="$QEMU_CFLAGS $($pkg_config --cflags libseccomp)"
> +        seccomp_cflags="$($pkg_config --cflags libseccomp)"
> +        seccomp_libs="$($pkg_config --libs libseccomp)"
>           seccomp="yes"
>       else
>           if test "$seccomp" = "yes" ; then
> @@ -5875,6 +5875,8 @@ fi
>   
>   if test "$seccomp" = "yes"; then
>     echo "CONFIG_SECCOMP=y" >> $config_host_mak
> +  echo "SECCOMP_CFLAGS=$seccomp_cflags" >> $config_host_mak
> +  echo "SECCOMP_LIBS=$seccomp_libs" >> $config_host_mak
>   fi
>   
>   # XXX: suppress that
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] buildsys: Move seccomp cflags/libs to per object
  2017-09-07  8:53 [Qemu-devel] [PATCH] buildsys: Move seccomp cflags/libs to per object Fam Zheng
  2017-09-07 17:52 ` Philippe Mathieu-Daudé
@ 2017-09-08  8:10 ` Eduardo Otubo
  2017-09-08  8:16   ` Fam Zheng
  1 sibling, 1 reply; 4+ messages in thread
From: Eduardo Otubo @ 2017-09-08  8:10 UTC (permalink / raw)
  To: Fam Zheng; +Cc: qemu-devel

On Thu, Sep 07, 2017 at 04:53:16PM +0800, Fam Zheng wrote:
> Like many other libraries, libseccomp cflags and libs should only apply
> to the building of necessary objects. Do so in the usual way with the
> help of per object variables.
> 
> Signed-off-by: Fam Zheng <famz@redhat.com>

I'll include in the next pull request. Thanks for the patch.

Acked-by: Eduardo Otubo <otubo@redhat.com>

> ---
>  Makefile.objs | 2 ++
>  configure     | 6 ++++--
>  2 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/Makefile.objs b/Makefile.objs
> index 24a4ea08b8..d9cf7ad791 100644
> --- a/Makefile.objs
> +++ b/Makefile.objs
> @@ -70,6 +70,8 @@ common-obj-y += backends/
>  common-obj-y += chardev/
>  
>  common-obj-$(CONFIG_SECCOMP) += qemu-seccomp.o
> +qemu-seccomp.o-cflags := $(SECCOMP_CFLAGS)
> +qemu-seccomp.o-libs := $(SECCOMP_LIBS)
>  
>  common-obj-$(CONFIG_FDT) += device_tree.o
>  
> diff --git a/configure b/configure
> index fb7e34a901..fb81a0189b 100755
> --- a/configure
> +++ b/configure
> @@ -2052,8 +2052,8 @@ if test "$seccomp" != "no" ; then
>  
>      if test "$libseccomp_minver" != "" &&
>         $pkg_config --atleast-version=$libseccomp_minver libseccomp ; then
> -        libs_softmmu="$libs_softmmu $($pkg_config --libs libseccomp)"
> -        QEMU_CFLAGS="$QEMU_CFLAGS $($pkg_config --cflags libseccomp)"
> +        seccomp_cflags="$($pkg_config --cflags libseccomp)"
> +        seccomp_libs="$($pkg_config --libs libseccomp)"
>          seccomp="yes"
>      else
>          if test "$seccomp" = "yes" ; then
> @@ -5875,6 +5875,8 @@ fi
>  
>  if test "$seccomp" = "yes"; then
>    echo "CONFIG_SECCOMP=y" >> $config_host_mak
> +  echo "SECCOMP_CFLAGS=$seccomp_cflags" >> $config_host_mak
> +  echo "SECCOMP_LIBS=$seccomp_libs" >> $config_host_mak
>  fi
>  
>  # XXX: suppress that
> -- 
> 2.13.5
> 
> 

-- 
Eduardo Otubo
Senior Software Engineer @ RedHat

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] buildsys: Move seccomp cflags/libs to per object
  2017-09-08  8:10 ` Eduardo Otubo
@ 2017-09-08  8:16   ` Fam Zheng
  0 siblings, 0 replies; 4+ messages in thread
From: Fam Zheng @ 2017-09-08  8:16 UTC (permalink / raw)
  To: Eduardo Otubo; +Cc: qemu-devel

On Fri, 09/08 10:10, Eduardo Otubo wrote:
> On Thu, Sep 07, 2017 at 04:53:16PM +0800, Fam Zheng wrote:
> > Like many other libraries, libseccomp cflags and libs should only apply
> > to the building of necessary objects. Do so in the usual way with the
> > help of per object variables.
> > 
> > Signed-off-by: Fam Zheng <famz@redhat.com>
> 
> I'll include in the next pull request. Thanks for the patch.

Great, thanks!

Fam

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-09-08  8:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-07  8:53 [Qemu-devel] [PATCH] buildsys: Move seccomp cflags/libs to per object Fam Zheng
2017-09-07 17:52 ` Philippe Mathieu-Daudé
2017-09-08  8:10 ` Eduardo Otubo
2017-09-08  8:16   ` Fam Zheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).