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>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7536 (master)
(cherry picked from commit 71b4e2a968
)
Change-Id: I0950ad01e2d8361851e9ac42c556004980e00ff4
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7651
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
c8607790cb
commit
f04c67984b
@ -50,7 +50,10 @@ function ocf_precompile() {
|
||||
function build_native_dpdk() {
|
||||
local external_dpdk_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_base_dir="$(dirname $external_dpdk_dir)"
|
||||
|
||||
@ -64,9 +67,13 @@ function build_native_dpdk() {
|
||||
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
|
||||
|
||||
dpdk_cflags="-fPIC -g -Werror -fcommon"
|
||||
dpdk_cflags="-fPIC -g -fcommon"
|
||||
dpdk_ldflags=""
|
||||
|
||||
if [[ $gcc_version -ge 5 ]]; then
|
||||
dpdk_cflags+=" -Werror"
|
||||
fi
|
||||
|
||||
# the drivers we use
|
||||
# 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
|
||||
|
Loading…
Reference in New Issue
Block a user