Add support for $CCVER="clangsvn"
authorSascha Wildner <saw@online.de>
Wed, 14 Jul 2010 08:14:26 +0000 (10:14 +0200)
committerSascha Wildner <saw@online.de>
Wed, 14 Jul 2010 08:14:26 +0000 (10:14 +0200)
This is for clang/llvm installed from SVN trunk to /usr/local
(which is its default location).

etc/defaults/compilers.conf
lib/libc/Makefile
libexec/customcc/cc.sh

index 54cc1ad..3f38b61 100644 (file)
@@ -1,6 +1,7 @@
 # clang from SVN trunk
 #
 clangsvn_CC=/usr/local/bin/clang
+clangsvn_CXX=${clangsvn_CC}
 clangsvn_CFLAGS="-fno-color-diagnostics -Qunused-arguments -std=gnu89"
 clangsvn_VERSION=4.1.2
 
index 0bf3b7a..2bcdbf3 100644 (file)
@@ -14,7 +14,7 @@ AINC= -I${.OBJDIR} -I${.CURDIR}/${MACHINE_ARCH}
 CLEANFILES+=tags
 PRECIOUSLIB=   yes
 
-.if ${CCVER} != "clang"
+.if ${CCVER} != "clang" && ${CCVER} != "clangsvn"
 DPADD+=        ${LIBGCC}
 LDADD+=        -lgcc
 .endif
index 1829f56..dc6a6b1 100644 (file)
@@ -25,6 +25,16 @@ if [ "${CCVER}" = "clang" ]; then
        elif [ "${CNAME}" = "cc" -o "${CNAME}" = "gcc" ]; then
                exec ${CDIR}/../gcc41/cc $oldargs
        fi
+elif [ "${CCVER}" = "clangsvn" ]; then
+       if [ "${CNAME}" = "cpp" ]; then
+               exec ${CDIR}/../gcc41/cpp "$@"
+       else
+               INCOPT="-nobuiltininc -nostdinc \
+                   -isysroot @@INCPREFIX@@ \
+                   -isystem /usr/include \
+                   -isystem /usr/libdata/gcc41 \
+                   -isystem /usr/include/c++/4.1"
+       fi
 fi
 
 . /etc/defaults/compilers.conf