Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Sep 2009 20:35:44 +1100
From:      "Dima Panov" <fluffy@FreeBSD.org>
To:        "FreeBSD gnats submit" <FreeBSD-gnats-submit@FreeBSD.org>
Subject:   ports/139207: devel/llvm: some options, use -fPIC on 64-bit platforms
Message-ID:  <1254130544.47614@Fluffy.Khv.RU>
Resent-Message-ID: <200909280940.n8S9e205071377@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         139207
>Category:       ports
>Synopsis:       devel/llvm: some options, use -fPIC on 64-bit platforms
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Sep 28 09:40:02 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Dima Panov
>Release:        FreeBSD 9.0-900002-CURRENT amd64
>Organization:
Fluffy.Khv.RU 
>Environment:


System: FreeBSD 9.0-900002-CURRENT #0: Sat Sep 26 00:03:35 VLAST 2009
    fluffy@Fluffy.Khv.RU:/usr/obj/usr/src/sys/Spot



>Description:


devel/llvm: some options, use -fPIC on 64-bit platforms

for upcoming OpenCTL port llvm need to be built without assertions.

btw, fix -fPIC - on 64-bit platforms flag needs to be exist to generate correct object codes.



>How-To-Repeat:





>Fix:


--- llvm.diff begins here ---
--- devel/llvm/Makefile	2009-03-05 07:01:09.000000000 +1000
+++ /usr/ports/devel/llvm/Makefile	2009-09-28 19:38:51.000000000 +1100
@@ -7,6 +7,7 @@
 
 PORTNAME=	llvm
 PORTVERSION=	2.5
+PORTREVISION=	1
 CATEGORIES=	devel lang
 MASTER_SITES=	http://llvm.org/releases/${PORTVERSION}/
 
@@ -44,12 +45,24 @@
 		llvm-prof.1 llvm-ranlib.1 llvmc.1 llvmgcc.1 \
 		llvmgxx.1 opt.1 tblgen.1
 
+OPTIONS=	NO_ASSERTS	"Disable assertions (needed by graphics/opengtl)" off
+
 .include <bsd.port.pre.mk>
 
 .if ${ARCH} == "sparc64"
 BROKEN=		Does not compile on sparc64
 .endif
 
+.if ${ARCH} == "amd64" || ${ARCH} == "ia64"
+CFLAGS+=	-fPIC
+.endif
+
+.ifdef(WITH_NO_ASSERTS)
+CONFIGURE_ARGS+=	--disable-assertions
+.else
+CONFIGURE_ARGS+=	--enable-assertions
+.endif
+
 post-patch:
 	${REINPLACE_CMD} -e 's|\(PROJ_docsdir.*:=\).*$$|\1${DOCSDIR}|g' \
 	    ${WRKSRC}/Makefile.config.in
--- llvm.diff ends here ---



>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1254130544.47614>