File: perf-tools-support-extra-cxxflags.patch

package info (click to toggle)
linux 6.12.43-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,676,260 kB
  • sloc: ansic: 25,921,022; asm: 269,579; sh: 136,424; python: 65,440; makefile: 55,721; perl: 37,752; xml: 19,284; cpp: 5,895; yacc: 4,927; lex: 2,939; awk: 1,594; sed: 28; ruby: 25
file content (30 lines) | stat: -rw-r--r-- 1,086 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From: Ben Hutchings <benh@debian.org>
Date: Mon, 15 May 2023 15:58:39 +0200
Subject: perf tools: Support EXTRA_CXXFLAGS

Add support for an EXTRA_CXXFLAGS variable, used similarly to
EXTRA_CFLAGS.

Signed-off-by: Ben Hutchings <benh@debian.org>
---
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -18,6 +18,7 @@ detected_var = $(shell echo "$(1)=$($(1)
 
 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)
--- 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.