From 6fe958e3d1a8fe71be400de16b4eee96299af009 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Wed, 19 Jun 2024 05:44:26 +0200 Subject: [PATCH] btrfs-progs: build: use thread-safe profile generation flags The CI lcov generation fails due to: Processing ./common/device-utils.gcda geninfo: ERROR: Unexpected negative count '-6' for /home/runner/work/btrfs-progs/btrfs-progs/common/device-utils.h:69. Perhaps you need to compile with '-fprofile-update=atomic (use "geninfo --ignore-errors negative ..." to bypass this error) Use a safer way to gather the profile stats. Signed-off-by: David Sterba --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 79e9b5b3..82dfb1b4 100644 --- a/Makefile +++ b/Makefile @@ -314,8 +314,8 @@ ifeq ("$(origin D)", "command line") endif ifneq (,$(findstring gcov,$(D))) - DEBUG_CFLAGS_INTERNAL += -fprofile-arcs -ftest-coverage --coverage - DEBUG_LDFLAGS_INTERNAL += -fprofile-generate --coverage + DEBUG_CFLAGS_INTERNAL += -fprofile-arcs -fprofile-update=atomic -ftest-coverage --coverage + DEBUG_LDFLAGS_INTERNAL += -fprofile-generate -fprofile-update=atomic --coverage endif ifneq (,$(findstring verbose,$(D)))