mirror of
https://github.com/openvswitch/ovs
synced 2025-08-22 09:58:01 +00:00
ci: Add jobs to test -std=c99 builds.
It should generally be possible to build OVS with mostly c99 standard and without GNU extensions. It's not a pure c99 build, because some non-standard features from POSIX variants are always enabled if available via AC_USE_SYSTEM_EXTENSIONS. Without them we'll not have some essentials like RW locks, for example. '-std=c99' doesn't disable all the GNU extensions, only some of them. It's technically possible to use '-fgnuc-version=0' with clang to fully disable all the extensions, but it is causing build assertions with the version of clang provided in Ubuntu 20.04 in GHA (some issue with packed structures not being correctly packed). We may use this option in the future after the base image upgrade. Acked-by: Eelco Chaudron <echaudro@redhat.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
This commit is contained in:
parent
f0899b1fcb
commit
d910fd8a0f
@ -82,6 +82,10 @@ if [ "$DPDK" ] || [ "$DPDK_SHARED" ]; then
|
||||
install_dpdk
|
||||
fi
|
||||
|
||||
if [ "$STD" ]; then
|
||||
CFLAGS_FOR_OVS="${CFLAGS_FOR_OVS} -std=$STD"
|
||||
fi
|
||||
|
||||
if [ "$CC" = "clang" ]; then
|
||||
CFLAGS_FOR_OVS="${CFLAGS_FOR_OVS} -Wno-error=unused-command-line-argument"
|
||||
elif [ "$M32" ]; then
|
||||
|
6
.github/workflows/build-and-test.yml
vendored
6
.github/workflows/build-and-test.yml
vendored
@ -85,6 +85,7 @@ jobs:
|
||||
LIBS: ${{ matrix.libs }}
|
||||
M32: ${{ matrix.m32 }}
|
||||
OPTS: ${{ matrix.opts }}
|
||||
STD: ${{ matrix.std }}
|
||||
TESTSUITE: ${{ matrix.testsuite }}
|
||||
|
||||
name: linux ${{ join(matrix.*, ' ') }}
|
||||
@ -100,6 +101,11 @@ jobs:
|
||||
- compiler: clang
|
||||
opts: --disable-ssl
|
||||
|
||||
- compiler: gcc
|
||||
std: c99
|
||||
- compiler: clang
|
||||
std: c99
|
||||
|
||||
- compiler: gcc
|
||||
testsuite: test
|
||||
- compiler: clang
|
||||
|
Loading…
x
Reference in New Issue
Block a user