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 <dsterba@suse.com>
This commit is contained in:
David Sterba 2024-06-19 05:44:26 +02:00 committed by Qu Wenruo
parent fb58bca82d
commit 6fe958e3d1

View file

@ -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)))