!4 lxcfs: add secure compile options

Merge pull request !4 from zhangsong234/Fix/add-secure-compile-options
This commit is contained in:
openeuler-ci-bot 2020-02-03 21:06:12 +08:00 committed by Gitee
commit 5e7706bcb7
2 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,13 @@
diff --git a/Makefile.am b/Makefile.am
index ac6066d..f85646a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -10,6 +10,8 @@ AM_LDFLAGS = $(FUSE_LIBS) -pthread
#AM_CFLAGS += -DDEBUG
AM_CFLAGS += -DRUNTIME_PATH=\"$(RUNTIME_PATH)\"
+AM_CFLAGS += -Wl,-z,now -fPIE
+AM_LDFLAGS += -Wl,-z,now -pie
liblxcfs_la_SOURCES = macro.h bindings.c cpuset.c bindings.h
liblxcfs_la_CFLAGS = $(AM_CFLAGS)

View File

@ -31,6 +31,7 @@ Patch9018: 0018-lxcfs-add-proc-partitions.patch
Patch9019: 0019-use-bitwise-operators-only-on-unsigned.patch
Patch9020: 0020-lxcfs-proc_diskstats_read-func-obtain-data-from-blki.patch
Patch9021: 0021-remove-securec-functions.patch
Patch9022: 0022-add-secure-compile-option-in-Makefile.patch
#Dependency
BuildRequires: autoconf automake libtool help2man