Commit ed3cd2b9 authored by Michal Berger's avatar Michal Berger Committed by Jim Harris
Browse files

pkgdep/git: [qemu] Ignore address-of-packed-member errors



Also, disable docs building since it fails on newer GCCs (>=10).
Last but not least, move all the -Wno-error flags to a separate
array to make code a bit clearer.

Change-Id: Ieb6d30778140c745a8c9f0ccd83bf4acd3a0acd5
Signed-off-by: default avatarMichal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5004


Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent dbd140b2
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -186,9 +186,14 @@ function install_qemu() {
	fi

	declare -a opt_params=("--prefix=/usr/local/qemu/$SPDK_QEMU_BRANCH")
	declare -a extra_cflags=()

	opt_params+=("--disable-docs")
	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")
		extra_cflags+=("-Wno-error=stringop-truncation" "-Wno-error=deprecated-declarations")
		extra_cflags+=("-Wno-error=incompatible-pointer-types" "-Wno-error=format-truncation")
		extra_cflags+=("-Wno-error=address-of-packed-member")
		opt_params+=("--disable-glusterfs")
	fi

@@ -199,6 +204,7 @@ function install_qemu() {
			opt_params+=("--with-git='tsocks git'")
		fi
	fi
	opt_params+=("--extra-cflags=${extra_cflags[*]}")

	sed -i s@git://git.qemu.org/@https://github.com/qemu/@g "$GIT_REPOS/qemu/$SPDK_QEMU_BRANCH/.gitmodules"
	sed -i s@git://git.qemu.org/@https://github.com/qemu/@g "$GIT_REPOS/qemu/$SPDK_QEMU_BRANCH/.git/config"