add fs secure compilation option

(cherry picked from commit d65310e767919ac930e32006167d3f04c906be16)
This commit is contained in:
jiangheng 2022-10-22 16:14:02 +08:00 committed by openeuler-sync-bot
parent 5b5a5f9b4b
commit ec13bd89ca
2 changed files with 30 additions and 1 deletions

View File

@ -0,0 +1,25 @@
From c2c7c2f5bbf84f62acc6468113b1f11cdc6b8410 Mon Sep 17 00:00:00 2001
From: jiangheng <jiangheng14@huawei.com>
Date: Sat, 22 Oct 2022 16:05:37 +0800
Subject: [PATCH] add fs secure compilation option
---
src/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Makefile b/src/Makefile
index 1676a71..f445601 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -4,7 +4,7 @@ ROOT_DIR := $(dir $(abspath $(LWIP_DIR)))
LWIP_INC = $(LWIP_DIR)/include
DPDK_INCLUDE_FILE ?= /usr/include/dpdk
-SEC_FLAGS = -fstack-protector-strong -Werror -Wall -Wl,-z,relro,-z,now -Wl,-z,noexecstack -Wtrampolines -fPIC
+SEC_FLAGS = -fstack-protector-strong -Werror -Wall -Wl,-z,relro,-z,now -Wl,-z,noexecstack -Wtrampolines -fPIC -D_FORTIRY_SOURCE=2 -O2
CC = gcc
AR = ar
--
2.23.0

View File

@ -4,7 +4,7 @@
Summary: lwip is a small independent implementation of the TCP/IP protocol suite
Name: lwip
Version: 2.1.3
Release: 23
Release: 24
License: BSD
URL: http://savannah.nongnu.org/projects/lwip/
Source0: http://download.savannah.nongnu.org/releases/lwip/%{name}-%{version}.tar.gz
@ -47,6 +47,7 @@ Patch9031: 0032-fix-free-pbuf-miss-data.patch
Patch9032: 0033-alloc-socket-fail-clean-sock.patch
Patch9033: 0034-add-accept4-and-epoll_create1.patch
Patch9034: 0035-add-writev-and-readv.patch
Patch9035: 0036-add-fs-secure-compilation-option.patch
BuildRequires: gcc-c++ dos2unix dpdk-devel
@ -75,6 +76,9 @@ cd %{_builddir}/%{name}-%{version}/src
%{_libdir}/liblwip.a
%changelog
* Sat Oct 22 2022 jiangheng<jiangheng14@huawei.com> - 2.1.3-24
- add fs secure compilation option
* Wed Oct 19 2022 zhujunhao<zhujunhao11@huawei.com> - 2.1.3-23
- add writev and readv