How to handle WITH_CLANG_IS_CC in ports

Tobias Rehbein tobias.rehbein at
Sun Nov 25 11:49:27 UTC 2012

Hi all,

I am the maintainer of ganes/stonesoup. This port builds fine with gcc.
It also builds with clang, if the MAKE_ARGS are tweaked.

Currently I can check for


to know if I have to change the MAKE_ARGS for building with clang or

In CURRENT cc is clang and the environment variable CC is no longer set.
This lets the build of games/stonesoup fail. My question is how to
correctly check if cc is clang or not. My first guess was something
along the lines of

	${CC:T:M*clang*} || (defined(WITH_CLANG_IS_CC) && ${CC:T:Mcc})

but I guess there is some kind of official way to handle this (ideally
warpped in some Mk macro.



More information about the freebsd-ports mailing list