link seccomp only with softmmu targets
PATCH 1/1 link seccomp only with softmmu targets
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.
--- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
configure +1 -1
@@ -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
Signature · 1 line
1.7.10.4
Quoted 3 lines · Michael Tokarev
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
Il 19/01/2013 16:04, Michael Tokarev ha scritto:
Quoted 5 lines
Quoted 4 lines
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.
Quoted 7 lines
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.
Quoted 4 lines
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
Quoted 23 lines · Michael Tokarev
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 <[email protected]>--- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)configure +1
-2@@ -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 --
Quoted 3 lines
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.
Signature · 1 line
Doug Goldstein