summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUnsung Lee <unsung.lee@samsung.com>2023-11-25 21:14:47 +0900
committerUnsung Lee <unsung.lee@samsung.com>2023-11-28 11:24:23 +0900
commit4105c482a9099a782b8274c1cfa361aec57d0c2a (patch)
tree9e6e4ea0ed9e004ebd63d12e9854343053bb1e01
parent2f75272cf9fddab613a4c5b6deb8651c43cb8133 (diff)
downloadcryptsetup-4105c482a9099a782b8274c1cfa361aec57d0c2a.tar.gz
cryptsetup-4105c482a9099a782b8274c1cfa361aec57d0c2a.tar.bz2
cryptsetup-4105c482a9099a782b8274c1cfa361aec57d0c2a.zip
Add security compiling option in Makefile.am to support RELRO, SC, and FORTIFY. Change-Id: I5d6c052b897cc392d4c2a1f62a5ac60952c2927e Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
-rw-r--r--Makefile.am9
1 files changed, 6 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am
index 16c0a4d..edbcab3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -12,10 +12,13 @@ AM_CPPFLAGS = \
-DPREFIX=\""$(prefix)"\" \
-DSYSCONFDIR=\""$(sysconfdir)"\" \
-DVERSION=\""$(VERSION)"\" \
- -DEXTERNAL_LUKS2_TOKENS_PATH=\"${EXTERNAL_LUKS2_TOKENS_PATH}\"
-AM_CFLAGS = -Wall -fPIE
+ -DEXTERNAL_LUKS2_TOKENS_PATH=\"${EXTERNAL_LUKS2_TOKENS_PATH}\" \
+ -fstack-protector-strong -D_FORTIFY_SOURCE=2 -O2 -Wl,-z,relro
+AM_CFLAGS = -Wall -fPIE \
+ -fstack-protector-strong -D_FORTIFY_SOURCE=2 -O2 -Wl,-z,relro
AM_CXXFLAGS = -Wall
-AM_LDFLAGS = -pie
+AM_LDFLAGS = -pie \
+ -Wl,-z,relro
if ENABLE_FUZZ_TARGETS
AM_CFLAGS += -fsanitize=fuzzer-no-link