Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 09 Nov 2018 19:24:45 +0100
From:      Jan Beich <jbeich@FreeBSD.org>
To:        Steve Wills <swills@FreeBSD.org>
Cc:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   Re: svn commit: r484532 - in head/devel/yosys: . files
Message-ID:  <ftwa-85xu-wny@FreeBSD.org>
In-Reply-To: <201811091731.wA9HVvr5094957@repo.freebsd.org> (Steve Wills's message of "Fri, 9 Nov 2018 17:31:57 %2B0000 (UTC)")
References:  <201811091731.wA9HVvr5094957@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Steve Wills <swills@FreeBSD.org> writes:

> @@ -30,7 +29,19 @@ GH_TAGNAME=	bab39eacce5c17c42d50a3a60a67cc8a9ee52d98
>  BINARY_ALIAS=	python3=${PYTHON_CMD} tclsh=${TCLSH}
>  MAKE_ARGS=	ABCEXTERNAL=abc
>  
> +.include <bsd.port.pre.mk>
> +
> +.if ${ARCH:Mmips*} || ${ARCH:Mpowerpc*} || ${ARCH} == sparc64
> +EXTRA_PATCHES=	${PATCHDIR}/extra-patch-Makefile
> +.endif
> +
> +post-patch:
> +.if ${ARCH:Mmips*} || ${ARCH:Mpowerpc*} || ${ARCH} == sparc64
> +	${REINPLACE_CMD} -e 's|%%GCC_DEFAULT%%|${GCC_DEFAULT}|' \
> +		${WRKSRC}/Makefile
> +.endif
> +

Looks more complicated than necessary. Try my patch at the end.

> + else ifeq ($(CONFIG),gcc)
> +-CXX = gcc
> ++CXX = g++%%GCC_DEFAULT%%
> + LD = gcc

gcc refers to /usr/bin/gcc unless lang/gcc is installed. USE_GCC implied
by USES=compiler:c++11-lang doesn't pull lang/gcc nor adjust PATH.

Index: devel/yosys/Makefile
===================================================================
--- devel/yosys/Makefile	(revision 484532)
+++ devel/yosys/Makefile	(working copy)
@@ -29,19 +29,12 @@ GH_TAGNAME=	bab39eacce5c17c42d50a3a60a67cc8a9ee52d
 BINARY_ALIAS=	python3=${PYTHON_CMD} tclsh=${TCLSH}
 MAKE_ARGS=	ABCEXTERNAL=abc
 
-.include <bsd.port.pre.mk>
-
-.if ${ARCH:Mmips*} || ${ARCH:Mpowerpc*} || ${ARCH} == sparc64
-EXTRA_PATCHES=	${PATCHDIR}/extra-patch-Makefile
-.endif
-
 post-patch:
-.if ${ARCH:Mmips*} || ${ARCH:Mpowerpc*} || ${ARCH} == sparc64
-	${REINPLACE_CMD} -e 's|%%GCC_DEFAULT%%|${GCC_DEFAULT}|' \
+	${REINPLACE_CMD} -e '/^CXX =/d; s/^LD = .*/LD = $$(CXX)/' \
+		-e '/^CONFIG/s/clang/${CHOSEN_COMPILER_TYPE}/' \
 		${WRKSRC}/Makefile
-.endif
 
 post-install:
 	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/yosys
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
Index: devel/yosys/files/extra-patch-Makefile
===================================================================
--- devel/yosys/files/extra-patch-Makefile	(revision 484532)
+++ devel/yosys/files/extra-patch-Makefile	(nonexistent)
@@ -1,23 +0,0 @@
---- Makefile.orig	2018-05-13 11:27:14 UTC
-+++ Makefile
-@@ -1,6 +1,6 @@
- 
--CONFIG := clang
--# CONFIG := gcc
-+# CONFIG := clang
-+CONFIG := gcc
- # CONFIG := gcc-4.8
- # CONFIG := emcc
- # CONFIG := mxe
-@@ -145,9 +145,9 @@ endif
- endif
- 
- else ifeq ($(CONFIG),gcc)
--CXX = gcc
-+CXX = g++%%GCC_DEFAULT%%
- LD = gcc
--CXXFLAGS += -std=c++11 -Os
-+CXXFLAGS += -std=c++11
- 
- else ifeq ($(CONFIG),gcc-4.8)
- CXX = gcc-4.8



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