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)
This commit is contained in:
Mark Linimon 2017-05-14 07:06:11 +00:00
parent b8d1e31234
commit 593b411912
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=440867

View File

@ -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