How to determine type of system compiler in port?

Marcus von Appen mva at FreeBSD.org
Tue Jan 21 22:58:50 UTC 2014


On, Tue Jan 21, 2014, Lev Serebryakov wrote:

> Hello, Ports.
>
>   I want to turn off some clang-specific warnings via CFLAGS, as I'm not
> able to patch all places when "dirty" (but valid!) code is used and upstream
> software uses "-Werror"...
>
>   I could not find any mentions of "clang" in bsd.port.mk and COMPILER_TYPE
>  is not defined for ports.

There's an app^^^Uses for it: compiler.mk

Include a USES= compiler in your Makefile (or append compiler to your existing
USES). Afterwards, you can access e.g. COMPILER_TYPE after including
bsd.port.pre.mk.

Take a look at the compiler.mk source file in Mk/Uses/compiler.mk for further
information.

Cheers
Marcus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20140121/970e1cd9/attachment.sig>


More information about the freebsd-ports mailing list