Skip to content

Commit

Permalink
btrfs-progs: build: use thread-safe profile generation flags
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
kdave committed Jun 19, 2024
1 parent 1dfd256 commit d61f8c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down

0 comments on commit d61f8c4

Please sign in to comment.