aboutsummaryrefslogtreecommitdiffstats
path: root/devel/ccache
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2013-05-09 04:06:48 +0800
committerbdrewery <bdrewery@FreeBSD.org>2013-05-09 04:06:48 +0800
commitbbcd44f1ab8b50298e66990cc80a5e99b69fcf3c (patch)
treed3da085092dfff10818893adb6ee04a29bf0ea42 /devel/ccache
parenta044f10b51acedb78495d87f967d24ddcdf5ec13 (diff)
downloadfreebsd-ports-gnome-bbcd44f1ab8b50298e66990cc80a5e99b69fcf3c.tar.gz
freebsd-ports-gnome-bbcd44f1ab8b50298e66990cc80a5e99b69fcf3c.tar.zst
freebsd-ports-gnome-bbcd44f1ab8b50298e66990cc80a5e99b69fcf3c.zip
- Always enable CCACHE_CPP2 on CURRENT after clang became the default.
This fixes building ports with ccache+clang without needing CCACHE_CPP2 set in make.conf. This fix will be removed once upstream ccache has a working fix for this. Note that this does not fix the issue if building on non-CURRENT with CC=clang
Diffstat (limited to 'devel/ccache')
-rw-r--r--devel/ccache/Makefile2
-rw-r--r--devel/ccache/files/patch-ccache.c30
2 files changed, 31 insertions, 1 deletions
diff --git a/devel/ccache/Makefile b/devel/ccache/Makefile
index 9a32537e34e6..66a901f2e1af 100644
--- a/devel/ccache/Makefile
+++ b/devel/ccache/Makefile
@@ -3,7 +3,7 @@
PORTNAME= ccache
PORTVERSION= 3.1.9
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= devel
MASTER_SITES= http://www.samba.org/ftp/ccache/ \
CRITICAL
diff --git a/devel/ccache/files/patch-ccache.c b/devel/ccache/files/patch-ccache.c
new file mode 100644
index 000000000000..7b1b188b0674
--- /dev/null
+++ b/devel/ccache/files/patch-ccache.c
@@ -0,0 +1,30 @@
+$FreeBSD$
+
+Disable compiling preprocessed code on CURRENT with default clang. Avoids
+needing to define CCACHE_CPP2 to build with clang. Performance hit but
+much safer until upstream fixes the build issue.
+
+--- ./ccache.c.orig 2013-05-08 14:22:16.891630019 -0500
++++ ./ccache.c 2013-05-08 14:27:18.488628070 -0500
+@@ -31,6 +31,9 @@
+ #include "hashutil.h"
+ #include "language.h"
+ #include "manifest.h"
++#if defined(__FreeBSD__)
++#include <sys/param.h>
++#endif
+
+ static const char VERSION_TEXT[] =
+ MYNAME " version %s\n"
+@@ -2260,7 +2263,11 @@
+ base_dir = NULL;
+ }
+
++#if __FreeBSD_version >= 1000024
++ compile_preprocessed_source_code = false;
++#else
+ compile_preprocessed_source_code = !getenv("CCACHE_CPP2");
++#endif
+
+ /* make sure the cache dir exists */
+ if (create_dir(cache_dir) != 0) {