summaryrefslogtreecommitdiffstats
path: root/do_freebsd.sh
diff options
context:
space:
mode:
Diffstat (limited to 'do_freebsd.sh')
-rwxr-xr-xdo_freebsd.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/do_freebsd.sh b/do_freebsd.sh
index 0e857570926..25dc2f5df65 100755
--- a/do_freebsd.sh
+++ b/do_freebsd.sh
@@ -14,6 +14,14 @@ fi
# To test with a new release Clang, use with cmake:
# -D CMAKE_CXX_COMPILER="/usr/local/bin/clang++-devel" \
# -D CMAKE_C_COMPILER="/usr/local/bin/clang-devel" \
+COMPILE_FLAGS="-O0 -g"
+if [ `sysctl -n kern.osreldate` -le 1102000 ]; then
+ # We need to use the llvm linker for linking ceph-dencoder
+ COMPILE_FLAGS="$COMPILE_FLAGS -fuse-ld=/usr/bin/ld.lld"
+fi
+CMAKE_CXX_FLAGS_DEBUG="$CXX_FLAGS_DEBUG $COMPILE_FLAGS"
+CMAKE_C_FLAGS_DEBUG="$C_FLAGS_DEBUG $COMPILE_FLAGS"
+
#
# On FreeBSD we need to preinstall all the tools that are required for building
# dashboard, because versions fetched are not working on FreeBSD.
@@ -27,8 +35,8 @@ fi
./do_cmake.sh "$*" \
-D WITH_CCACHE=ON \
-D CMAKE_BUILD_TYPE=Debug \
- -D CMAKE_CXX_FLAGS_DEBUG="$CXX_FLAGS_DEBUG -O0 -g" \
- -D CMAKE_C_FLAGS_DEBUG="$C_FLAGS_DEBUG -O0 -g" \
+ -D CMAKE_CXX_FLAGS_DEBUG="$CXX_FLAGS_DEBUG" \
+ -D CMAKE_C_FLAGS_DEBUG="$C_FLAGS_DEBUG" \
-D ENABLE_GIT_VERSION=OFF \
-D WITH_SYSTEM_BOOST=ON \
-D WITH_SYSTEM_NPM=ON \