autobuild: build mainline DPDK with -Werror only for GCC > 5

DPDK now officially supports only GCC > 4.9.0.
Some older systems like Centos7  (gcc 4.8.5) can still
build DPDK, but sometimes fail due to -Werror enabled.
Disable this option to increase build success chance.

Fixes #1891

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I0950ad01e2d8361851e9ac42c556004980e00ff4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7536
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
Karol Latecki 2021-04-21 18:34:08 +02:00 committed by Tomasz Zawadzki
parent 8af74b5ac7
commit 71b4e2a968

View File

@ -51,7 +51,10 @@ function ocf_precompile() {
function build_native_dpdk() { function build_native_dpdk() {
local external_dpdk_dir local external_dpdk_dir
local external_dpdk_base_dir local external_dpdk_base_dir
local gcc_version
gcc_version=$(gcc -dumpversion)
gcc_version=${gcc_version//./}
external_dpdk_dir="$SPDK_RUN_EXTERNAL_DPDK" external_dpdk_dir="$SPDK_RUN_EXTERNAL_DPDK"
external_dpdk_base_dir="$(dirname $external_dpdk_dir)" external_dpdk_base_dir="$(dirname $external_dpdk_dir)"
@ -65,9 +68,13 @@ function build_native_dpdk() {
git clone --branch $SPDK_TEST_NATIVE_DPDK --depth 1 http://dpdk.org/git/dpdk "$external_dpdk_base_dir" git clone --branch $SPDK_TEST_NATIVE_DPDK --depth 1 http://dpdk.org/git/dpdk "$external_dpdk_base_dir"
git -C "$external_dpdk_base_dir" log --oneline -n 5 git -C "$external_dpdk_base_dir" log --oneline -n 5
dpdk_cflags="-fPIC -g -Werror -fcommon" dpdk_cflags="-fPIC -g -fcommon"
dpdk_ldflags="" dpdk_ldflags=""
if [[ $gcc_version -ge 5 ]]; then
dpdk_cflags+=" -Werror"
fi
# the drivers we use # the drivers we use
# net/i40e driver is not really needed by us, but it's built as a workaround # net/i40e driver is not really needed by us, but it's built as a workaround
# for DPDK issue: https://bugs.dpdk.org/show_bug.cgi?id=576 # for DPDK issue: https://bugs.dpdk.org/show_bug.cgi?id=576