ports/186373: [PATCH] lang/v8: Fix build when >= 10.0 and no clang
Mathieu Arnold
mat at FreeBSD.org
Sun Feb 2 14:40:00 UTC 2014
>Number: 186373
>Category: ports
>Synopsis: [PATCH] lang/v8: Fix build when >= 10.0 and no clang
>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: Sun Feb 02 14:40:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator: Mathieu Arnold
>Release: FreeBSD 10.0-RELEASE i386
>Organization:
Absolight
>Environment:
System: FreeBSD aragorn.in.absolight.net 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Fri Jan 17 01:46:25 UTC
>Description:
On some architectures, there's no clang, like on mips, and it breaks package buildings:
root at pkg:/usr/ports/lang/v8-devel # make -V PKGNAME
make: "/usr/ports/lang/v8-devel/Makefile" line 38: warning: String comparison operator should be either == or !=
make: "/usr/ports/lang/v8-devel/Makefile" line 38: Malformed conditional (${_CLANG} >= 33)
make: Fatal errors encountered -- cannot continue
make: stopped in /usr/ports/lang/v8-devel
The lang/v8 only gives out a warning, but would not compile in the end because
it would try to use clang++ which doesnt exist:
root at pkg:/usr/ports/lang/v8 # make -V PKGNAME
clang: not found
make: "/usr/ports/lang/v8/Makefile" line 27: warning: Couldn't read shell's output for "clang --version | /usr/bin/head -1 | /usr/bin/sed -e 's/.*clang version \([0-9]\)\.\([0-9]\).*/\1\2/'"
v8-3.18.5
This little patch fixes both, though, you may be better of adding USES=compiler
and test for COMPILER_TYPE.
Generated with FreeBSD Port Tools 0.99_11 (mode: change, diff: SVN)
>How-To-Repeat:
>Fix:
Index: lang/v8/Makefile
===================================================================
--- lang/v8/Makefile (revision 342297)
+++ lang/v8/Makefile (working copy)
@@ -23,7 +23,7 @@
.include <bsd.port.pre.mk>
-.if ${CC:T:Mclang} == "clang" || ${CXX:T:Mclang++} == "clang++" || ${OSVERSION} >= 1000024
+.if ${CC:T:Mclang} == "clang" || ${CXX:T:Mclang++} == "clang++" || (${OSVERSION} >= 1000024 && exists(/usr/bin/clang))
_CLANG!= clang --version | ${HEAD} -1 | ${SED} -e 's/.*clang version \([0-9]\)\.\([0-9]\).*/\1\2/'
MAKE_ENV+= LINK=clang++
CFLAGS+= -Wno-unused-private-field
Index: lang/v8-devel/Makefile
===================================================================
--- lang/v8-devel/Makefile (revision 341832)
+++ lang/v8-devel/Makefile (working copy)
@@ -30,7 +30,7 @@
.include <bsd.port.pre.mk>
-.if ${CC:T:Mclang} == "clang" || ${CXX:T:Mclang++} == "clang++" || ${OSVERSION} >= 1000024
+.if ${CC:T:Mclang} == "clang" || ${CXX:T:Mclang++} == "clang++" || (${OSVERSION} >= 1000024 && exists(/usr/bin/clang))
_CLANG!= ${CC} --version | ${HEAD} -1 | ${SED} -e 's/.*clang version \([0-9]\)\.\([0-9]\).*/\1\2/'
MAKE_ENV+= LINK=clang++ AR=/usr/bin/ar
MAKE_ARGS+= clang=on
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list