1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/qemu/qemu.conf
3 # Copyright (C) 2004 - 2024 The T2 SDE Project
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License version 2.
10 # --- T2-COPYRIGHT-NOTE-END ---
14 var_remove_regex confopt ' ' '--host=.*'
15 var_remove_regex makeopt ' ' 'CPP=.*'; unset CPP
17 if atstage cross; then
18 export PKG_CONFIG=pkg-config
19 var_append extraconfopt ' ' "--cross-prefix=$arch_target-"
20 var_append SYSCC_WRAPPER_APPEND ' ' "$(PKG_CONFIG_PATH=$SYSPKG_CONFIG_PATH /usr/bin/pkg-config glib-2.0 --cflags --libs-only-L)"
23 if [ "$SDECFG_PKG_QEMU_ALL" = 0 ]; then
24 qemu_arch=$(echo $arch_machine | arch2uname)
25 qemu_arch=${qemu_arch/i?86/i386}
26 var_append extraconfopt ' ' \
27 "--target-list=$qemu_arch-softmmu,$qemu_arch-linux-user"
29 # does not build due to *64 variants
30 [ "$SDECFG_LIBC" = musl ] && var_append confopt ' ' --target-list-exclude=linux-user
34 alpha|hppa*|ia64|m68k|sparc*)
35 var_append extraconfopt ' ' --enable-tcg-interpreter ;;
37 # undefined reference to `_restgpr_29_x'
38 var_append GCC_WRAPPER_APPEND ' ' '*/pc-bios/*?-O2:' ;;
40 [ "$SDECFG_X8664_X32" = 1 ] && var_append extraconfopt ' ' --enable-tcg-interpreter
41 [ "$SDECFG_X8664_X32" = 1 ] && var_append patchfiles ' ' "$confdir/*.patch.x32"
43 var_append GCC_WRAPPER_INSERT ' ' "-c?:-L`pkgprefix libdir glib`"
44 # does not correctly locate libX11 itself
45 pkginstalled libx11 && var_append GCC_WRAPPER_INSERT ' ' "-c?:-L`pkgprefix libdir libx11`"
46 pkginstalled virglrenderer && var_append GCC_WRAPPER_INSERT ' ' "-I`pkgprefix includedir virglrenderer`"
47 pkginstalled alsa-lib && var_append extraconfopt ' ' '--audio-drv-list=alsa'
49 # Allow vm networking with "-nic user"
50 var_append confopt ' ' --enable-slirp