Commit 3e66125e authored by Andrei Vagin's avatar Andrei Vagin

[v2] criu: add -fprofile-update=atomic for builds with gcov

Sometimes we see errors like this:
criu/cr-restore.gcda:Merge mismatch for function 106

It proabably means that this gcda file was corrupted. According to the
gcc man page, the -fprofile-update=atomic should fix this problem.

v2: this options appered in gcc7, so we need to install it.

Reported-by: Mr Travis CI
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 8d91b2e3
......@@ -5,7 +5,7 @@ cache: ccache
services:
- docker
env:
- TR_ARCH=local GCOV=1
- TR_ARCH=local
- TR_ARCH=local CLANG=1
- TR_ARCH=alpine
- TR_ARCH=fedora-asan
......@@ -22,6 +22,7 @@ env:
- TR_ARCH=docker-test
- TR_ARCH=fedora-rawhide
- TR_ARCH=fedora-rawhide-aarch64
- TR_ARCH=local GCOV=1
matrix:
allow_failures:
- env: TR_ARCH=docker-test
......
......@@ -91,7 +91,7 @@ DEFINES += -D_GNU_SOURCE
WARNINGS := -Wall -Wformat-security
CFLAGS-GCOV := --coverage -fno-exceptions -fno-inline
CFLAGS-GCOV := --coverage -fno-exceptions -fno-inline -fprofile-update=atomic
export CFLAGS-GCOV
ifneq ($(GCOV),)
......
......@@ -20,6 +20,13 @@ travis_prep () {
CC=clang
fi
[ -n "$GCOV" ] && {
apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
apt-get update -yq
apt-get -yq --no-install-suggests --no-install-recommends --force-yes install g++-7
CC=gcc-7
}
# ccache support, only enable for non-GCOV case
if [ "$CCACHE" = "1" -a -z "$GCOV" ]; then
# ccache is installed by default, need to set it up
......@@ -99,7 +106,7 @@ bash ./test/jenkins/criu-inhfd.sh
make -C test/others/mnt-ext-dev/ run
#make -C test/others/exec/ run
make -C test/others/make/ run
make -C test/others/make/ run CC="$CC"
./test/zdtm.py run -t zdtm/static/env00 --sibling
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment