libwebsockets: add secure compile options
Signed-off-by: Li Feng <lifeng2221dd1@zoho.com.cn>
This commit is contained in:
parent
0949fee89a
commit
9d8052e51a
26
0003-add-fs-secure-compile-options.patch
Normal file
26
0003-add-fs-secure-compile-options.patch
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
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
|
||||||
|
|
||||||
@ -1,13 +1,14 @@
|
|||||||
Name: libwebsockets
|
Name: libwebsockets
|
||||||
Version: 4.0.20
|
Version: 4.0.20
|
||||||
Release: 4
|
Release: 5
|
||||||
Summary: A lightweight C library for Websockets
|
Summary: A lightweight C library for Websockets
|
||||||
License: LGPLv2 and Public Domain and BSD and MIT and zlib
|
License: LGPLv2 and Public Domain and BSD and MIT and zlib
|
||||||
URL: https://libwebsockets.org
|
URL: https://libwebsockets.org
|
||||||
Source0: https://github.com/warmcat/libwebsockets/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
Source0: https://github.com/warmcat/libwebsockets/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
Patch9000: 0001-add-secure-compile-option-in-Makefile.patch
|
Patch9000: 0001-add-secure-compile-option-in-Makefile.patch
|
||||||
Patch9001: 0002-cmake-remove-unused-headfile-directory.patch
|
Patch9001: 0002-cmake-remove-unused-headfile-directory.patch
|
||||||
|
Patch9002: 0003-add-fs-secure-compile-options.patch
|
||||||
|
|
||||||
BuildRequires: cmake openssl-devel zlib-devel libev-devel git
|
BuildRequires: cmake openssl-devel zlib-devel libev-devel git
|
||||||
|
|
||||||
@ -97,6 +98,12 @@ find %{buildroot} -name '*_static.pc' -exec rm -f {} ';'
|
|||||||
%doc changelog README.md READMEs/
|
%doc changelog README.md READMEs/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue 16 Mar 2021 lifeng <lifeng68@huawei.com> - 4.0.20-5
|
||||||
|
- Type:bugfix
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC: add secure compile options
|
||||||
|
|
||||||
* Fri 19 Feb 2021 lifeng <lifeng68@huawei.com> - 4.0.20-4
|
* Fri 19 Feb 2021 lifeng <lifeng68@huawei.com> - 4.0.20-4
|
||||||
- Type:bugfix
|
- Type:bugfix
|
||||||
- ID:NA
|
- ID:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user