]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Fix build error when compiling ccache with recent clang versions
authorJoel Rosdahl <joel@rosdahl.net>
Mon, 27 Apr 2015 18:48:56 +0000 (20:48 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Mon, 27 Apr 2015 19:41:03 +0000 (21:41 +0200)
NEWS.txt
confitems_lookup.c
dev.mk.in
envtoconfitems_lookup.c

index 3fe37d206eab19c825b184c8bf9c62fa7626b9fe..8bf0f2e376e9b9a9739159f4aad2a8d3ef98064e 100644 (file)
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -35,6 +35,8 @@ Bug fixes
 - Bail out on too hard compiler option `-fplugin=libcc1plugin` (interaction
   with GDB).
 
+- Fixed build error when compiling ccache with recent clang versions.
+
 
 ccache 3.2.1
 ------------
index 2642dd66fa2620a8e36e8359ff38df8e2ce9bb2b..39e95afaf46f9b931d8b52b50865ec5c6f4d6a61 100644 (file)
@@ -75,6 +75,7 @@ confitems_hash (register const char *str, register unsigned int len)
   return len + asso_values[(unsigned char)str[1]] + asso_values[(unsigned char)str[0]];
 }
 
+static
 #ifdef __GNUC__
 __inline
 #if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
index 914e7e5f902f6e6640ae5be4dedc4818ba5fc4ac..adc3557f01f9b77b42b81ffe9649204e32d59908 100644 (file)
--- a/dev.mk.in
+++ b/dev.mk.in
@@ -92,7 +92,7 @@ endif
 version.o: version.c
 
 %_lookup.c: %.gperf
-       $(GPERF) $< >$@
+       $(GPERF) $< | awk '/#ifdef __GNUC__/ { ++i; if (i == 2) { print "static"; }} {print}' >$@
        echo "static const size_t `echo $* | tr a-z A-Z`_TOTAL_KEYWORDS = `sed -nr 's/.*TOTAL_KEYWORDS = ([0-9]+).*/\1/p' $@`;" >>$@
 
 .PHONY: dist
index 2bfd2f820646e870c64e0786d28f540da836f9c5..cb8b53e5218da21deb22e280df5f9207dc9abecd 100644 (file)
@@ -89,6 +89,7 @@ envtoconfitems_hash (register const char *str, register unsigned int len)
   return hval;
 }
 
+static
 #ifdef __GNUC__
 __inline
 #if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__