* [PULL 10/26] meson: move zlib detection to meson
2020-09-01 17:38 [PULL v2 00/26] Meson changes for 2020-09-01 Paolo Bonzini
@ 2020-09-01 17:38 ` Paolo Bonzini
2020-09-01 17:38 ` [PULL 24/26] meson: add description to options Paolo Bonzini
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Paolo Bonzini @ 2020-09-01 17:38 UTC (permalink / raw)
To: qemu-devel; +Cc: Marc-André Lureau
Meson includes the same logic that tries to look for -lz if
pkg-config (and cmake) cannot find zlib. The undocumented
--disable-zlib-test option becomes a no-op.
There is still an instance of "-lz" in the LIBS directory.
It will go away as soon as tests are converted to meson,
because the zlib dependency does not propagate from libblock.fa
to the Makefile-build unit tests.
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 32 +-------------------------------
meson.build | 6 +-----
2 files changed, 2 insertions(+), 36 deletions(-)
diff --git a/configure b/configure
index f81900880a..e8946aeefb 100755
--- a/configure
+++ b/configure
@@ -502,7 +502,6 @@ opengl=""
opengl_dmabuf="no"
cpuid_h="no"
avx2_opt=""
-zlib="yes"
capstone=""
lzo=""
snappy=""
@@ -1428,7 +1427,7 @@ for opt do
;;
--enable-usb-redir) usb_redir="yes"
;;
- --disable-zlib-test) zlib="no"
+ --disable-zlib-test)
;;
--disable-lzo) lzo="no"
;;
@@ -3904,30 +3903,6 @@ if ! compile_prog "$glib_cflags -Werror" "$glib_libs" ; then
fi
fi
-#########################################
-# zlib check
-
-if test "$zlib" != "no" ; then
- if $pkg_config --exists zlib; then
- zlib_cflags=$($pkg_config --cflags zlib)
- zlib_libs=$($pkg_config --libs zlib)
- QEMU_CFLAGS="$zlib_cflags $QEMU_CFLAGS"
- LIBS="$zlib_libs $LIBS"
- else
- cat > $TMPC << EOF
-#include <zlib.h>
-int main(void) { zlibVersion(); return 0; }
-EOF
- if compile_prog "" "-lz" ; then
- zlib_libs=-lz
- LIBS="$LIBS $zlib_libs"
- else
- error_exit "zlib check failed" \
- "Make sure to have the zlib libs and headers installed."
- fi
- fi
-fi
-
##########################################
# SHA command probe for modules
if test "$modules" = yes; then
@@ -7135,11 +7110,6 @@ fi
if test "$posix_memalign" = "yes" ; then
echo "CONFIG_POSIX_MEMALIGN=y" >> $config_host_mak
fi
-if test "$zlib" != "no" ; then
- echo "CONFIG_ZLIB=y" >> $config_host_mak
- echo "ZLIB_CFLAGS=$zlib_cflags" >> $config_host_mak
- echo "ZLIB_LIBS=$zlib_libs" >> $config_host_mak
-fi
if test "$spice" = "yes" ; then
echo "CONFIG_SPICE=y" >> $config_host_mak
echo "SPICE_CFLAGS=$spice_cflags" >> $config_host_mak
diff --git a/meson.build b/meson.build
index 6b2fc76933..b68e1bdfc7 100644
--- a/meson.build
+++ b/meson.build
@@ -134,11 +134,7 @@ if 'CONFIG_AUTH_PAM' in config_host
pam = cc.find_library('pam')
endif
libaio = cc.find_library('aio', required: false)
-zlib = not_found
-if 'CONFIG_ZLIB' in config_host
- zlib = declare_dependency(compile_args: config_host['ZLIB_CFLAGS'].split(),
- link_args: config_host['ZLIB_LIBS'].split())
-endif
+zlib = dependency('zlib', required: true, static: enable_static)
linux_io_uring = not_found
if 'CONFIG_LINUX_IO_URING' in config_host
linux_io_uring = declare_dependency(compile_args: config_host['LINUX_IO_URING_CFLAGS'].split(),
--
2.26.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PULL 24/26] meson: add description to options
2020-09-01 17:38 [PULL v2 00/26] Meson changes for 2020-09-01 Paolo Bonzini
2020-09-01 17:38 ` [PULL 10/26] meson: move zlib detection to meson Paolo Bonzini
@ 2020-09-01 17:38 ` Paolo Bonzini
2020-09-01 17:38 ` [PULL 25/26] Makefile: Add back TAGS/ctags/cscope rules Paolo Bonzini
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Paolo Bonzini @ 2020-09-01 17:38 UTC (permalink / raw)
To: qemu-devel
This will be useful in the future to generate configure
command line parsing from meson_options.txt.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
meson_options.txt | 29 ++++++++++++++++++++---------
1 file changed, 20 insertions(+), 9 deletions(-)
diff --git a/meson_options.txt b/meson_options.txt
index c3120fa359..543cf70043 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -2,12 +2,23 @@ option('qemu_suffix', type : 'string', value: 'qemu',
description: 'Suffix for QEMU data/modules/config directories (can be empty)')
option('docdir', type : 'string', value : 'doc',
description: 'Base directory for documentation installation (can be empty)')
-option('gettext', type : 'boolean', value : true)
-option('sdl', type : 'feature', value : 'auto')
-option('sdl_image', type : 'feature', value : 'auto')
-option('u2f', type : 'feature', value : 'auto')
-option('vnc', type : 'feature', value : 'enabled')
-option('vnc_jpeg', type : 'feature', value : 'auto')
-option('vnc_png', type : 'feature', value : 'auto')
-option('vnc_sasl', type : 'feature', value : 'auto')
-option('xkbcommon', type : 'feature', value : 'auto')
+
+option('gettext', type : 'boolean', value : true,
+ description: 'Localization of the GTK+ user interface')
+
+option('sdl', type : 'feature', value : 'auto',
+ description: 'SDL user interface')
+option('sdl_image', type : 'feature', value : 'auto',
+ description: 'SDL Image support for icons')
+option('u2f', type : 'feature', value : 'auto',
+ description: 'U2F emulation support')
+option('vnc', type : 'feature', value : 'enabled',
+ description: 'VNC server')
+option('vnc_jpeg', type : 'feature', value : 'auto',
+ description: 'JPEG lossy compression for VNC server')
+option('vnc_png', type : 'feature', value : 'auto',
+ description: 'PNG compression for VNC server')
+option('vnc_sasl', type : 'feature', value : 'auto',
+ description: 'SASL authentication for VNC server')
+option('xkbcommon', type : 'feature', value : 'auto',
+ description: 'xkbcommon support')
--
2.26.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PULL 25/26] Makefile: Add back TAGS/ctags/cscope rules
2020-09-01 17:38 [PULL v2 00/26] Meson changes for 2020-09-01 Paolo Bonzini
2020-09-01 17:38 ` [PULL 10/26] meson: move zlib detection to meson Paolo Bonzini
2020-09-01 17:38 ` [PULL 24/26] meson: add description to options Paolo Bonzini
@ 2020-09-01 17:38 ` Paolo Bonzini
2020-09-01 17:38 ` [PULL 26/26] Makefile: Fix in-tree clean/distclean Paolo Bonzini
2020-09-02 12:51 ` [PULL v2 00/26] Meson changes for 2020-09-01 Peter Maydell
4 siblings, 0 replies; 6+ messages in thread
From: Paolo Bonzini @ 2020-09-01 17:38 UTC (permalink / raw)
To: qemu-devel; +Cc: Greg Kurz
From: Greg Kurz <groug@kaod.org>
It is a bit of a pain to be forced to run configure before being able
to use cscope and friends. Add back the rules to build them in-tree
as before commit a56650518f5b.
Fixes: a56650518f5b ("configure: integrate Meson in the build system")
Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <159897001005.442705.16516671603870288336.stgit@bahia.lan>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
Makefile | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index c1a93c66a0..049e2ffa03 100644
--- a/Makefile
+++ b/Makefile
@@ -62,7 +62,7 @@ ninja-distclean::
build.ninja: config-host.mak
Makefile.ninja: build.ninja ninjatool
- ./ninjatool -t ninja2make --omit clean dist uninstall < $< > $@
+ ./ninjatool -t ninja2make --omit clean dist uninstall cscope TAGS ctags < $< > $@
-include Makefile.ninja
${ninja-targets-c_COMPILER} ${ninja-targets-cpp_COMPILER}: .var.command += -MP
@@ -229,6 +229,22 @@ distclean: clean ninja-distclean
rm -f linux-headers/asm
rm -Rf .sdk
+.PHONY: ctags
+ctags:
+ rm -f tags
+ find "$(SRC_PATH)" -name '*.[hc]' -exec ctags --append {} +
+
+.PHONY: TAGS
+TAGS:
+ rm -f TAGS
+ find "$(SRC_PATH)" -name '*.[hc]' -exec etags --append {} +
+
+.PHONY: cscope
+cscope:
+ rm -f "$(SRC_PATH)"/cscope.*
+ find "$(SRC_PATH)/" -name "*.[chsS]" -print | sed -e 's,^\./,,' > "$(SRC_PATH)/cscope.files"
+ cscope -b -i"$(SRC_PATH)/cscope.files"
+
# Needed by "meson install"
export DESTDIR
--
2.26.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PULL 26/26] Makefile: Fix in-tree clean/distclean
2020-09-01 17:38 [PULL v2 00/26] Meson changes for 2020-09-01 Paolo Bonzini
` (2 preceding siblings ...)
2020-09-01 17:38 ` [PULL 25/26] Makefile: Add back TAGS/ctags/cscope rules Paolo Bonzini
@ 2020-09-01 17:38 ` Paolo Bonzini
2020-09-02 12:51 ` [PULL v2 00/26] Meson changes for 2020-09-01 Peter Maydell
4 siblings, 0 replies; 6+ messages in thread
From: Paolo Bonzini @ 2020-09-01 17:38 UTC (permalink / raw)
To: qemu-devel; +Cc: Greg Kurz
From: Greg Kurz <groug@kaod.org>
Doing 'make clean' or 'make distclean' in a freshly cloned tree results in:
make: *** No rule to make target 'ninja-clean', needed by 'clean'. Stop.
Make the fallback rules global. While here, change the ninjatool recipe to
always have a zero exit status and thus prevent make to emit a warning.
Fixes: a56650518f5b ("configure: integrate Meson in the build system")
Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <159897001659.442705.15538955005543395950.stgit@bahia.lan>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
Makefile | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/Makefile b/Makefile
index 049e2ffa03..ed354c43b0 100644
--- a/Makefile
+++ b/Makefile
@@ -54,13 +54,6 @@ export NINJA=./ninjatool
# enough to prime the rest of the build.
ninjatool: build.ninja
-# Only needed in case Makefile.ninja does not exist.
-.PHONY: ninja-clean ninja-distclean clean-ctlist
-clean-ctlist:
-ninja-clean::
-ninja-distclean::
-build.ninja: config-host.mak
-
Makefile.ninja: build.ninja ninjatool
./ninjatool -t ninja2make --omit clean dist uninstall cscope TAGS ctags < $< > $@
-include Makefile.ninja
@@ -115,6 +108,13 @@ ifneq ($(filter-out $(UNCHECKED_GOALS),$(MAKECMDGOALS)),$(if $(MAKECMDGOALS),,fa
endif
endif
+# Only needed in case Makefile.ninja does not exist.
+.PHONY: ninja-clean ninja-distclean clean-ctlist
+clean-ctlist:
+ninja-clean::
+ninja-distclean::
+build.ninja: config-host.mak
+
include $(SRC_PATH)/rules.mak
# lor is defined in rules.mak
@@ -195,7 +195,7 @@ recurse-clean: $(addsuffix /clean, $(ROM_DIRS))
######################################################################
clean: recurse-clean ninja-clean clean-ctlist
- -test -f ninjatool && ./ninjatool $(if $(V),-v,) -t clean
+ if test -f ninjatool; then ./ninjatool $(if $(V),-v,) -t clean; fi
# avoid old build problems by removing potentially incorrect old files
rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h
find . \( -name '*.so' -o -name '*.dll' -o -name '*.[oda]' \) -type f \
--
2.26.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PULL v2 00/26] Meson changes for 2020-09-01
2020-09-01 17:38 [PULL v2 00/26] Meson changes for 2020-09-01 Paolo Bonzini
` (3 preceding siblings ...)
2020-09-01 17:38 ` [PULL 26/26] Makefile: Fix in-tree clean/distclean Paolo Bonzini
@ 2020-09-02 12:51 ` Peter Maydell
4 siblings, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2020-09-02 12:51 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: QEMU Developers
On Tue, 1 Sep 2020 at 18:41, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> The following changes since commit 2f4c51c0f384d7888a04b4815861e6d5fd244d75:
>
> Merge remote-tracking branch 'remotes/kraxel/tags/usb-20200831-pull-request' into staging (2020-08-31 19:39:13 +0100)
>
> are available in the Git repository at:
>
> https://gitlab.com/bonzini/qemu.git tags/for-upstream
>
> for you to fetch changes up to 9f5d95976895132976d9d6c14e7a35781d6f1e15:
>
> Makefile: Fix in-tree clean/distclean (2020-09-01 12:11:00 -0400)
>
> v1->v2: add Greg's cscope patches, fix static build, fix option typo
>
> ----------------------------------------------------------------
> meson fixes:
> * bump submodule to 0.55.1
> * SDL, pixman and zlib fixes
> * firmwarepath fix
> * fix firmware builds
>
> meson related:
> * move install to Meson
> * move NSIS to Meson
> * do not make meson use cmake
> * add description to options
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/5.2
for any user-visible changes.
-- PMM
^ permalink raw reply [flat|nested] 6+ messages in thread