Skip to contentSkip to conversation

tools lib symbol: Use -D_FORTIFY_SOURCE=2 for non-debug builds

PATCH In review Uwe Kleine-König 3 participants 4 messages Apr 24, 2023 – Apr 1, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools lib symbol: Use -D_FORTIFY_SOURCE=2 for non-debug builds

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")
---
 tools/lib/symbol/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/lib/symbol/Makefile +1 -1
index 13d43c6f92b4..4a08cc4e19f2 100644
@@ -39,7 +39,7 @@ endif
 endif
 
 ifeq ($(DEBUG),0)
-  CFLAGS += -D_FORTIFY_SOURCE
+  CFLAGS += -D_FORTIFY_SOURCE=2
 endif
 
 # Treat warnings as errors unless directed not to
Signature · 1 line
2.39.2
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Uwe Kleine-König

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")

Same problem here I think:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/lib/api/Makefile#n42

Thanks,
Ian

Quoted 20 lines
---
 tools/lib/symbol/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/lib/symbol/Makefile +1 -2
index 13d43c6f92b4..4a08cc4e19f2 100644
@@ -39,7 +39,7 @@ endif
 endif
 
 ifeq ($(DEBUG),0)
-  CFLAGS += -D_FORTIFY_SOURCE
+  CFLAGS += -D_FORTIFY_SOURCE=2
 endif
 
 # Treat warnings as errors unless directed not to
--

2.39.2

#2 lore raw
Quoted 10 lines · Ian Rogers
Quoted 7 lines · Uwe Kleine-König

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")

Thanks

Quoted 2 lines

Same problem here I think:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/lib/api/Makefile#n42

Indeed, and similar patch here:

	https://lore.kernel.org/all/[email protected]/

Best regards
Uwe

#3 lore raw
Quoted 11 lines · On Sunday, 30 April 2023 11:11:26 CEST Uwe Kleine-König wrote:
Quoted 9 lines · Ian Rogers
Quoted 6 lines · Uwe Kleine-König

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")
Quoted 8 lines

Thanks

Quoted 3 lines

Same problem here I think:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/to
ols/lib/api/Makefile#n42

Indeed, and similar patch here:

https://lore.kernel.org/all/[email protected]/

I noticed this (and the other linked) patch haven't been merged yet. What's needed to move this forward?