Message ID | 1358607489-12478-1-git-send-email-mjt@msgid.tls.msk.ru |
---|---|
State | New |
Headers | show |
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
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
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.
Thanks, applied. On Sat, Jan 19, 2013 at 2:58 PM, 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 > >
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
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(-)