tools/rtla: Build with EXTRA_{C,LD}FLAGS
authorBen Hutchings <benh@debian.org>
Sat, 16 Jul 2022 13:00:01 +0000 (15:00 +0200)
committerSalvatore Bonaccorso <carnil@debian.org>
Thu, 1 Sep 2022 07:04:35 +0000 (08:04 +0100)
Forwarded: https://lore.kernel.org/linux-trace-devel/YtLBshz0nMQ7530H@decadent.org.uk/T/

To allow for distributions and other builders to apply hardening
policy and other customisation, append EXTRA_CFLAGS and EXTRA_LDFLAGS
to the corresponding variables.

Signed-off-by: Ben Hutchings <benh@debian.org>
Gbp-Pq: Topic bugfix/all
Gbp-Pq: Name tools-rtla-build-with-extra-c-ld-flags.patch

tools/tracing/rtla/Makefile

index b8fe10d941ce303755fc5b113f8c4b53ae7ac803..f392708c7a1e464ec99f79f0137de90e2d237383 100644 (file)
@@ -30,8 +30,8 @@ WOPTS :=      -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_A
 
 TRACEFS_HEADERS        := $$($(PKG_CONFIG) --cflags libtracefs)
 
-CFLAGS :=      -O -g -DVERSION=\"$(VERSION)\" $(FOPTS) $(MOPTS) $(WOPTS) $(TRACEFS_HEADERS)
-LDFLAGS        :=      -ggdb
+CFLAGS :=      -O -g -DVERSION=\"$(VERSION)\" $(FOPTS) $(MOPTS) $(WOPTS) $(TRACEFS_HEADERS) $(EXTRA_CFLAGS)
+LDFLAGS        :=      -ggdb $(EXTRA_LDFLAGS)
 LIBS   :=      $$($(PKG_CONFIG) --libs libtracefs)
 
 SRC    :=      $(wildcard src/*.c)