Solved How to force g++, and disable Clang?

Greetings, all.

I'm adding a port that I want to use g++. I'm on RELENG_8, and RELENG_9. So I don't have access to a recent version of clang to experiment with. So any attempt to make it compatible with clang would be pure guesswork.

How can I force the build with g++? Or more accurately, how can I prevent the use of clang? I've looked at /usr/ports/MK/Uses/compiler.mk. But can't quite unwind the conditionals for use with this port. I've also read the Porters Handbook.

Here's the relevant part of the Makefile
Code:
do-build:
.for P in ${PROGRAMS}
    ${CXX} ${CXXLAGS} ${WRKSRC}/${P}.cc -o ${WRKSRC}/${P}
.endfor

do-install:
.for P in ${PROGRAMS}
    ${INSTALL_PROGRAM} ${WRKSRC}/$P ${STAGEDIR}${PREFIX}/bin
.endfor

.include <bsd.port.mk>
It currently builds and installs perfectly on FreeBSD 8 and FreeBSD 9. But because clang is default for >= 10 it fails on anything newer than 9.

Thank you for any and all pointers, or solutions.

--Chris
 
Back
Top