ports/149746: [PATCH] devel/llvm - disable asserts by default (they appear not to be thread safe)

Alberto Villa avilla at FreeBSD.org
Tue Aug 17 18:10:06 UTC 2010


>Number:         149746
>Category:       ports
>Synopsis:       [PATCH] devel/llvm - disable asserts by default (they appear not to be thread safe)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug 17 18:10:06 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Alberto Villa
>Release:        FreeBSD 9.0-CURRENT
>Organization:
>Environment:
FreeBSD echo.hoth 9.0-CURRENT FreeBSD 9.0-CURRENT #1 r210265: Tue Jul 20 03:02:22 CEST 2010     root at echo.hoth:/usr/obj/usr/src/sys/TPR60  i386
>Description:
i'll paste part of an irc log (full discussion here: https://bugzilla.redhat.com/show_bug.cgi?id=521261#c0)

[09:52] <CyrilleB> rdieter: llvm's asserts aren't thread safe, and therefore
anyone using JIT of llvm in a threaded environment will experience crash
[09:52] <CyrilleB> rdieter: the question is why would anyone want to use
asserts in a production environment :)

i can't guarantee this is correct on freebsd, but i'm the opengtl packager, and i have the same problem described in that bug report
>How-To-Repeat:

>Fix:
disable asserts by default with the following patch (applies to llvm-devel too)

Patch attached with submission follows:

Index: llvm/Makefile
===================================================================
RCS file: /home/pcvs/ports/devel/llvm/Makefile,v
retrieving revision 1.36
diff -u -r1.36 Makefile
--- llvm/Makefile	28 Apr 2010 21:05:02 -0000	1.36
+++ llvm/Makefile	17 Aug 2010 18:00:24 -0000
@@ -7,6 +7,7 @@
 
 PORTNAME=	llvm
 PORTVERSION=	2.7
+PORTREVISION=	1
 CATEGORIES=	devel lang
 MASTER_SITES=	http://llvm.org/releases/${PORTVERSION}/
 EXTRACT_SUFX=	.tgz
@@ -38,7 +39,7 @@
 
 CONFIGURE_ARGS+=	--enable-bindings=none
 
-OPTIONS=	NO_ASSERTS	"Disable assertions" off
+OPTIONS=	ASSERTS	"Enable assertions (thread unsafe)" off
 
 .if defined(NOPORTDOCS)
 DOCSRCDIR=
@@ -70,10 +71,10 @@
 CONFIGURE_ARGS+=	--with-optimize-option=-O2
 .endif
 
-.ifdef(WITH_NO_ASSERTS)
-CONFIGURE_ARGS+=	--disable-assertions
-.else
+.ifdef(WITH_ASSERTS)
 CONFIGURE_ARGS+=	--enable-assertions
+.else
+CONFIGURE_ARGS+=	--disable-assertions
 .endif
 
 post-patch:
Index: llvm-devel/Makefile
===================================================================
RCS file: /home/pcvs/ports/devel/llvm-devel/Makefile,v
retrieving revision 1.46
diff -u -r1.46 Makefile
--- llvm-devel/Makefile	17 Jun 2010 17:35:56 -0000	1.46
+++ llvm-devel/Makefile	17 Aug 2010 18:00:25 -0000
@@ -7,6 +7,7 @@
 
 PORTNAME=	llvm
 DISTVERSION=	2.8.r${SVN_REV}
+PORTREVISION=	1
 CATEGORIES=	devel lang
 MASTER_SITES=	${MASTER_SITE_LOCAL}
 MASTER_SITE_SUBDIR=	brooks
@@ -47,7 +48,7 @@
 
 CONFIGURE_ARGS+=	--enable-bindings=none
 
-OPTIONS=	NO_ASSERTS "Disable assertions" off
+OPTIONS=	ASSERTS "Enable assertions (thread unsafe)" off
 
 MAN1=		bugpoint.1 clang.1 lit.1 llc.1 lli.1 llvmc.1 llvm-ar.1 \
 		llvm-as.1 llvm-bcanalyzer.1 llvm-config.1 \
@@ -78,10 +79,10 @@
 CONFIGURE_ARGS+=	--with-optimize-option=-O2
 .endif
 
-.ifdef(WITH_NO_ASSERTS)
-CONFIGURE_ARGS+=	--disable-assertions
-.else
+.ifdef(WITH_ASSERTS)
 CONFIGURE_ARGS+=	--enable-assertions
+.else
+CONFIGURE_ARGS+=	--disable-assertions
 .endif
 
 .if defined(BOOTSTRAP) || defined(SVN_FETCH)


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



More information about the freebsd-ports-bugs mailing list