A-Tune-BPF-Collection/Add-stack-protector-compile-option.patch

27 lines
656 B
Diff
Raw Normal View History

From 7b9428779bbbff411c802e5c80a3fbdaee8608e9 Mon Sep 17 00:00:00 2001
From: Lv Ying <lvying6@huawei.com>
Date: Tue, 8 Mar 2022 19:06:34 -0800
Subject: [PATCH] Add stack protector compile option
Signed-off-by: Lv Ying <lvying6@huawei.com>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 1e070a6..84ff9fd 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@ CLANG ?= clang -v
VMLINUX ?= vmlinux.h
INCLUDES := -I$(OUTPUT) -I$(dir $(VMLINUX))
-CFLAGS := -g -Wall
+CFLAGS := -g -Wall -fstack-protector-strong
ARCH := $(shell uname -m | sed 's/x86_64/x86/')
APPS = readahead_tune
--
2.27.0