From owner-freebsd-ports@FreeBSD.ORG Fri Dec 17 15:12:20 2010 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 539511065679; Fri, 17 Dec 2010 15:12:20 +0000 (UTC) (envelope-from villa.alberto@gmail.com) Received: from mail-ww0-f42.google.com (mail-ww0-f42.google.com [74.125.82.42]) by mx1.freebsd.org (Postfix) with ESMTP id A5F7B8FC1A; Fri, 17 Dec 2010 15:12:18 +0000 (UTC) Received: by wwi17 with SMTP id 17so597891wwi.1 for ; Fri, 17 Dec 2010 07:12:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:organization:to :subject:date:user-agent:cc:references:in-reply-to:mime-version :content-type:content-transfer-encoding:message-id; bh=f04ddqgF9xsqcRUEjwl7HQUMUxgt2PRbHNlYyY3g2TM=; b=AH0Wq4DnhREqCbjjr05Eov7uHF4/vZqMhG0FPSjXj2QrPHkucmoje4zbsfUpy9d/qK h+gZPUD9u5RY7+IU5eAs5VbvnkG2lSpZ4jgGzM3VPC15L6+e0Qnv5XaSHZ0mxNqXvseU mVwc6607qMhUlZN3vjQGlnUoyXRDjUif1pKnw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:organization:to:subject:date:user-agent:cc:references :in-reply-to:mime-version:content-type:content-transfer-encoding :message-id; b=EmDHx/GIEtxqda+1fLLrmnfQ7lhT/my97vd9oWS/1i70pAOEw2MZ4nsycRHQbWeNKQ 52Q7c0cXqDBulSW2Fwl9hoYoAHy58Fzm5heMgXiqTt1q/NmgiLuWPRDgAujIw3xuMcbM bN4z7xMc3m9PiFU24kwu5RBXkxyUfNbQMS0no= Received: by 10.216.154.8 with SMTP id g8mr3416345wek.12.1292598738086; Fri, 17 Dec 2010 07:12:18 -0800 (PST) Received: from echo.hoth (host212-150-dynamic.52-82-r.retail.telecomitalia.it [82.52.150.212]) by mx.google.com with ESMTPS id r6sm253093weq.20.2010.12.17.07.12.14 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 17 Dec 2010 07:12:17 -0800 (PST) Sender: Alberto Villa From: Alberto Villa Organization: The FreeBSD Project To: ports@freebsd.org Date: Fri, 17 Dec 2010 16:12:07 +0100 User-Agent: KMail/1.13.5 (FreeBSD/9.0-CURRENT; KDE/4.5.4; amd64; ; ) References: <201012171203.34851.avilla@freebsd.org> <201012171558.40045.avilla@freebsd.org> In-Reply-To: <201012171558.40045.avilla@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart46166926.tVqpWv3rQA"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201012171612.11141.avilla@freebsd.org> Cc: ehaupt@freebsd.org Subject: Re: ccache: support other world compilers X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Dec 2010 15:12:20 -0000 --nextPart46166926.tVqpWv3rQA Content-Type: multipart/mixed; boundary="Boundary-01=_H33CNDXpj3zGlCy" Content-Transfer-Encoding: 7bit --Boundary-01=_H33CNDXpj3zGlCy Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Friday 17 December 2010 15:58:35 Alberto Villa wrote: > fixed and tested patch attached oops... i thought PLIST_DIRS was smarter... here's the final patch =2D-=20 Alberto Villa, FreeBSD committer http://people.FreeBSD.org/~avilla May Euell Gibbons eat your only copy of the manual! --Boundary-01=_H33CNDXpj3zGlCy 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 15:11:19 -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}/world ${CCLINKDIR} 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 15:11:19 -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 15:11:19 -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=_H33CNDXpj3zGlCy-- --nextPart46166926.tVqpWv3rQA 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) iJwEAAECAAYFAk0LfcsACgkQ3xiC6kQ1CotLbQQAhoVNUx5ykv/rmAHf5a1XKksV nRrT2sdKeNI+cns9ce6lMCfeVcOooB07gpUx6h9GTk+eAsb82x/+S0cx+jpJCbBs MphOHqBkroBljScL0fM3vE71WhwZpQn/Y119u/pWK2pWEb+aOGK29snMj28wxzwu 2UDN5ReAmSamkshGpO8= =VFYW -----END PGP SIGNATURE----- --nextPart46166926.tVqpWv3rQA--