opa-psm2/Add-D_FORTIFY_SOURCE-compile-option.patch
lyn1001 0aad106fc0 Add D_FORTIFY_SOURCE compile option
(cherry picked from commit 8fa31860176771a0c3ad63d1ed34901724fec41b)
2023-09-04 18:25:00 +08:00

13 lines
431 B
Diff

diff -Nur a/buildflags.mak b/buildflags.mak
--- a/buildflags.mak 2018-05-08 03:44:29.000000000 +0800
+++ b/buildflags.mak 2023-09-04 19:15:30.274937794 +0800
@@ -141,7 +141,7 @@
#
# feature test macros for drand48_r
#
-BASECFLAGS += -D_DEFAULT_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE
+BASECFLAGS += -D_DEFAULT_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE -D_FORTIFY_SOURCE=2
ifneq (,${HFI_BRAKE_DEBUG})
BASECFLAGS += -DHFI_BRAKE_DEBUG