svn commit: r561219 - head/security/libtasn1

Roman Bogorodskiy novel at FreeBSD.org
Mon Jan 11 15:19:10 UTC 2021


Author: novel
Date: Mon Jan 11 15:19:09 2021
New Revision: 561219
URL: https://svnweb.freebsd.org/changeset/ports/561219

Log:
  security/libtasn1: add a workaround for clang 10+
  
  When compiled with clang 10+ and -O[2-9], the resulting package
  fails to parse certificates.
  
  As a workaround, downgrade optimization to -O1.
  
  Upstream issue: https://gitlab.com/gnutls/libtasn1/-/issues/30
  
  PR:		252548
  Reported by:	rozhuk.im at gmail.com

Modified:
  head/security/libtasn1/Makefile

Modified: head/security/libtasn1/Makefile
==============================================================================
--- head/security/libtasn1/Makefile	Mon Jan 11 14:53:03 2021	(r561218)
+++ head/security/libtasn1/Makefile	Mon Jan 11 15:19:09 2021	(r561219)
@@ -3,6 +3,7 @@
 
 PORTNAME=	libtasn1
 PORTVERSION=	4.16.0
+PORTREVISION=	1
 CATEGORIES=	security
 MASTER_SITES=	GNU \
 		GNUPG/gnutls/${PORTNAME}
@@ -14,7 +15,7 @@ LICENSE=	LGPL21+ GPLv3
 LICENSE_COMB=	multi
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-USES=		cpe libtool pathfix pkgconfig
+USES=		cpe libtool pathfix pkgconfig compiler
 USE_CSTD=	c99
 USE_LDCONFIG=	yes
 GNU_CONFIGURE=	yes
@@ -29,8 +30,15 @@ DOCS=		AUTHORS NEWS README.md THANKS doc/TODO \
 		doc/libtasn1.html doc/libtasn1.pdf doc/libtasn1.ps
 INFO=		libtasn1
 
+.include <bsd.port.pre.mk>
+
+# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252548
+.if ${CHOSEN_COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 100
+CFLAGS:=		${CFLAGS:C/-O[2-9]/-O1/g}
+.endif
+
 post-install-DOCS-on:
 	@${MKDIR} ${STAGEDIR}${DOCSDIR}
 	cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${STAGEDIR}${DOCSDIR}
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>


More information about the svn-ports-head mailing list