tools lib symbol: Use -D_FORTIFY_SOURCE=2 for non-debug builds
authorUwe Kleine-König <ukleinek@debian.org>
Mon, 24 Apr 2023 10:28:27 +0000 (12:28 +0200)
committerSalvatore Bonaccorso <carnil@debian.org>
Wed, 16 Jul 2025 07:13:16 +0000 (09:13 +0200)
Forwarded: https://lore.kernel.org/all/20230424102827.58707-1-ukleinek@debian.org/

Commit 160be157eaba ("tool lib symbol: Add Makefile/Build") failed to
define _FORTIFY_SOURCE to 2, probabaly this was cut&pasted from other
Makefiles with the same problem.

Fixes: 160be157eaba ("tool lib symbol: Add Makefile/Build")
Signed-off-by: Uwe Kleine-König <ukleinek@debian.org>
Acked-by: Ian Rogers <irogers@google.com>
Gbp-Pq: Topic bugfix/all
Gbp-Pq: Name tools_lib_symbol_use_d_fortify_source_2_for_non_debug_builds.patch

tools/lib/symbol/Makefile

index 426b845edfaccf56f7c246c281a549c18d0f3919..d33f6f8570b5c086797fa0caf16ba08c44dff60a 100644 (file)
@@ -35,7 +35,7 @@ ifeq ($(DEBUG),0)
 endif
 
 ifeq ($(DEBUG),0)
-  CFLAGS += -D_FORTIFY_SOURCE
+  CFLAGS += -D_FORTIFY_SOURCE=2
 endif
 
 # Treat warnings as errors unless directed not to