* [Qemu-devel] [PATCH] link seccomp only with softmmu targets
@ 2013-01-19 14:58 Michael Tokarev
2013-01-19 15:04 ` Michael Tokarev
2013-01-19 22:33 ` Doug Goldstein
0 siblings, 2 replies; 4+ messages in thread
From: Michael Tokarev @ 2013-01-19 14:58 UTC (permalink / raw)
To: Eduardo Otubo; +Cc: Michael Tokarev, qemu-devel
Now, if seccomp is detected, it is linked into every executable,
but is used only by softmmu targets (from vl.c). So link it
only where it is actually needed.
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure b/configure
index 4ebb60d..509b3f1 100755
--- a/configure
+++ b/configure
@@ -1427,7 +1427,7 @@ fi
if test "$seccomp" != "no" ; then
if $pkg_config --atleast-version=1.0.0 libseccomp --modversion >/dev/null 2>&1; then
- LIBS=`$pkg_config --libs libseccomp`
+ libs_softmmu="$libs_softmmu `$pkg_config --libs libseccomp`"
seccomp="yes"
else
if test "$seccomp" = "yes"; then
--
1.7.10.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] link seccomp only with softmmu targets
2013-01-19 14:58 [Qemu-devel] [PATCH] link seccomp only with softmmu targets Michael Tokarev
@ 2013-01-19 15:04 ` Michael Tokarev
2013-01-19 15:31 ` Paolo Bonzini
2013-01-19 22:33 ` Doug Goldstein
1 sibling, 1 reply; 4+ messages in thread
From: Michael Tokarev @ 2013-01-19 15:04 UTC (permalink / raw)
To: Michael Tokarev; +Cc: qemu-devel, Eduardo Otubo
19.01.2013 18:58, Michael Tokarev wrote:
> Now, if seccomp is detected, it is linked into every executable,
> but is used only by softmmu targets (from vl.c). So link it
> only where it is actually needed.
Note this is not just a cleanup. For some reason, at least
debian package of seccomp lacks static library (this needs
separate investigation and maybe a fix), so when building
linux-user-static targets the build fails, since libseccomp
is linked into static linux-user executables.
So consider it is a bugfix.
Note that Makefile.objs adds qemu-seccomp.o to common-objs-y, --
maybe this whole variable (common-objs) should be renamed
to softmmu-objs, to match other softmmu-* stuff? But I'm
not sure I understand this makefile machinery.
/mjt
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] link seccomp only with softmmu targets
2013-01-19 15:04 ` Michael Tokarev
@ 2013-01-19 15:31 ` Paolo Bonzini
0 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2013-01-19 15:31 UTC (permalink / raw)
To: Michael Tokarev; +Cc: qemu-devel, Eduardo Otubo
Il 19/01/2013 16:04, Michael Tokarev ha scritto:
>
>> Now, if seccomp is detected, it is linked into every executable,
>> but is used only by softmmu targets (from vl.c). So link it
>> only where it is actually needed.
>
> Note this is not just a cleanup. For some reason, at least
> debian package of seccomp lacks static library (this needs
> separate investigation and maybe a fix), so when building
> linux-user-static targets the build fails, since libseccomp
> is linked into static linux-user executables.
>
> So consider it is a bugfix.
Ack.
> Note that Makefile.objs adds qemu-seccomp.o to common-objs-y, --
> maybe this whole variable (common-objs) should be renamed
> to softmmu-objs, to match other softmmu-* stuff? But I'm
> not sure I understand this makefile machinery.
I'm going to unify common-obj-y/universal-obj-y/user-obj-y (see patches
from today) so that common-obj-y just means "built in the toplevel
directory for the target directories".
All of libs_softmmu etc. should probably be moved to the Makefiles as well.
Paolo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] link seccomp only with softmmu targets
2013-01-19 14:58 [Qemu-devel] [PATCH] link seccomp only with softmmu targets Michael Tokarev
2013-01-19 15:04 ` Michael Tokarev
@ 2013-01-19 22:33 ` Doug Goldstein
1 sibling, 0 replies; 4+ messages in thread
From: Doug Goldstein @ 2013-01-19 22:33 UTC (permalink / raw)
To: qemu-stable; +Cc: Michael Tokarev, qemu-devel, Eduardo Otubo
On Sat, Jan 19, 2013 at 8:58 AM, Michael Tokarev <mjt@tls.msk.ru> wrote:
> Now, if seccomp is detected, it is linked into every executable,
> but is used only by softmmu targets (from vl.c). So link it
> only where it is actually needed.
>
> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
> ---
> configure | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/configure b/configure
> index 4ebb60d..509b3f1 100755
> --- a/configure
> +++ b/configure
> @@ -1427,7 +1427,7 @@ fi
>
> if test "$seccomp" != "no" ; then
> if $pkg_config --atleast-version=1.0.0 libseccomp --modversion >/dev/null 2>&1; then
> - LIBS=`$pkg_config --libs libseccomp`
> + libs_softmmu="$libs_softmmu `$pkg_config --libs libseccomp`"
> seccomp="yes"
> else
> if test "$seccomp" = "yes"; then
> --
> 1.7.10.4
>
>
This should likely be considered for QEMU 1.3.1 as well. I've added it
to my QEMU 1.2.x queue as well.
--
Doug Goldstein
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-01-19 22:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-19 14:58 [Qemu-devel] [PATCH] link seccomp only with softmmu targets Michael Tokarev
2013-01-19 15:04 ` Michael Tokarev
2013-01-19 15:31 ` Paolo Bonzini
2013-01-19 22:33 ` Doug Goldstein
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).