From 8fe3775c701ddf68fdbc7e3cc8d403bc350a8b1b Mon Sep 17 00:00:00 2001
From: Li Feng <lifeng2221dd1@zoho.com.cn>
Date: Tue, 16 Mar 2021 09:30:01 +0800
Subject: [PATCH] add fs secure compile options

Signed-off-by: Li Feng <lifeng2221dd1@zoho.com.cn>
---
 CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 822a041..afcc3cc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -353,7 +353,7 @@ set(LWS_LIBRARY_VERSION_PATCH ${CPACK_PACKAGE_VERSION_PATCH})
 
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/")
 
-set(CMAKE_C_FLAGS "-Wl,-z,now ${CMAKE_C_FLAGS}")
+set(CMAKE_C_FLAGS "-Wl,-z,now -fPIC -fstack-protector-all -D_FORTIFY_SOURCE=2 -O2 -Wall -rdynamic ${CMAKE_C_FLAGS}")
 
 message(STATUS "CMAKE_TOOLCHAIN_FILE='${CMAKE_TOOLCHAIN_FILE}'")
 
-- 
2.25.1

