configure: avoid compiling qemu-keymap by default
PATCH 1/1 configure: avoid compiling qemu-keymap by default
qemu-keymap is not needed with linux-user, so disable it by default if tools are disabled (tools are disabled by default with linux-user).
Avoid this error with statically linked binaries:
Linking target qemu-keymap
/usr/bin/ld: cannot find -lxkbcommon
--- configure | 5 +++++ 1 file changed, 5 insertions(+)
configure +5 -0
@@ -3448,6 +3448,11 @@ fi ########################################## # xkbcommon probe +if test -z "$xkbcommon"; then + if test "$want_tools" = "no"; then + xkbcommon=no + fi +fi if test "$xkbcommon" != "no" ; then if $pkg_config xkbcommon --exists; then xkbcommon_cflags=$($pkg_config xkbcommon --cflags)
Signature · 1 line
2.26.2
Hi Laurent, there are two ways to do this in Meson without having to add more special casing in configure.
The simplest is to build qemu-keymap by default only if have_tools. This is a one-liner adding the "build_by_default: have_tools" argument.
The second is to move the detection of xkbcommon to Meson, and putting it under "if have_system || have_tools", that is where meson.build has the qemu-keymap executable you do
xkbcommon = not_found
if have_system || have_tools
xkbcommon = ...
endif
if xkbcommon.found()
qemu_keymap = ...
endif
and CONFIG_XKBCOMMON can also be replaced by xkbcommon.found().
This is a bit more complicated but all the parts are explained in docs/devel/build-system.rst.
Feel free to pick the simplest of the two, I just explained both just in case. When I am back I can also explain you on IRC the way I translated the syscall_nr.h generator.
Thanks,
Paolo
Il dom 23 ago 2020, 22:32 <[email protected]> ha scritto:
Quoted 35 lines
qemu-keymap is not needed with linux-user, so disable it by default if tools are disabled (tools are disabled by default with linux-user).
Avoid this error with statically linked binaries:
Linking target qemu-keymap
/usr/bin/ld: cannot find -lxkbcommonSigned-off-by Laurent Vivier <[email protected]>--- configure | 5 +++++ 1 file changed, 5 insertions(+)configure +5
-1@@ -3448,6 +3448,11 @@ fi ########################################## # xkbcommon probe +if test -z "$xkbcommon"; then + if test "$want_tools" = "no"; then + xkbcommon=no + fi +fi if test "$xkbcommon" != "no" ; then if $pkg_config xkbcommon --exists; then xkbcommon_cflags=$($pkg_config xkbcommon --cflags) --2.26.2