From owner-freebsd-ports@FreeBSD.ORG Fri Dec 17 14:58:53 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 52B8E106564A; Fri, 17 Dec 2010 14:58:53 +0000 (UTC) (envelope-from villa.alberto@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id A26D58FC17; Fri, 17 Dec 2010 14:58:52 +0000 (UTC) Received: by wyf19 with SMTP id 19so680130wyf.13 for ; Fri, 17 Dec 2010 06:58:51 -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=C9Pm0N0YoVOzUng339PZMBrMfS5kVD0M3nr0OW1Od98=; b=JBFgZDWPDcW+uJ7X7YRWGFgkJxMb/XCbqiLUc7i7ugCpMui4/wkEafTK2KaMeoI0x0 R1APjyzuO35NL2TXaR8TL1EkQmvb/dFNj+DWwEoaPKzA3N+St/lTfFYOdfYXcq5d7GU2 gKtDaD/e7f+5i6m7d5mroGBLwwMfr5Govhd3k= 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=IeN+HglAkaURELLB9//A+qS0Lk13jv3Be3TApAiDsxzpoHNJiu5/oRBxVlgHIg0FjF JEfPhrNZ5LDHmEil60wDUmwz6CvwN4ZGD/IiLF2hnlynGz3cCqrF0Ag0khPoqnlmqJyV vUcLildF1wDjMEkubK2RahM1Qit5tGrBjczKg= Received: by 10.227.199.10 with SMTP id eq10mr592746wbb.197.1292597931550; Fri, 17 Dec 2010 06:58:51 -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 q18sm315529wbe.5.2010.12.17.06.58.46 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 17 Dec 2010 06:58:50 -0800 (PST) Sender: Alberto Villa From: Alberto Villa Organization: The FreeBSD Project To: ports@freebsd.org Date: Fri, 17 Dec 2010 15:58:35 +0100 User-Agent: KMail/1.13.5 (FreeBSD/9.0-CURRENT; KDE/4.5.4; amd64; ; ) References: <201012171203.34851.avilla@freebsd.org> In-Reply-To: <201012171203.34851.avilla@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart18208290.TDexKQE2io"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201012171558.40045.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 14:58:53 -0000 --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 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--