From 342b8636d839b93cc1fad1ecf48650116c1edf99 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sun, 9 Jul 2017 23:41:53 +0200 Subject: Add support for building under FreeBSD 11 --- src/Makefile | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/Makefile') 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 -- cgit v1.2.3