From 4ebd8136a83325e67be7a39c9349ec8812aa05c1 Mon Sep 17 00:00:00 2001 From: Don Bright Date: Sun, 22 Sep 2013 05:30:41 -0500 Subject: [PATCH] enable clang for freebsd (tested on freebsd 9) --- libraries/MCAD | 2 +- scripts/setenv-unibuild.sh | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/libraries/MCAD b/libraries/MCAD index 9a958fd1..1cc850b4 160000 --- a/libraries/MCAD +++ b/libraries/MCAD @@ -1 +1 @@ -Subproject commit 9a958fd11b0a6b5f8becd37c4f8a42f585abfcd8 +Subproject commit 1cc850b44914e1863adfaea2d6f9c848bbc514ea diff --git a/scripts/setenv-unibuild.sh b/scripts/setenv-unibuild.sh index d5ccb750..cfcf23d7 100644 --- a/scripts/setenv-unibuild.sh +++ b/scripts/setenv-unibuild.sh @@ -43,9 +43,15 @@ setenv_common() setenv_freebsd() { + echo .... freebsd detected. + echo .... if you have freebsd >9, it is advisable to install + echo .... the clang compiler and re-run this script as + echo .... '. ./scripts/setenv-unibuild.sh clang' setenv_common QMAKESPEC=freebsd-g++ QTDIR=/usr/local/share/qt4 + export QMAKESPEC + export QTDIR } setenv_netbsd() @@ -78,6 +84,17 @@ setenv_linux_clang() echo QMAKESPEC has been modified: $QMAKESPEC } +setenv_freebsd_clang() +{ + export CC=clang + export CXX=clang++ + export QMAKESPEC=freebsd-clang + + echo CC has been modified: $CC + echo CXX has been modified: $CXX + echo QMAKESPEC has been modified: $QMAKESPEC +} + setenv_netbsd_clang() { echo --------------------- this is not yet supported. netbsd 6 lacks @@ -141,6 +158,9 @@ if [ "`uname | grep -i 'linux\|debian'`" ]; then fi elif [ "`uname | grep -i freebsd`" ]; then setenv_freebsd + if [ "`echo $* | grep clang`" ]; then + setenv_freebsd_clang + fi elif [ "`uname | grep -i netbsd`" ]; then setenv_netbsd if [ "`echo $* | grep clang`" ]; then