vm_setup: Check for compiler version while compiling QEMU
Since gcc 9.* can be used across different distribution, the old check no longer applies. Instead of looking for ArchLinux, check the gcc's version directly to make sure proper options are added regardless of the distribution (.e.g. Fedora{30,31} is also shipped with gcc 9.* at the moment). Change-Id: Ic493f411e8d886cae9bd5e2f389cb632d7b9f98a Signed-off-by: Michal Berger <michalx.berger@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2432 Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot
This commit is contained in:
parent
5cdab5e2e6
commit
0e79a79df3
@ -26,6 +26,7 @@ UPGRADE=false
|
||||
INSTALL=false
|
||||
CONF="librxe,iscsi,rocksdb,fio,flamegraph,tsocks,qemu,vpp,libiscsi,nvmecli,qat,refspdk"
|
||||
LIBRXE_INSTALL=true
|
||||
gcc_version=$(gcc -dumpversion) gcc_version=${gcc_version%%.*}
|
||||
|
||||
if [ $(uname -s) == "FreeBSD" ]; then
|
||||
OSID="freebsd"
|
||||
@ -263,8 +264,8 @@ function install_qemu() {
|
||||
fi
|
||||
|
||||
declare -a opt_params=("--prefix=/usr/local/qemu/$SPDK_QEMU_BRANCH")
|
||||
if [ "$PACKAGEMNG" = "pacman" ]; then
|
||||
# GCC 9 on ArchLinux fails to compile Qemu due to some old warnings which were not detected by older versions.
|
||||
if ((gcc_version >= 9)); then
|
||||
# GCC 9 fails to compile Qemu due to some old warnings which were not detected by older versions.
|
||||
opt_params+=("--extra-cflags=-Wno-error=stringop-truncation -Wno-error=deprecated-declarations -Wno-error=incompatible-pointer-types -Wno-error=format-truncation")
|
||||
opt_params+=("--disable-glusterfs")
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user