Browse Source

change the configure and build sections

Signed-off-by: Toshaan Bharvani <toshaan@powerel.org>
master
Toshaan Bharvani 2 years ago
parent
commit
0060398ed8
  1. 127
      SPECS/qemu.spec

127
SPECS/qemu.spec

@ -358,65 +358,96 @@ nativebuildarch="aarch64-softmmu" @@ -358,65 +358,96 @@ nativebuildarch="aarch64-softmmu"
emulatedbuildarch="ppc64-softmmu s390x-softmmu sparc64-softmmu x86_64-softmmu mips64-softmmu mips64el-softmmu riscv64-softmmu alpha-softmmu arm-softmmu"
%endif

# native build
./configure \
--prefix=%{_prefix} --libdir=%{_libdir} --sysconfdir=%{_sysconfdir} --interp-prefix=%{_prefix}/qemu-%%M \
--localstatedir=%{_localstatedir} --libexecdir=%{_libexecdir} --with-pkgversion=%{name}-%{version}-%{release} \
--disable-strip --enable-pie --enable-numa --disable-werror --disable-xen --enable-vde --enable-jemalloc --enable-malloc-trim \
--enable-glusterfs --enable-libiscsi --enable-virtfs --enable-rdma --enable-pvrdma --enable-replication --enable-libssh \
--enable-tpm --enable-smartcard --enable-lzo --enable-bzip2 --enable-zstd --enable-libusb --enable-usb-redir --enable-libnfs \
--disable-gtk --disable-vte --disable-brlapi --enable-live-block-migration --enable-mpath --enable-membarrier --enable-libpmem \
--enable-attr --enable-nettle --enable-vhost-scsi --enable-vhost-net --enable-vhost-vsock --enable-vhost-crypto --enable-crypto-afalg \
--enable-linux-aio --enable-vvfat --enable-coroutine-pool --enable-cap-ng --enable-opengl --enable-vhost-vdpa \
--enable-virglrenderer \

configureopts="--prefix=%{_prefix} --libdir=%{_libdir} --sysconfdir=%{_sysconfdir} --interp-prefix=%{_prefix}/qemu-%%M"
configureopts+=" --localstatedir=%{_localstatedir} --libexecdir=%{_libexecdir} --with-pkgversion=%{name}-%{version}-%{release}"
configureopts+=" --disable-strip --enable-pie --disable-werror"
configureopts+=" --enable-numa"
configureopts+=" --disable-xen"
configureopts+=" --enable-vde"
configureopts+=" --enable-jemalloc"
configureopts+=" --enable-glusterfs"
configureopts+=" --enable-libiscsi"
configureopts+=" --enable-virtfs"
configureopts+=" --enable-rdma --enable-pvrdma"
configureopts+=" --enable-replication"
configureopts+=" --enable-libssh
configureopts+=" --enable-tpm"
configureopts+=" --enable-smartcard"
configureopts+=" --enable-lzo --enable-bzip2 --enable-zstd"
configureopts+=" --enable-libusb --enable-usb-redir"
configureopts+=" --enable-libnfs"
configureopts+=" --enable-gtk"
configureopts+=" --enable-vte"
configureopts+=" --enable-brlapi"
configureopts+=" --enable-live-block-migration"
configureopts+=" --enable-mpath"
configureopts+=" --enable-membarrier"
configureopts+=" --enable-libpmem"
configureopts+=" --enable-attr"
configureopts+=" --enable-nettle"
configureopts+=" --enable-vhost-scsi --enable-vhost-net --enable-vhost-vsock --enable-vhost-crypto --enable-vhost-vdpa"
configureopts+=" --enable-vhost-kernel --enable-vhost-user --enable-vhost-user-blk-server"
configureopts+=" --enable-crypto-afalg"
configureopts+=" --enable-linux-aio"
configureopts+=" --enable-vvfat"
configureopts+=" --enable-coroutine-pool"
configureopts+=" --enable-cap-ng"
configureopts+=" --enable-opengl"
configureopts+=" --enable-virglrenderer"
configureopts+=" --enable-debug-info"
configureopts+=" --enable-slirp=system"
configureopts+=" --enable-fuse --enable-fuse-lseek"
configureopts+=" --enable-curses"
configureopts+=" --enable-vnc --enable-vnc-sasl --enable-vnc-png --enable-vnc-jpeg"
configureopts+=" --enable-curl"
configureopts+=" --enable-fdt"
configureopts+=" --enable-u2f"
configureopts+=" --enable-snappy"
configureopts+=" --enable-selinux"
configureopts+=" --enable-seccomp"
configureopts+=" --enable-cloop"
configureopts+=" --enable-virtiofsd"
configureopts+=" --enable-tools"
configureopts+=" --enable-multiprocess"
configureopts+=" --enable-xkbcommon"
configureopts+=" --enable-l2tpv3"
configureopts+=" --enable-libdaxctl"
configureopts+=" --enable-nvmm"
configureopts+=" --audio-drv-list=pa,sdl,alsa,oss"
configureopts+=" --enable-trace-backend=$tracebackends"
configureopts+=" --block-drv-rw-whitelist=qcow2,raw,file,host_device,nbd,iscsi,gluster,rdb,blkdebug,luks,null-co,https,ssh"
configureopts+=" --block-drv-ro-whitelist=vmdk,vhdx,vpc"
configureopts+=" --extra-ldflags='$extraldflags -pie -Wl,-z,relro -Wl,-z,now'"
configureopts+=" --extra-cflags='$cflags -Wall'
configureopts+=" --enable-lto"
configureopts+=" --enable-kvm"
configureopts+=" --enable-tcg --enable-tcg-interpreter"
configureopts+=" --enable-spice --enable-spice-protocol"
configureopts+=" --enable-hax"
%if "%{cpuarch}" == "x86-64-v3"
--enable-avx2 \
configureopts+=" --enable-avx2"
%endif
%if "%{cpuarch}" == "x86-64-v4"
--enable-avx2 --enable-avx512f \
configureopts+=" --enable-avx2 --enable-avx512f"
%endif
--enable-vhost-kernel --enable-debug-info --enable-slirp=system --enable-dmg --enable-lzfse --enable-fuse --enable-fuse-lseek \
--enable-curses --enable-vnc --enable-vnc-sasl --enable-vnc-png --enable-vnc-jpeg --enable-curl --enable-fdt --enable-u2f \
--enable-selinux --enable-seccomp --enable-cloop --enable-virtiofsd --enable-tools --enable-multiprocess \
--enable-vhost-user --enable-vhost-vdpa --enable-vhost-user-blk-server --enable-sparse --enable-snappy \
--enable-xen-pci-passthrough --enable-xkbcommon --enable-l2tpv3 --enable-libdaxctl --enable-nvmm \
--audio-drv-list=pa,sdl,alsa,oss --enable-trace-backend=$tracebackends \
--block-drv-rw-whitelist=qcow2,raw,file,host_device,nbd,iscsi,gluster,rdb,blkdebug,luks,null-co,https,ssh \
--block-drv-ro-whitelist=vmdk,vhdx,vpc \
--extra-ldflags="$extraldflags -pie -Wl,-z,relro -Wl,-z,now" --extra-cflags="$cflags -Wall" --enable-lto \
--target-list="$nativebuildarch" --enable-kvm --enable-tcg --enable-tcg-interpreter --enable-spice --enable-spice-protocol --enable-hax \
"$@"



# native build
./configure --target-list="$nativebuildarch" $configureopts "$@"
make V=1 %{?_smp_mflags} $buildldflags
make DESTDIR=%{buildroot} install

# other archs
./configure \
--prefix=%{_prefix} --libdir=%{_libdir} --sysconfdir=%{_sysconfdir} --interp-prefix=%{_prefix}/qemu-%%M \
--localstatedir=%{_localstatedir} --libexecdir=%{_libexecdir} --with-pkgversion=%{name}-%{version}-%{release} \
--disable-strip --enable-pie --enable-numa --disable-werror --disable-xen --enable-vde --enable-jemalloc --enable-malloc-trim \
--enable-glusterfs --enable-libiscsi --enable-virtfs --enable-rdma --enable-pvrdma --enable-replication --enable-libssh \
--enable-tpm --enable-smartcard --enable-lzo --enable-bzip2 --enable-zstd --enable-libusb --enable-usb-redir --enable-libnfs \
--disable-gtk --disable-vte --disable-brlapi --enable-live-block-migration --enable-mpath --enable-membarrier --enable-libpmem \
--enable-attr --enable-nettle --enable-vhost-scsi --enable-vhost-net --enable-vhost-vsock --enable-vhost-crypto --enable-crypto-afalg \
--enable-linux-aio --enable-vvfat --enable-coroutine-pool --enable-cap-ng --enable-opengl \
--enable-vhost-kernel --enable-debug-info --enable-slirp=system --enable-dmg --enable-lzfse --enable-fuse --enable-fuse-lseek \
--enable-curses --enable-vnc --enable-vnc-sasl --enable-vnc-png --enable-vnc-jpeg --enable-curl --enable-fdt --enable-u2f \
--enable-selinux --enable-seccomp --enable-cloop --enable-virtiofsd --enable-tools --enable-multiprocess \
--enable-vhost-user --enable-vhost-vdpa --enable-vhost-user-blk-server --enable-sparse --enable-snappy \
--enable-xen-pci-passthrough --enable-xkbcommon --enable-l2tpv3 --enable-libdaxctl --enable-nvmm \
--audio-drv-list=pa,sdl,alsa,oss --enable-trace-backend=$tracebackends \
--block-drv-rw-whitelist=qcow2,raw,file,host_device,nbd,iscsi,gluster,rdb,blkdebug,luks,null-co,https,ssh \
--block-drv-ro-whitelist=vmdk,vhdx,vpc \
--extra-ldflags="$extraldflags -pie -Wl,-z,relro -Wl,-z,now" --extra-cflags="$cflags -Wall" --enable-lto \
--target-list="$emulatedbuildarch" --enable-kvm --enable-tcg --enable-tcg-interpreter --enable-spice --enable-spice-protocol --enable-hax \
"$@"
./configure --target-list="$emulatedbuildarch" $configureopts "$@"
make V=1 %{?_smp_mflags} $buildldflags
make DESTDIR=%{buildroot} install

#echo "config-host.mak contents:"
#echo "==="
#cat config-host.mak
#echo "==="
echo "config-host.mak contents:"
echo "==="
cat config-host.mak
echo "==="

gcc %{_sourcedir}/ksmctl.c $cflags -o ksmctl


Loading…
Cancel
Save