Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 May 2017 07:06:11 +0000 (UTC)
From:      Mark Linimon <linimon@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r440867 - head/www/mod_spdy
Message-ID:  <201705140706.v4E76B7u088136@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: linimon
Date: Sun May 14 07:06:11 2017
New Revision: 440867
URL: https://svnweb.freebsd.org/changeset/ports/440867

Log:
  Commit a workaround for archs with no clang in base.  This avoids
  the warning '"clang --version" returned non-zero status' when doing
  operations such as 'make describe'.
  
  I have been running with this patch on sparc64 for quite some time.
  It has also been tested on powerpc64, and for harmlessness on amd64.
  
  Arguably, this is a something missing in the infrastructure.
  
  Approved by:	portmgr (tier-2 blanket)

Modified:
  head/www/mod_spdy/Makefile

Modified: head/www/mod_spdy/Makefile
==============================================================================
--- head/www/mod_spdy/Makefile	Sun May 14 06:58:48 2017	(r440866)
+++ head/www/mod_spdy/Makefile	Sun May 14 07:06:11 2017	(r440867)
@@ -46,15 +46,26 @@ SUB_LIST+=	APACHEMODDIR=${APACHEMODDIR}
 
 OPTIONS_DEFINE=	GCC DEBUG
 
+# workaround for archs with no clang in base, part 1:
+# do not include the option to turn GCC off.  Instead, force its use.
+OPTIONS_EXCLUDE_sparc64=	GCC
+
 .include <bsd.port.options.mk>
 
-.if ${PORT_OPTIONS:MGCC}
+# workaround for archs with no clang in base, part 2
+.if ${PORT_OPTIONS:MGCC} || ${ARCH} == sparc64
+FORCE_GCC=	yes
+.else
+FORCE_GCC=	no
+.endif
+
+.if ${FORCE_GCC} == yes
 BUILD_DEPENDS+=	${LOCALBASE}/bin/as:devel/binutils
 CONFIGURE_ENV+=	COMPILER_PATH=${LOCALBASE}/bin
 MAKE_ENV+=	COMPILER_PATH=${LOCALBASE}/bin
 .endif
 
-.if ${PORT_OPTIONS:MGCC}
+.if ${FORCE_GCC} == yes
 USE_GCC?=	yes
 GYP_DEFINES+=	gcc_version=${CXX:S/g++//}
 .else
@@ -103,7 +114,7 @@ post-patch:
 		-e 's,%%FILESDIR%%,${FILESDIR},g' \
 			-e 's,%%OPENSSLBASE%%,${OPENSSLBASE},g' \
 			${WRKSRC}/build_modssl_with_npn.sh
-.if ${PORT_OPTIONS:MGCC}
+.if ${FORCE_GCC} == yes
 	@${REINPLACE_CMD} -e 's,%%GCCCXXFLAGS%%,-I${LOCALBASE}/lib/gcc${CXX:S/g++//}/include,g' \
 		-e 's,%%GCCLDFLAGS%%,-L${LOCALBASE}/lib/gcc${CXX:S/g++//},g' \
 			${WRKSRC}/Makefile



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