Date: Fri, 17 Dec 2010 15:58:35 +0100 From: Alberto Villa <avilla@freebsd.org> To: ports@freebsd.org Cc: ehaupt@freebsd.org Subject: Re: ccache: support other world compilers Message-ID: <201012171558.40045.avilla@freebsd.org> In-Reply-To: <201012171203.34851.avilla@freebsd.org> References: <201012171203.34851.avilla@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart18208290.TDexKQE2io Content-Type: multipart/mixed; boundary="Boundary-01=_bq3CNHa4dUjRTIz" Content-Transfer-Encoding: 7bit --Boundary-01=_bq3CNHa4dUjRTIz Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Friday 17 December 2010 12:03:30 Alberto Villa wrote: > while i had no problems at building world with world/clang, i've not yet > tested the port installation, but i'll do it as soon as i have a free > tinderbox. meanwhile you can share your comments about the patch fixed and tested patch attached =2D-=20 Alberto Villa, FreeBSD committer <avilla@FreeBSD.org> http://people.FreeBSD.org/~avilla Beware of a dark-haired man with a loud tie. --Boundary-01=_bq3CNHa4dUjRTIz Content-Type: text/x-patch; charset="ISO-8859-1"; name="ccache.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="ccache.diff" Index: Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/pcvs/ports/devel/ccache/Makefile,v retrieving revision 1.57 diff -u -r1.57 Makefile =2D-- Makefile 30 Nov 2010 22:37:33 -0000 1.57 +++ Makefile 17 Dec 2010 14:15:15 -0000 @@ -7,6 +7,7 @@ =20 PORTNAME=3D ccache PORTVERSION=3D 3.1.3 +PORTREVISION=3D 1 CATEGORIES=3D devel MASTER_SITES=3D http://samba.org/ftp/ccache/ CRITICAL =20 @@ -26,7 +27,7 @@ .if !defined(WITHOUT_COMPILER_LINKS) HOWTO=3D ccache-howto-freebsd.txt CCLINKDIR=3D libexec/ccache =2DPLIST_DIRS=3D ${CCLINKDIR} +PLIST_DIRS=3D ${CCLINKDIR} ${CCLINKDIR}/world SUB_FILES=3D ${HOWTO} pkg-message .endif =20 @@ -42,10 +43,10 @@ .if defined(EXTRA_COMPILERS) CCACHE_COMPILERS+=3D ${EXTRA_COMPILERS} .endif =2DWORLD_COMPILERS=3D world-cc world-c++ PLIST_FILES+=3D ${CCACHE_COMPILERS:S|^|${CCLINKDIR}/|} \ =2D ${WORLD_COMPILERS:S|^|${CCLINKDIR}/|} =2DSUB_FILES+=3D ${WORLD_COMPILERS} + ${CCACHE_COMPILERS:S|^|${CCLINKDIR}/world/|} \ + ${CCLINKDIR}/world/ccache +SUB_FILES+=3D world-ccache SUB_LIST+=3D CCACHE_COMPILERS=3D"${CCACHE_COMPILERS}" \ CCLINKDIR=3D"${CCLINKDIR}" \ ICCPREFIX=3D"${LOCALBASE}/intel_cc_80/bin" \ @@ -69,12 +70,11 @@ ${INSTALL_PROGRAM} ${WRKSRC}/ccache ${PREFIX}/bin ${INSTALL_MAN} ${WRKSRC}/${MAN1} ${PREFIX}/man/man1 .if !defined(WITHOUT_COMPILER_LINKS) =2D @${MKDIR} ${PREFIX}/${CCLINKDIR} + @${MKDIR} ${PREFIX}/${CCLINKDIR}/world + ${INSTALL_SCRIPT} ${WRKDIR}/world-ccache ${PREFIX}/${CCLINKDIR}/world/cca= che .for link in ${CCACHE_COMPILERS} ${LN} -sf ${PREFIX}/bin/ccache ${PREFIX}/${CCLINKDIR}/${link} =2D.endfor =2D.for script in ${WORLD_COMPILERS} =2D ${INSTALL_SCRIPT} ${WRKDIR}/${script} ${PREFIX}/${CCLINKDIR} + ${LN} -sf ccache ${PREFIX}/${CCLINKDIR}/world/${link} .endfor .endif .if !defined(NOPORTDOCS) Index: files/ccache-howto-freebsd.txt.in =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/pcvs/ports/devel/ccache/files/ccache-howto-freebsd.txt.in,v retrieving revision 1.13 diff -u -r1.13 ccache-howto-freebsd.txt.in =2D-- files/ccache-howto-freebsd.txt.in 17 Nov 2010 18:41:35 -0000 1.13 +++ files/ccache-howto-freebsd.txt.in 17 Dec 2010 14:15:15 -0000 @@ -2,12 +2,14 @@ # $FreeBSD: ports/devel/ccache/files/ccache-howto-freebsd.txt.in,v 1.13 20= 10/11/17 18:41:35 ehaupt Exp $ # =20 =2DTo use ccache add the following to /etc/make.conf +To use ccache add the following to /etc/make.conf. +You can replace cc and c++ with the compilers of your choice. +(remember that only GCC and Clang can build world and kernel) =20 .if (!empty(.CURDIR:M/usr/src*) || !empty(.CURDIR:M/usr/obj*)) .if !defined(NOCCACHE) =2DCC:=3D${CC:C,^cc,%%PREFIX%%/%%CCLINKDIR%%/world-cc,1} =2DCXX:=3D${CXX:C,^c\+\+,%%PREFIX%%/%%CCLINKDIR%%/world-c++,1} +CC:=3D${CC:C,^cc,%%PREFIX%%/%%CCLINKDIR%%/world/cc,1} +CXX:=3D${CXX:C,^c\+\+,%%PREFIX%%/%%CCLINKDIR%%/world/c++,1} .endif .endif =20 @@ -47,12 +49,16 @@ Ccache has installed links for the following compilers %%CCACHE_COMPILERS%% in %%PREFIX%%/%%CCLINKDIR%% +and %%PREFIX%%/%%CCLINKDIR%%/world + +Clang will return a lot of 'unused argument' warnings: they are harmless. +Just add -Qunused-arguments to CFLAGS if you want to hide them. =20 !!! WARNING !!! Please make sure you have the compiler installed before you do this or your build will fail because it will not be able to find the compiler. =20 =2DAny time you change CC/CXX you need to reinstall devel/libtool15 or you= =20 +Any time you change CC/CXX you need to reinstall devel/libtool or you=20 will run in to problems. =20 -- Index: files/world-c++.in =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: files/world-c++.in diff -N files/world-c++.in =2D-- files/world-c++.in 31 Jul 2010 10:48:26 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,4 +0,0 @@ =2D#!/bin/sh =2Dunset CCACHE_PATH =2Dexport CCACHE_COMPILERCHECK=3Dcontent =2Dexec %%PREFIX%%/%%CCLINKDIR%%/c++ "$@" Index: files/world-cc.in =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: files/world-cc.in diff -N files/world-cc.in =2D-- files/world-cc.in 31 Jul 2010 10:48:26 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,4 +0,0 @@ =2D#!/bin/sh =2Dunset CCACHE_PATH =2Dexport CCACHE_COMPILERCHECK=3Dcontent =2Dexec %%PREFIX%%/%%CCLINKDIR%%/cc "$@" Index: files/world-ccache.in =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: files/world-ccache.in diff -N files/world-ccache.in =2D-- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/world-ccache.in 17 Dec 2010 14:15:15 -0000 @@ -0,0 +1,9 @@ +#!/bin/sh + +[ "${0##*/}" =3D "ccache" ] && +printf "Please, use one of the compiler links in\n%%PREFIX%%/%%CCLINKDIR%%= /world\nto invoke ccache\n" >&2 && +exit 1 + +unset CCACHE_PATH +export CCACHE_COMPILERCHECK=3Dcontent +exec %%PREFIX%%/%%CCLINKDIR%%/${0##*/} "$@" --Boundary-01=_bq3CNHa4dUjRTIz-- --nextPart18208290.TDexKQE2io Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) iJwEAAECAAYFAk0Lep8ACgkQ3xiC6kQ1CoukEQP/RyAye2Sd69c/JVmMobKIsaL+ d+FpdpmQBwZvhXL4+uUrbG6berWv0A3CUZNYL4TFBr3cUSqUVS1mxHfoGjpbvKdt xO1CJR17SJD0jGu2Ic7Ck+j8S3sKPGIxGVgQ/O98Q2TSyr4AcZxrYQVrBRBWP3H4 +AE9u9NqyjIbK/eltwI= =uCdw -----END PGP SIGNATURE----- --nextPart18208290.TDexKQE2io--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201012171558.40045.avilla>