2009-08-12 17:31:45 -04:00
|
|
|
# $OpenBSD: Makefile,v 1.3 2009/08/12 21:31:45 sthen Exp $
|
2009-06-22 18:37:31 -04:00
|
|
|
|
|
|
|
# XXX WORK IN PROGRESS.
|
|
|
|
|
|
|
|
#ONLY_FOR_ARCHS = alpha i386 m68k sparc sparc64 powerpc vax amd64
|
|
|
|
|
|
|
|
ONLY_FOR_ARCHS = i386
|
|
|
|
# amd64 has an -fPIC problem
|
|
|
|
# others unknown at this time
|
|
|
|
|
|
|
|
COMMENT = gcc4 front-end for LLVM
|
|
|
|
|
2009-06-24 16:10:10 -04:00
|
|
|
GCC_V = 4.2.1
|
2009-08-12 17:31:45 -04:00
|
|
|
LLVM_V = 2.6pre20090808
|
2009-06-22 18:37:31 -04:00
|
|
|
DISTNAME = llvm-gcc-4.2-${LLVM_V}.source
|
2009-08-12 17:31:45 -04:00
|
|
|
PKGNAME = ${DISTNAME:S/.source//:S/gcc-/gcc/}
|
|
|
|
EXTRACT_SUFX = .tar.lzma
|
|
|
|
|
|
|
|
do-extract:
|
|
|
|
cd ${WRKDIR} && \
|
|
|
|
lzma -dc ${FULLDISTDIR}/${DISTNAME}${EXTRACT_SUFX} | ${TAR} xf -
|
2009-06-22 18:37:31 -04:00
|
|
|
|
|
|
|
SHARED_LIBS = ssp 0.0 \
|
2009-06-24 16:10:10 -04:00
|
|
|
objc 2.0 \
|
2009-06-22 18:37:31 -04:00
|
|
|
stdc++ 6.9 # XXX not controllable yet
|
|
|
|
|
|
|
|
CATEGORIES = lang devel
|
|
|
|
|
|
|
|
HOMEPAGE = http://www.llvm.org/
|
|
|
|
|
|
|
|
# GPL
|
|
|
|
PERMIT_PACKAGE_CDROM = Yes
|
|
|
|
PERMIT_PACKAGE_FTP = Yes
|
|
|
|
PERMIT_DISTFILES_CDROM =Yes
|
|
|
|
PERMIT_DISTFILES_FTP = Yes
|
|
|
|
|
|
|
|
WANTLIB += c m pthread
|
|
|
|
USE_LIBTOOL = yes
|
|
|
|
|
|
|
|
MASTER_SITES = http://spacehopper.org/mirrors/
|
|
|
|
#MASTER_SITES = http://llvm.org/releases/${LLVM_V}/
|
|
|
|
|
|
|
|
MODULES = gcc4
|
|
|
|
LIB_DEPENDS = elf::devel/libelf
|
|
|
|
BUILD_DEPENDS = :llvm-${LLVM_V}:devel/llvm \
|
|
|
|
::devel/bison
|
|
|
|
MODGCC4_LANGS = c c++
|
|
|
|
MODGCC4_ARCHES =*
|
|
|
|
|
|
|
|
USE_GMAKE = Yes
|
|
|
|
CONFIGURE_STYLE = gnu
|
|
|
|
TARGLIB = ${PREFIX}/lib/llvm-gcc-${LLVM_V}
|
|
|
|
CONFIG = ${MACHINE_ARCH}-unknown-openbsd${OSREV}
|
2009-06-24 16:10:10 -04:00
|
|
|
SUBST_VARS = CONFIG GCC_V LLVM_V
|
2009-06-22 18:37:31 -04:00
|
|
|
CONFIGURE_SCRIPT = ../configure
|
|
|
|
CONFIGURE_ARGS = --verbose \
|
|
|
|
--enable-llvm=${LOCALBASE} \
|
|
|
|
--disable-nls \
|
|
|
|
--with-system-zlib \
|
|
|
|
--disable-libmudflap \
|
|
|
|
--disable-libgomp \
|
|
|
|
--disable-tls \
|
|
|
|
--enable-threads=posix \
|
|
|
|
--program-prefix=llvm- \
|
2009-06-24 16:10:10 -04:00
|
|
|
--enable-languages=c,c++,objc \
|
2009-06-22 18:37:31 -04:00
|
|
|
--with-libiconv-prefix=${LOCALBASE} \
|
|
|
|
--libdir=${TARGLIB} \
|
|
|
|
--with-gxx-include-dir=${TARGLIB}/include/c++ \
|
|
|
|
--libexecdir=${TARGLIB} \
|
|
|
|
--infodir=${PREFIX}/llvm-gcc
|
|
|
|
CONFIGURE_ARGS += --enable-cpp
|
|
|
|
CONFIGURE_ARGS += --with-gnu-as
|
|
|
|
CONFIGURE_ARGS += --with-gnu-ld
|
|
|
|
CONFIGURE_ARGS += ${CONFIGURE_SHARED}
|
|
|
|
|
|
|
|
CONFIGURE_ARGS += --enable-checking
|
|
|
|
|
|
|
|
MODGNU_CONFIG_GUESS_DIRS = ${WRKSRC} ${WRKSRC}/gcc
|
|
|
|
|
|
|
|
WRKDIST = ${WRKDIR}/${DISTNAME:S/.source//}
|
|
|
|
WRKSRC = ${WRKDIST}/obj
|
|
|
|
|
|
|
|
post-extract:
|
|
|
|
@mkdir -p ${WRKSRC}/gcc
|
|
|
|
|
|
|
|
post-install:
|
2009-06-24 16:10:10 -04:00
|
|
|
@chown -R ${BINOWN}:${BINGRP} ${PREFIX}/lib/llvm-gcc-${LLVM_V}/gcc/${CONFIG}/${GCC_V}/include
|
2009-06-22 18:37:31 -04:00
|
|
|
|
|
|
|
.include <bsd.port.mk>
|