VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2017-07-09 23:41:53 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2017-07-10 00:14:18 +0200
commit342b8636d839b93cc1fad1ecf48650116c1edf99 (patch)
treeb885eed277aee69c7ae4c60770a666654e01f41b /src/Makefile
parente27314954190a57f87d3b2dc3bf6911df70cb7ab (diff)
downloadVeraCrypt-342b8636d839b93cc1fad1ecf48650116c1edf99.tar.gz
VeraCrypt-342b8636d839b93cc1fad1ecf48650116c1edf99.zip
Add support for building under FreeBSD 11
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 3e8a9e32..fa4a4ebf 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