FreeBSD Bugzilla – Attachment 105975 Details for
Bug 146527
[UPDATE] devel/ccache 3.0pre1
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
file.txt
file.txt (text/plain), 9.65 KB, created by
Christer Edwards
on 2010-05-13 00:30:03 UTC
(
hide
)
Description:
file.txt
Filename:
MIME Type:
Creator:
Christer Edwards
Created:
2010-05-13 00:30:03 UTC
Size:
9.65 KB
patch
obsolete
> >Index: Makefile >=================================================================== >RCS file: /home/ncvs/ports/devel/ccache/Makefile,v >retrieving revision 1.45 >diff -u -r1.45 Makefile >--- Makefile 5 Aug 2009 02:40:48 -0000 1.45 >+++ Makefile 12 May 2010 22:19:47 -0000 >@@ -1,15 +1,16 @@ > # New ports collection makefile for: ccache >-# Date created: 31/03/2002 >-# Whom: Dominic Marks <d.marks@student.umist.ac.uk> >+# Date created: 12/05/2010 >+# Whom: Christer Edwards <christer.edwards@gmail.com> > # > # $FreeBSD: ports/devel/ccache/Makefile,v 1.45 2009/08/05 02:40:48 ahze Exp $ > # > > PORTNAME= ccache >-PORTVERSION= 2.4 >-PORTREVISION= 9 >+DISTVERSION= 3.0pre1 >+PORTREVISION= 1 > CATEGORIES= devel >-MASTER_SITES= http://samba.org/ftp/ccache/ >+MASTER_SITES= http://samba.org/ftp/ccache/ \ >+ http://ccache.samba.org/ > > MAINTAINER= ahze@FreeBSD.org > COMMENT= A tool to minimize the compile time of C/C++ programs >@@ -19,9 +20,7 @@ > MAN1= ccache.1 > PLIST_FILES= bin/ccache > >-PORTDOCS= index.html \ >- ccache-man.html \ >- ${HOWTO} >+PORTDOCS= ${HOWTO} > > .if !defined(WITHOUT_COMPILER_LINKS) > HOWTO= ccache-howto-freebsd.txt >@@ -34,7 +33,7 @@ > > .if !defined(WITHOUT_COMPILER_LINKS) > .if ${ARCH}=="i386" >-CCACHE_COMPILERS+= icc icpc >+CCACHE_COMPILERS+= icc icpc > .endif > GNU_COMPILERS+= 34 42 43 44 -ooo > CCACHE_COMPILERS+= cc c++ gcc g++ ${GNU_COMPILERS:S|^|gcc|} ${GNU_COMPILERS:S|^|g++|} >Index: distinfo >=================================================================== >RCS file: /home/ncvs/ports/devel/ccache/distinfo,v >retrieving revision 1.15 >diff -u -r1.15 distinfo >--- distinfo 9 Nov 2005 07:09:38 -0000 1.15 >+++ distinfo 12 May 2010 22:19:47 -0000 >@@ -1,3 +1,3 @@ >-MD5 (ccache-2.4.tar.gz) = 73c1ed1e767c1752dd0f548ec1e66ce7 >-SHA256 (ccache-2.4.tar.gz) = 435f862ca5168c346f5aa9e242174bbf19a5abcaeecfceeac2f194558827aaa0 >-SIZE (ccache-2.4.tar.gz) = 86363 >+MD5 (ccache-3.0pre1.tar.gz) = 003eb4ea05325bec177267b9e894635c >+SHA256 (ccache-3.0pre1.tar.gz) = 683682b2d41bb54a96f219f4a876ad07160cbc42ead88f549eb258183fb55b1f >+SIZE (ccache-3.0pre1.tar.gz) = 254485 >Index: files/patch-ccache.1 >=================================================================== >RCS file: files/patch-ccache.1 >diff -N files/patch-ccache.1 >--- files/patch-ccache.1 15 Nov 2005 20:03:33 -0000 1.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,19 +0,0 @@ >---- ccache.1.orig Mon Sep 13 06:38:30 2004 >-+++ ccache.1 Tue Nov 15 14:59:46 2005 >-@@ -234,6 +234,16 @@ >- incorrect setting of this debug info rarely causes problems\&. If you >- strike problems with gdb not using the correct directory then enable >- this option\&. >-+.IP >-+.IP "\fBCCACHE_NOHASH_SIZE_MTIME\fP" >-+This tells ccache to not hash the real compiler's size and modification >-+time. Normally this is the mechanism to detect compiler upgrades. >-+There are situations however, where even though the compiler's size or >-+modification time has changed you can safely use the cached objects >-+(e.g. if as part of your build system the compiler is built as well >-+and the compiler's source has not changed; or if the compiler has only >-+changes that do not affect code generation). Use this feature only if >-+you know what you are doing. >- .IP >- .IP "\fBCCACHE_UNIFY\fP" >- If you set the environment variable CCACHE_UNIFY >Index: files/patch-ccache.c >=================================================================== >RCS file: files/patch-ccache.c >diff -N files/patch-ccache.c >--- files/patch-ccache.c 21 Mar 2006 15:06:15 -0000 1.2 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,17 +0,0 @@ >---- ccache.c.orig 2004/09/13 10:19:06 1.96 >-+++ ccache.c 2005/11/24 21:54:09 1.98 >-@@ -331,8 +331,12 @@ >- hash_string(str_basename(args->argv[0])); >- } >- >-- hash_int(st.st_size); >-- hash_int(st.st_mtime); >-+ if (getenv("CCACHE_HASH_COMPILER")) { >-+ hash_file(args->argv[0]); >-+ } else if (!getenv("CCACHE_NOHASH_SIZE_MTIME")) { >-+ hash_int(st.st_size); >-+ hash_int(st.st_mtime); >-+ } >- >- /* possibly hash the current working directory */ >- if (getenv("CCACHE_HASHDIR")) { >Index: files/patch-ccache.yo >=================================================================== >RCS file: files/patch-ccache.yo >diff -N files/patch-ccache.yo >--- files/patch-ccache.yo 21 Mar 2006 15:06:15 -0000 1.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,14 +0,0 @@ >---- ccache.yo.orig 2004/09/10 05:05:14 1.26 >-+++ ccache.yo 2005/11/24 21:54:09 1.27 >-@@ -203,6 +203,11 @@ >- strike problems with gdb not using the correct directory then enable >- this option. >- >-+dit(bf(CCACHE_HASH_COMPILER)) This tells ccache to hash binary of the >-+compiler instead of hashing just its size and mtime. This is very >-+slightly slower, but makes copes better with compiler upgrades during >-+a build bootstrapping process. >-+ >- dit(bf(CCACHE_UNIFY)) If you set the environment variable CCACHE_UNIFY >- then ccache will use the C/C++ unifier when hashing the pre-processor >- output if -g is not used in the compile. The unifier is slower than a >Index: files/patch-md4 >=================================================================== >RCS file: files/patch-md4 >diff -N files/patch-md4 >--- files/patch-md4 5 Aug 2009 02:40:48 -0000 1.3 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,148 +0,0 @@ >---- ccache.h.orig Wed Sep 8 21:30:40 2004 >-+++ ccache.h Wed Sep 8 21:31:53 2004 >-@@ -65,14 +65,14 @@ >- >- typedef unsigned uint32; >- >--#include "mdfour.h" >-+#include <md4.h> >- >- void hash_start(void); >- void hash_string(const char *s); >- void hash_int(int x); >- void hash_file(const char *fname); >- char *hash_result(void); >--void hash_buffer(const char *s, int len); >-+void hash_buffer(const unsigned char *s, unsigned int len); >- >- void cc_log(const char *format, ...); >- void fatal(const char *msg); >---- hash.c.orig 2004-09-13 12:38:30.000000000 +0200 >-+++ hash.c 2009-07-21 23:37:00.000000000 +0200 >-@@ -20,17 +20,22 @@ >- */ >- >- #include "ccache.h" >-+#include <sys/types.h> >-+#include <sys/mman.h> >-+#include <sys/stat.h> >- >--static struct mdfour md; >-+static MD4_CTX md; >-+static off_t totalN; >- >--void hash_buffer(const char *s, int len) >-+void hash_buffer(const unsigned char *s, unsigned int len) >- { >-- mdfour_update(&md, (unsigned char *)s, len); >-+ totalN += len; >-+ MD4Update(&md, s, len); >- } >- >- void hash_start(void) >- { >-- mdfour_begin(&md); >-+ MD4Init(&md); >- } >- >- void hash_string(const char *s) >-@@ -46,35 +51,44 @@ >- /* add contents of a file to the hash */ >- void hash_file(const char *fname) >- { >-- char buf[1024]; >-- int fd, n; >-+ char *buf; >-+ int fd; >-+ struct stat stats; >- >- fd = open(fname, O_RDONLY|O_BINARY); >- if (fd == -1) { >- cc_log("Failed to open %s\n", fname); >-- fatal("hash_file"); >-+ fatal(__FUNCTION__); >- } >- >-- while ((n = read(fd, buf, sizeof(buf))) > 0) { >-- hash_buffer(buf, n); >-- } >-+ if (fstat(fd, &stats) != 0) { >-+ cc_log("Failed to fstat the opened %s (descriptor %d)\n", >-+ fname, fd); >-+ close(fd); >-+ fatal(__FUNCTION__); >-+ } >-+ if( stats.st_size == 0 ) >-+ buf = NULL; >-+ else { >-+ buf = mmap(NULL, stats.st_size, PROT_READ, MAP_PRIVATE, fd, 0); >-+ if (buf == MAP_FAILED) { >-+ cc_log("Failed to mmap %s\n", fname); >-+ close(fd); >-+ fatal(__FUNCTION__); >-+ } >-+ } >-+ >-+ hash_buffer(buf, stats.st_size); >- close(fd); >- } >- >- /* return the hash result as a static string */ >- char *hash_result(void) >- { >-- unsigned char sum[16]; >- static char ret[53]; >-- int i; >- >-- hash_buffer(NULL, 0); >-- mdfour_result(&md, sum); >-+ MD4End(&md, ret); >- >-- for (i=0;i<16;i++) { >-- sprintf(&ret[i*2], "%02x", (unsigned)sum[i]); >-- } >-- sprintf(&ret[i*2], "-%u", (unsigned)md.totalN); >-- >-+ snprintf(ret + 32, sizeof ret - 32, "-%lu", (unsigned long)totalN); >- return ret; >- } >---- unify.c.orig Wed Sep 8 21:36:41 2004 >-+++ unify.c Wed Sep 8 21:37:20 2004 >-@@ -104,13 +104,12 @@ >- hash_buffer((char *)buf, len); >- len = 0; >- } >-- hash_buffer(NULL, 0); >- return; >- } >- >- buf[len++] = c; >-- if (len == 64) { >-- hash_buffer((char *)buf, len); >-+ if (len == sizeof buf) { >-+ hash_buffer((char *)buf, sizeof buf); >- len = 0; >- } >- } >---- Makefile.in.orig Mon Sep 6 09:04:22 2004 >-+++ Makefile.in Wed Sep 8 21:41:00 2004 >-@@ -11,16 +11,16 @@ >- CFLAGS=@CFLAGS@ -I. >- EXEEXT=@EXEEXT@ >- >--OBJS= ccache.o mdfour.o hash.o execute.o util.o args.o stats.o \ >-+OBJS= ccache.o hash.o execute.o util.o args.o stats.o \ >- cleanup.o snprintf.o unify.o >--HEADERS = ccache.h mdfour.h >-+HEADERS = ccache.h >- >- all: ccache$(EXEEXT) >- >- docs: ccache.1 web/ccache-man.html >- >- ccache$(EXEEXT): $(OBJS) $(HEADERS) >-- $(CC) $(CFLAGS) -o $@ $(OBJS) >-+ $(CC) $(CFLAGS) -o $@ $(OBJS) -lmd >- >- ccache.1: ccache.yo >- -yodl2man -o ccache.1 ccache.yo >Index: files/patch-util.c >=================================================================== >RCS file: files/patch-util.c >diff -N files/patch-util.c >--- files/patch-util.c 24 Nov 2008 03:32:46 -0000 1.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,25 +0,0 @@ >-$MirOS: ports/devel/ccache/patches/patch-util_c,v 1.1 2008/10/05 17:03:37 tg Exp $ >- >- Very interesting bug: tries to read âsizeâ bytes >- from âptrâ (of size âoldsizeâ) while copying to >- âp2â (of size âsizeâ), instead of âoldsizeâ bytes; >- with mmap malloc, jemalloc, and possibly omalloc, >- the additional RAM needed is not always in core⦠>- >---- util.c.orig Mon Sep 13 10:38:08 2004 >-+++ util.c Sun Oct 5 16:58:39 2008 >-@@ -187,13 +187,9 @@ void *x_realloc(void *ptr, size_t size) >- { >- void *p2; >- if (!ptr) return x_malloc(size); >-- p2 = malloc(size); >-+ p2 = realloc(ptr, size); >- if (!p2) { >- fatal("out of memory in x_realloc"); >-- } >-- if (ptr) { >-- memcpy(p2, ptr, size); >-- free(ptr); >- } >- return p2; >- }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 146527
: 105975