This adds Clang/LLVM support to ports/Mk/. For port users: PREFER_CLANG Defining this results in the use of Clang/LLVM if a port defines CLANG_SAFE FORCE_CLANG Defining this results in the use of Clang/LLVM unless a port defines CLANG_UNSAFE Note that setting PREFER_CLANG or FORCE_CLANG only has an effect if clang is available. For port developers: CLANG_PREFERRED Defining this results in the use of clang if available CLANG_SAFE Defining this allows the use of clang if the user defines PREFER_CLANG CLANG_UNSAFE Defining this prohibits the use of clang even if the user defined FORCE_CLANG USE_CLANG Defining this results in the use of clang and a build dependency if clang is not available from the base system CLANG_* and USE_CLANG should be set to a version string. Each macro only has an effect if the available version of clang matches the string. Fix: --- ports/Mk.orig/bsd.port.mk 2011-10-30 15:18:11.000000000 +0100 +++ ports/Mk/bsd.port.mk 2011-10-30 16:54:58.000000000 +0100 @@ -1686,6 +1686,11 @@ .include "${PORTSDIR}/Mk/bsd.gcc.mk" .endif +.if defined(USE_CLANG) || defined(CLANG_PREFERRED) \ + || defined(PREFER_CLANG) || defined(FORCE_CLANG) +.include "${PORTSDIR}/Mk/bsd.clang.mk" +.endif + .if defined(USE_BINUTILS) && !defined(DISABLE_BINUTILS) BUILD_DEPENDS+= ${LOCALBASE}/bin/as:${PORTSDIR}/devel/binutils BINUTILS?= ADDR2LINE AR AS CPPFILT GPROF LD NM OBJCOPY OBJDUMP RANLIB \ Patch attached with submission follows:
Add bsd.port.mk inclusion patch, because it didn't trigger the GNATS magic in the OP. -- A: Because it fouls the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail?
State Changed From-To: open->suspended portmgr territory. This should be discussed on the mailing list prior to reopening it. Thanks for looking into this. I'm sure portmgr will have a lot more to say - I know they did with my version of a similar patch ;)
Responsible Changed From-To: freebsd-ports-bugs->portmgr portmgr territory. This should be discussed on the mailing list prior to reopening it. Thanks for looking into this. I'm sure portmgr will have a lot more to say - I know they did with my version of a similar patch ;)
We now have compiler.mk, do we still need bsd.clang.mk regards, Bapt
On 29/12/2013 00:43, Baptiste Daroussin wrote: > We now have compiler.mk, do we still need bsd.clang.mk Due to the deployment of cc=clang in FreeBSD 10 it's obsolete, as far as I'm concerned. Regards -- A: Because it fouls the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail?
State Changed From-To: suspended->closed close by submitter request.