devtools: allow warnings in ABI reference build
authorThomas Monjalon <thomas@monjalon.net>
Wed, 20 May 2020 09:52:25 +0000 (11:52 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 21 May 2020 13:41:49 +0000 (15:41 +0200)
There is no point in forcing warning-free compilation when building
an ABI reference. It is only preventing from compiling ABI reference
of old releases with recent compilers.

Note: DPDK 20.02 is built (with warnings) by GCC 10 if using -fcommon.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
devtools/test-build.sh
devtools/test-meson-builds.sh

index 6e53f86..f013656 100755 (executable)
@@ -68,8 +68,6 @@ J=$DPDK_MAKE_JOBS
 builds_dir=${DPDK_BUILD_TEST_DIR:-.}
 short=false
 unset verbose
-# for ABI checks, we need debuginfo
-test_cflags="-Wfatal-errors -g"
 while getopts hj:sv ARG ; do
        case $ARG in
                j ) J=$OPTARG ;;
@@ -248,7 +246,7 @@ for conf in $configs ; do
        config $dir $target $options
 
        echo "================== Build $conf"
-       ${MAKE} -j$J EXTRA_CFLAGS="$test_cflags $DPDK_DEP_CFLAGS" \
+       ${MAKE} -j$J EXTRA_CFLAGS="-Wfatal-errors -g $DPDK_DEP_CFLAGS" \
                EXTRA_LDFLAGS="$DPDK_DEP_LDFLAGS" $verbose O=$dir
        ! $short || break
        export RTE_TARGET=$target
@@ -282,7 +280,7 @@ for conf in $configs ; do
                        echo -n "================== Build $conf "
                        echo "($DPDK_ABI_REF_VERSION)"
                        ${MAKE} -j$J \
-                               EXTRA_CFLAGS="$test_cflags $DPDK_DEP_CFLAGS" \
+                               EXTRA_CFLAGS="-Wno-error -g $DPDK_DEP_CFLAGS" \
                                EXTRA_LDFLAGS="$DPDK_DEP_LDFLAGS" $verbose \
                                O=$abirefdir/build
                        export RTE_TARGET=$target
index e8df017..18b874f 100755 (executable)
@@ -74,7 +74,6 @@ config () # <dir> <builddir> <meson options>
                return
        fi
        options=
-       options="$options --werror"
        if echo $* | grep -qw -- '--default-library=shared' ; then
                options="$options -Dexamples=all"
        else
@@ -127,7 +126,7 @@ build () # <directory> <target compiler> <meson options>
        # skip build if compiler not available
        command -v ${CC##* } >/dev/null 2>&1 || return 0
        load_env $targetcc || return 0
-       config $srcdir $builds_dir/$targetdir $*
+       config $srcdir $builds_dir/$targetdir --werror $*
        compile $builds_dir/$targetdir
        if [ -n "$DPDK_ABI_REF_VERSION" ]; then
                abirefdir=${DPDK_ABI_REF_DIR:-reference}/$DPDK_ABI_REF_VERSION