diff options
author | Max Khon <fjoe@FreeBSD.org> | 2007-07-25 18:56:38 +0000 |
---|---|---|
committer | Max Khon <fjoe@FreeBSD.org> | 2007-07-25 18:56:38 +0000 |
commit | e529eb5f666c368cd70f17003bec0cc7ac4043cb (patch) | |
tree | bda9cf2c5ef67213d0b123526a9bf2f3d7153d75 /lang | |
parent | Use the USE_FIREBIRD macro. (diff) |
New port: llvm-gcc4
lvm-gcc is the LLVM C front end. It is a modified version of gcc
that compiles C/C++/ObjC programs into native objects, LLVM bitcode or
LLVM assembly language, depending upon the options.
By default, llvm-gcc compiles to native objects just like GCC does.
If the -emit-llvm option is given then it will generate LLVM bitcode
files instead. If -S (assembly) is also given, then it will generate
LLVM assembly.
Being derived from the GNU Compiler Collection, llvm-gcc has many of
gcc's features and accepts most of gcc's options. It handles a number
of gcc's extensions to the C programming language.
Notes
Notes:
svn path=/head/; revision=196280
Diffstat (limited to 'lang')
-rw-r--r-- | lang/Makefile | 1 | ||||
-rw-r--r-- | lang/llvm-gcc4/Makefile | 80 | ||||
-rw-r--r-- | lang/llvm-gcc4/distinfo | 3 | ||||
-rw-r--r-- | lang/llvm-gcc4/pkg-descr | 14 | ||||
-rw-r--r-- | lang/llvm-gcc4/pkg-plist | 13 |
5 files changed, 111 insertions, 0 deletions
diff --git a/lang/Makefile b/lang/Makefile index 9741fa2075f3..7b30debf68a7 100644 --- a/lang/Makefile +++ b/lang/Makefile @@ -141,6 +141,7 @@ SUBDIR += linux-j SUBDIR += linux-libg2c SUBDIR += linux-libperl5.8 + SUBDIR += llvm-gcc4 SUBDIR += logo SUBDIR += lua SUBDIR += lua-mode.el diff --git a/lang/llvm-gcc4/Makefile b/lang/llvm-gcc4/Makefile new file mode 100644 index 000000000000..366d9f603e3b --- /dev/null +++ b/lang/llvm-gcc4/Makefile @@ -0,0 +1,80 @@ +# New ports collection makefile for: llvm-gcc4 +# Date created: 25 Jul 2007 +# Whom: Max Khon +# +# $FreeBSD$ +# + +PORTNAME= gcc4 +PORTVERSION= 2.0 +CATEGORIES= devel lang +MASTER_SITES= http://llvm.org/releases/${PORTVERSION}/ +PKGNAMEPREFIX= llvm- +DISTNAME= ${PKGNAMEPREFIX}${PORTNAME}-${PORTVERSION}.source + +MAINTAINER= fjoe@FreeBSD.org +COMMENT= gcc4 frontend for LLVM + +GNU_CONFIGURE= yes +USE_BISON= yes +USE_GMAKE= yes +USE_ICONV= yes +USE_PERL5_BUILD=yes +#flex, gm4, llc + +GCC_VER= 4.0.1 +WRKSRC= ${WRKDIR}/${DISTNAME}/build +TARGLIB= ${PREFIX}/lib/gcc-llvm-${PORTVERSION} +CONFIGURE_SCRIPT= ../configure +CONFIGURE_ARGS= --enable-llvm=${LOCALBASE}\ + --enable-languages=c,c++\ + --disable-nls\ + --with-system-zlib\ + --with-libiconv-prefix=${LOCALBASE}\ + --program-prefix=llvm-\ + --libdir=${TARGLIB}\ + --with-gxx-include-dir=${TARGLIB}/include/c++\ + --libexecdir=${TARGLIB}\ + --infodir=${PREFIX}/llvm-gcc +# --disable-shared +PLIST_SUB= GCC_VER=${GCC_VER}\ + GNU_HOST=${CONFIGURE_TARGET} +INFO= llvm-gcc/cpp \ + llvm-gcc/cppinternals \ + llvm-gcc/gcc \ + llvm-gcc/gccinstall \ + llvm-gcc/gccint + +post-patch: + @${MKDIR} ${WRKSRC} + @${REINPLACE_CMD} -e 's,LLVMBASEPATH/Release/bin/llc,LLVMBASEPATH/bin/llc,'\ + ${WRKSRC}/../gcc/configure\ + ${WRKSRC}/../libcpp/configure + @${REINPLACE_CMD}\ + -e 's,LLVMBINPATH = .*,LLVMBINPATH = @LLVMBASEPATH@/bin,'\ + -e 's,LLVMSRCDIR := .*,LLVMSRCDIR = @LLVMBASEPATH@,'\ + ${WRKSRC}/../gcc/Makefile.in + +post-install: + ${MV} -f ${PREFIX}/include/mf-runtime.h \ + ${TARGLIB}/gcc/${CONFIGURE_TARGET}/4.0.1/include + # Add target libraries and include files to packaging list. + ${RM} -f ${WRKDIR}/PLIST.lib +.for d in ${TARGLIB:S/^${PREFIX}\///} + cd ${PREFIX} ; if [ -d $d ]; then \ + ${FIND} $d -type f -o -type l >>${WRKDIR}/PLIST.lib ;\ + ${FIND} $d -type d | ${SORT} -r \ + | ${SED} -e 's/^/@dirrm /g' >>${WRKDIR}/PLIST.lib ;\ + fi +.endfor + cd ${WRKDIR} ; ${SED} -i -e "/PLIST.lib/ r PLIST.lib" ${TMPPLIST} + +.include <bsd.port.pre.mk> + +.if ${ARCH} == "amd64" +CONFIGURE_TARGET= x86_64-portbld-freebsd${OSREL} +.else +CONFIGURE_TARGET= ${ARCH}-portbld-freebsd${OSREL} +.endif + +.include <bsd.port.post.mk> diff --git a/lang/llvm-gcc4/distinfo b/lang/llvm-gcc4/distinfo new file mode 100644 index 000000000000..8565694b8938 --- /dev/null +++ b/lang/llvm-gcc4/distinfo @@ -0,0 +1,3 @@ +MD5 (llvm-gcc4-2.0.source.tar.gz) = 648b6e1e73d770bbef2712b16a993548 +SHA256 (llvm-gcc4-2.0.source.tar.gz) = 4aa3a4de67ce766bde8c206a8f65886a39e22d91f9b7f0df50456f1994942176 +SIZE (llvm-gcc4-2.0.source.tar.gz) = 36578916 diff --git a/lang/llvm-gcc4/pkg-descr b/lang/llvm-gcc4/pkg-descr new file mode 100644 index 000000000000..1c7890cf797a --- /dev/null +++ b/lang/llvm-gcc4/pkg-descr @@ -0,0 +1,14 @@ +llvm-gcc is the LLVM C front end. It is a modified version of gcc +that compiles C/C++/ObjC programs into native objects, LLVM bitcode or +LLVM assembly language, depending upon the options. + +By default, llvm-gcc compiles to native objects just like GCC does. +If the -emit-llvm option is given then it will generate LLVM bitcode +files instead. If -S (assembly) is also given, then it will generate +LLVM assembly. + +Being derived from the GNU Compiler Collection, llvm-gcc has many of +gcc's features and accepts most of gcc's options. It handles a number +of gcc's extensions to the C programming language. + +WWW: http://llvm.org/ diff --git a/lang/llvm-gcc4/pkg-plist b/lang/llvm-gcc4/pkg-plist new file mode 100644 index 000000000000..b9fdfd60eefd --- /dev/null +++ b/lang/llvm-gcc4/pkg-plist @@ -0,0 +1,13 @@ +@comment $FreeBSD$ +bin/%%GNU_HOST%%-gcc-%%GCC_VER%% +bin/%%GNU_HOST%%-llvm-c++ +bin/%%GNU_HOST%%-llvm-g++ +bin/%%GNU_HOST%%-llvm-gcc +bin/llvm-c++ +bin/llvm-cpp +bin/llvm-g++ +bin/llvm-gcc +bin/llvm-gccbug +bin/llvm-gcov +info/llvm-gcc/dir +@comment Insert PLIST.lib here |