Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Jun 2015 09:36:29 +0200
From:      Tijl Coosemans <tijl@FreeBSD.org>
To:        John Marino <marino@FreeBSD.org>
Cc:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   Re: svn commit: r388183 - in head/cad/ghdl: . files
Message-ID:  <20150601093629.41a94dd8@kalimero.tijl.coosemans.org>
In-Reply-To: <201505312358.t4VNwDSm071397@svn.freebsd.org>
References:  <201505312358.t4VNwDSm071397@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 31 May 2015 23:58:13 +0000 (UTC) John Marino <marino@FreeBSD.org> wrote:
> Author: marino
> Date: Sun May 31 23:58:12 2015
> New Revision: 388183
> URL: https://svnweb.freebsd.org/changeset/ports/388183
> 
> Log:
>   cad/ghdl: Add option to use experimental LLVM backend
>   
>   The LLVM backend builds much faster assuming clang35 and llvm35
>   are already available.  It probably builds on FreeBSD's base clang but
>   not ports llvm36.  In any case, the alternative backend does not
>   pass the testsuite on FreeBSD (fails at test 825).
>   
>   The LLVM back is the default backend for DragonFly which allows the
>   port to build, but it fails the very first test (fails to lock mutex).
>   There's no need to bump -- for FreeBSD this should package the same
>   as it did before.
> 
> Added:
>   head/cad/ghdl/files/patch-src_grt_config_linux.c   (contents, props changed)
>   head/cad/ghdl/llvm-plist   (contents, props changed)
> Modified:
>   head/cad/ghdl/Makefile
> 
> Modified: head/cad/ghdl/Makefile
> ==============================================================================
> --- head/cad/ghdl/Makefile	Sun May 31 22:56:44 2015	(r388182)
> +++ head/cad/ghdl/Makefile	Sun May 31 23:58:12 2015	(r388183)
> @@ -16,10 +16,7 @@ LIB_DEPENDS=	libgmp.so:${PORTSDIR}/math/
>  		libmpfr.so:${PORTSDIR}/math/mpfr \
>  		libmpc.so:${PORTSDIR}/math/mpc
>  
> -USES=		ada gmake iconv libtool perl5
> -USE_PERL5=	build
> -INFO=		ghdl
> -
> +USES=		ada gmake
>  USE_GITHUB=	yes
>  GH_ACCOUNT=	hanzer
>  GH_PROJECT=	GHDL
> @@ -27,17 +24,14 @@ GH_TAGNAME=	a88ac1c
>  
>  GNU_CONFIGURE=	yes
>  GCCVER=		4.9.2
> +LLVMVER=	35
>  SRCDISTFILE=	hanzer-GHDL-${PORTVERSION}-${GH_TAGNAME}_GH0.tar.gz
> -GCCDISTFILE=	gcc-${GCCVER}.tar.bz2
>  BLD_TARGET=	${ARCH:S/amd64/x86_64/}-portbld-${OPSYS:tl}${OSREL:R}
>  BUILDDIR=	${WRKDIR}/build
>  GCCSRCDIR=	${WRKDIR}/gcc-${GCCVER}
>  CFG_SCRIPT=	${GCCSRCDIR}/configure
>  PKG_PREFIX=	${PREFIX}/ghdl
>  LINKER_COMMAND=	${LOCALBASE}/gcc-aux/bin/gcc
> -PLIST_SUB=	GLEX=ghdl/libexec/gcc/${BLD_TARGET}/${GCCVER} \
> -		GLIB=ghdl/lib/gcc/${BLD_TARGET}/${GCCVER} \
> -		TARGET=${BLD_TARGET}
>  
>  GHDL_ARGS=	--enable-languages="c,vhdl" \
>  		--build=${BLD_TARGET} \
> @@ -56,16 +50,27 @@ GHDL_ARGS=	--enable-languages="c,vhdl" \
>  		--enable-threads=posix \
>  		${ICONV_CONFIGURE_ARG} ${EXTRA_CONFIG}
>  
> -.include <bsd.port.pre.mk>
> +OPTIONS_SINGLE=		BACKEND
> +OPTIONS_SINGLE_BACKEND=	GCC LLVM
> +
> +GCC_DESC=		Code generator is GCC  (mature)
> +LLVM_DESC=		Code generator is LLVM (experimental)
> +
> +.if exists (/sbin/hammer)
> +OPTIONS_DEFAULT=	LLVM
> +PLIST_SUB=		DRAGONFLY="" FREEBSD="@comment "
> +.else
> +OPTIONS_DEFAULT=	GCC
> +PLIST_SUB=		DRAGONFLY="@comment " FREEBSD=""
> +.endif
> +
> +.include <bsd.port.options.mk>

I think it would be better to add support for OPTIONS_DEFAULT_${OPSYS}
in bsd.options.mk (like OPTIONS_DEFAULT_${ARCH}) so you don't need
exists(/sbin/hammer).



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