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

Submitted by Andrey Vagin on March 1, 2018, 10:21 p.m.

Details

Message ID 20180301222118.9665-1-avagin@virtuozzo.com
State New
Series "criu: add -fprofile-update=atomic for builds with gcov"
Headers show

Commit Message

Andrey Vagin March 1, 2018, 10:21 p.m.
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.

Reported-by: Mr Travis CI
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/Makefile b/Makefile
index 6cdda4630..bdfb55b26 100644
--- a/Makefile
+++ b/Makefile
@@ -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),)