tce-load -i compiletc python3 pulseaudio-dev perl5 sdl2-dev curl-dev libusb-dev Xorg-7.7-3d-dev spice-dev spice-protocol libcacard-dev usbredir-dev libbluetooth-dev libnfs-dev libssh2-dev gnutls35-dev gettext

cd qemu-3.1.0

CC="gcc -mtune=generic -Os -pipe" CXX="g++ -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local --localstatedir=/var --libexecdir=/usr/local/lib/qemu --interp-prefix=/usr/local/share/qemu --audio-drv-list="oss alsa sdl pa" --target-list="i386-softmmu i386-linux-user x86_64-softmmu x86_64-linux-user" --smbd=/usr/local/sbin/smbd --enable-spice --with-sdlabi=2.0 --python=python3

[lto fails]

find . -name config-host.mak -type f -exec sed -i 's/-O2//g' {} \;
find . -name config-host.mak -type f -exec sed -i 's/-m64 -g/-m64/g' {} \;
find . -name config-host.mak -type f -exec sed -i 's/-D_FORTIFY_SOURCE=2 -g/-D_FORTIFY_SOURCE=2/g' {} \;

make [6m 12.05s]
sudo make install

sudo chgrp staff  /usr/local/lib/qemu/qemu-bridge-helper
sudo chmod 4750 /usr/local/lib/qemu/qemu-bridge-helper

Install prefix    /usr/local
BIOS directory    /usr/local/share/qemu
firmware path     /usr/local/share/qemu-firmware
binary directory  /usr/local/bin
library directory /usr/local/lib
module directory  /usr/local/lib/qemu
libexec directory /usr/local/lib/qemu
include directory /usr/local/include
config directory  /usr/local/etc
local state directory   /var
Manual directory  /usr/local/share/man
ELF interp prefix /usr/local/share/qemu
Source path       /usr/src/qemu-3.1.0
GIT binary        git
GIT submodules    
C compiler        gcc -mtune=generic -Os -pipe
Host C compiler   cc
C++ compiler      g++ -mtune=generic -Os -pipe -fno-exceptions -fno-rtti
Objective-C compiler gcc -mtune=generic -Os -pipe
ARFLAGS           rv
CFLAGS            -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -g 
QEMU_CFLAGS       -I/usr/local/include/pixman-1 -I$(SRC_PATH)/dtc/libfdt -DHAS_LIBSSH2_SFTP_FSYNC  -pthread -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -fPIE -DPIE -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv  -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/local/include -I/usr/local/include/p11-kit-1 -I/usr/local/include   -I/usr/local/include/libpng16 -I/usr/local/include -I/usr/local/include/libdrm -I/usr/local/include -pthread -I/usr/local/include/spice-server -I/usr/local/include/cacard -I/usr/local/include/nss -I/usr/local/include/nspr -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -I/usr/local/include/pixman-1 -I/usr/local/include -I/usr/local/include/spice-1 -I$(SRC_PATH)/capstone/include
LDFLAGS           -Wl,--warn-common -Wl,-z,relro -Wl,-z,now -pie -m64 -g 
QEMU_LDFLAGS      -L$(BUILD_DIR)/dtc/libfdt 
make              make
install           install
python            python3 -B
smbd              /usr/local/sbin/smbd
module support    no
host CPU          x86_64
host big endian   no
target list       i386-softmmu i386-linux-user x86_64-softmmu x86_64-linux-user
gprof enabled     no
sparse enabled    no
strip binaries    yes
profiler          no
static build      no
SDL support       yes (2.0.1)
GTK support       yes (3.22.30)
GTK GL support    yes
VTE support       no 
TLS priority      NORMAL
GNUTLS support    yes
libgcrypt         no
nettle            yes (3.4)
libtasn1          yes
curses support    yes
virgl support     no 
curl support      yes
mingw32 support   no
Audio drivers     oss alsa sdl pa
Block whitelist (rw) 
Block whitelist (ro) 
VirtFS support    yes
Multipath support no
VNC support       yes
VNC SASL support  yes
VNC JPEG support  yes
VNC PNG support   yes
xen support       no
brlapi support    no
bluez  support    yes
Documentation     no
PIE               yes
vde support       no
netmap support    no
Linux AIO support no
ATTR/XATTR support yes
Install blobs     yes
KVM support       yes
HAX support       no
HVF support       no
WHPX support      no
TCG support       yes
TCG debug enabled no
TCG interpreter   no
malloc trim support yes
RDMA support      no
PVRDMA support    no
fdt support       git
membarrier        no
preadv support    yes
fdatasync         yes
madvise           yes
posix_madvise     yes
posix_memalign    yes
libcap-ng support no
vhost-net support yes
vhost-crypto support yes
vhost-scsi support yes
vhost-vsock support yes
vhost-user support yes
Trace backends    log
spice support     yes (0.12.13/0.14.0)
rbd support       no
xfsctl support    no
smartcard support yes
libusb            yes
usb net redir     yes
OpenGL support    yes
OpenGL dmabufs    yes
libiscsi support  no
libnfs support    yes
build guest agent yes
QGA VSS support   no
QGA w32 disk info no
QGA MSI support   no
seccomp support   no
coroutine backend ucontext
coroutine pool    yes
debug stack usage no
mutex debugging   no
crypto afalg      no
GlusterFS support no
gcov              gcov
gcov enabled      no
TPM support       yes
libssh2 support   yes
TPM passthrough   yes
TPM emulator      yes
QOM debugging     yes
Live block migration yes
lzo support       no
snappy support    no
bzip2 support     yes
NUMA host support no
libxml2           yes
tcmalloc support  no
jemalloc support  no
avx2 optimization yes
replication support yes
VxHS block device no
bochs support     yes
cloop support     yes
dmg support       yes
qcow v1 support   yes
vdi support       yes
vvfat support     yes
qed support       yes
parallels support yes
sheepdog support  yes
capstone          internal
docker            no
libpmem support   no
libudev           yes
