enable clang for freebsd (tested on freebsd 9)

issue480
Don Bright 2013-09-22 05:30:41 -05:00
parent c6600f8841
commit 4ebd8136a8
2 changed files with 21 additions and 1 deletions

@ -1 +1 @@
Subproject commit 9a958fd11b0a6b5f8becd37c4f8a42f585abfcd8
Subproject commit 1cc850b44914e1863adfaea2d6f9c848bbc514ea

View File

@ -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