From 69532dcd4ac40e18f4c07420c8f45422d2a37891 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 15 May 2023 15:58:39 +0200 Subject: [PATCH] perf tools: Support EXTRA_CXXFLAGS Add support for an EXTRA_CXXFLAGS variable, used similarly to EXTRA_CFLAGS. Signed-off-by: Ben Hutchings Gbp-Pq: Topic bugfix/all Gbp-Pq: Name perf-tools-support-extra-cxxflags.patch --- tools/perf/Makefile.config | 1 + tools/perf/Makefile.perf | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index f0f11767fee..43fbc0ef793 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -18,6 +18,7 @@ detected_var = $(shell echo "$(1)=$($(1))" >> $(OUTPUT).config-detected) CFLAGS := $(EXTRA_CFLAGS) $(filter-out -Wnested-externs,$(EXTRA_WARNINGS)) HOSTCFLAGS := $(filter-out -Wnested-externs,$(EXTRA_WARNINGS)) +CXXFLAGS := $(EXTRA_CXXFLAGS) # Enabled Wthread-safety analysis for clang builds. ifeq ($(CC_NO_CLANG), 0) diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 6898206af4c..6df0aeddc13 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -33,7 +33,7 @@ include ../scripts/utilities.mak # # Define LDFLAGS=-static to build a static binary. # -# Define EXTRA_CFLAGS=-m64 or EXTRA_CFLAGS=-m32 as appropriate for cross-builds. +# Define EXTRA_CFLAGS=-m64 or EXTRA_CFLAGS=-m32 as appropriate for cross-builds, and similarly EXTRA_CXXFLAGS. # # Define EXCLUDE_EXTLIBS=-lmylib to exclude libmylib from the auto-generated # EXTLIBS. -- 2.30.2