Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf build: Avoid defining _FORTIFY_SOURCE multiple times

One in perf's CFLAGS and the other in the distro python binding
scripts.

So if use the usual technique of first -D_FORTIFY_SOURCE then -D it.

Noticed with:

opensuse tumbleweed:

gcc version 12.1.1 20220629 [revision 7811663964aa7e31c3939b859bbfa2e16919639f] (SUSE Linux)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

+1 -1
+1 -1
tools/perf/Makefile.config
··· 342 342 343 343 ifeq ($(DEBUG),0) 344 344 ifeq ($(feature-fortify-source), 1) 345 - CORE_CFLAGS += -D_FORTIFY_SOURCE=2 345 + CORE_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 346 346 endif 347 347 endif 348 348