VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile
index 3e8a9e3..fa4a4eb 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -287,6 +287,18 @@ ifeq "$(shell uname -s)" "FreeBSD"
CC := cc
CXX := c++
+
+ ifeq "$(TC_BUILD_CONFIG)" "Release"
+ C_CXX_FLAGS += -fdata-sections -ffunction-sections -fpie
+ LFLAGS += -Wl,--gc-sections -pie
+
+ ifneq "$(shell ld --help 2>&1 | grep sysv | wc -l)" "0"
+ LFLAGS += -Wl,--hash-style=sysv
+ endif
+
+ WXCONFIG_CFLAGS += -fpie -fPIC
+ WXCONFIG_CXXFLAGS += -fpie -fPIC
+ endif
ifeq "$(SIMD_SUPPORTED)" "1"
CFLAGS += -msse2 -maes