diff --git a/.cvsignore b/.cvsignore index 0741eb7..fa8c782 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -ccache-2.4.tar.gz +ccache-3.0pre0.tar.bz2 diff --git a/06_md.diff b/06_md.diff deleted file mode 100644 index 75d82a2..0000000 --- a/06_md.diff +++ /dev/null @@ -1,81 +0,0 @@ - -diff --git a/ccache.c b/ccache.c -index 64c979b..843929f 100644 ---- a/ccache.c -+++ b/ccache.c -@@ -647,6 +647,13 @@ static void process_args(int argc, char **argv) - int found_S_opt = 0; - struct stat st; - char *e; -+ /* is gcc being asked to output dependencies? */ -+ int generating_dependencies = 0; -+ /* is the dependency makefile name overridden with -MF? */ -+ int dependency_filename_specified = 0; -+ /* is the dependency makefile target name specified with -MQ or -MF? */ -+ int dependency_target_specified = 0; -+ - - stripped_args = args_init(0, NULL); - -@@ -725,6 +732,18 @@ static void process_args(int argc, char **argv) - continue; - } - -+ /* These options require special handling, because they -+ behave differently with gcc -E, when the output -+ file is not specified. */ -+ -+ if (strcmp(argv[i], "-MD") == 0 || strcmp(argv[i], "-MMD") == 0) { -+ generating_dependencies = 1; -+ } else if (strcmp(argv[i], "-MF") == 0) { -+ dependency_filename_specified = 1; -+ } else if (strcmp(argv[i], "-MQ") == 0 || strcmp(argv[i], "-MT") == 0) { -+ dependency_target_specified = 1; -+ } -+ - /* options that take an argument */ - { - const char *opts[] = {"-I", "-include", "-imacros", "-iprefix", -@@ -837,6 +856,41 @@ static void process_args(int argc, char **argv) - p[2] = 0; - } - -+ /* If dependencies are generated, configure the preprocessor */ -+ -+ if (generating_dependencies && output_file) { -+ if (!dependency_filename_specified) { -+ char *default_depfile_name = x_strdup(output_file); -+ char *p = strrchr(default_depfile_name, '.'); -+ -+ if (p) { -+ if (strlen(p) < 2) { -+ stats_update(STATS_ARGS); -+ failed(); -+ return; -+ } -+ *p = 0; -+ } -+ else { -+ int len = p - default_depfile_name; -+ -+ p = x_malloc(len + 3); -+ strncpy(default_depfile_name, p, len - 1); -+ free(default_depfile_name); -+ default_depfile_name = p; -+ } -+ -+ strcat(default_depfile_name, ".d"); -+ args_add(stripped_args, "-MF"); -+ args_add(stripped_args, default_depfile_name); -+ } -+ -+ if (!dependency_target_specified) { -+ args_add(stripped_args, "-MT"); -+ args_add(stripped_args, output_file); -+ } -+ } -+ - /* cope with -o /dev/null */ - if (strcmp(output_file,"/dev/null") != 0 && stat(output_file, &st) == 0 && !S_ISREG(st.st_mode)) { - cc_log("Not a regular file %s\n", output_file); - diff --git a/ccache-2.4-coverage-231462.patch b/ccache-2.4-coverage-231462.patch deleted file mode 100644 index 27d063b..0000000 --- a/ccache-2.4-coverage-231462.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- ccache.c~ 2004-09-13 13:38:30.000000000 +0300 -+++ ccache.c 2007-03-15 12:31:41.000000000 +0200 -@@ -640,6 +640,9 @@ - - /* these are too hard */ - if (strcmp(argv[i], "-fbranch-probabilities")==0 || -+ strcmp(argv[i], "--coverage") == 0 || -+ strcmp(argv[i], "-fprofile-arcs") == 0 || -+ strcmp(argv[i], "-ftest-coverage") == 0 || - strcmp(argv[i], "-M") == 0 || - strcmp(argv[i], "-MM") == 0 || - strcmp(argv[i], "-x") == 0) { diff --git a/ccache-2.4-hardlink-doc.patch b/ccache-2.4-hardlink-doc.patch deleted file mode 100644 index bd9e25b..0000000 --- a/ccache-2.4-hardlink-doc.patch +++ /dev/null @@ -1,48 +0,0 @@ -Index: ccache.1 -=================================================================== -RCS file: /cvsroot/ccache/ccache.1,v -retrieving revision 1.26 -diff -u -r1.26 ccache.1 ---- ccache.1 24 Nov 2005 21:10:08 -0000 1.26 -+++ ccache.1 21 Jul 2007 21:03:32 -0000 -@@ -330,7 +330,7 @@ - .IP o - Use the same \fBCCACHE_DIR\fP environment variable setting - .IP o --Set the \fBCCACHE_NOLINK\fP environment variable -+Unset the \fBCCACHE_HARDLINK\fP environment variable - .IP o - Make sure everyone sets the CCACHE_UMASK environment variable - to 002, this ensures that cached files are accessible to everyone in -Index: ccache.yo -=================================================================== -RCS file: /cvsroot/ccache/ccache.yo,v -retrieving revision 1.27 -diff -u -r1.27 ccache.yo ---- ccache.yo 24 Nov 2005 21:54:09 -0000 1.27 -+++ ccache.yo 21 Jul 2007 21:03:32 -0000 -@@ -289,7 +289,7 @@ - - itemize( - it() Use the same bf(CCACHE_DIR) environment variable setting -- it() Set the bf(CCACHE_NOLINK) environment variable -+ it() Unset the bf(CCACHE_HARDLINK) environment variable - it() Make sure everyone sets the CCACHE_UMASK environment variable - to 002, this ensures that cached files are accessible to everyone in - the group. -Index: web/ccache-man.html -=================================================================== -RCS file: /cvsroot/ccache/web/ccache-man.html,v -retrieving revision 1.25 -diff -u -r1.25 ccache-man.html ---- web/ccache-man.html 13 Sep 2004 10:38:17 -0000 1.25 -+++ web/ccache-man.html 21 Jul 2007 21:03:32 -0000 -@@ -256,7 +256,7 @@ - following conditions need to be met: -
- --You can get this release from the download directory -+You can get this release from the download directory - -
NOTE! This release changes the hash input slighly, so you will - probably find that you will not get any hits against your existing -@@ -87,7 +87,7 @@ - -
-+href="http://ccache.samba.org/ftp/ccache/">download directory.
-
- For the bleeding edge, you can fetch ccache via CVS or
- rsync. To fetch via cvs use the following command:
diff --git a/ccache.sh.in b/ccache.sh.in
index 7d6d485..f844648 100644
--- a/ccache.sh.in
+++ b/ccache.sh.in
@@ -1,7 +1,9 @@
# Use ccache by default. Users who don't want that can set the CCACHE_DISABLE
# environment variable in their personal profile.
-pathmunge @LIBDIR@/ccache
+if ! echo "$PATH" | grep -Eq '(^|:)@LIBDIR@/ccache($|:)' ; then
+ PATH="@LIBDIR@/ccache:$PATH"
+fi
# If @CACHEDIR@ is writable, use a shared cache there. Users who don't
# want that even if they have that write permission can set the CCACHE_DIR
diff --git a/ccache.spec b/ccache.spec
index f57ca07..8ddc5d7 100644
--- a/ccache.spec
+++ b/ccache.spec
@@ -1,51 +1,48 @@
-%define compilers gcc g++ cc c++ gcc296 g++296 gcc32 c++32 g++32 gcc34 c++34 g++34 g++-libstdc++-so_7 avr-gcc avr-c++ avr-g++ arm-gp2x-linux-gcc arm-gp2x-linux-c++ arm-gp2x-linux-g++
-%define pkgs gcc, gcc-c++, compat-gcc, compat-gcc-c++, compat-gcc-32, compat-gcc-32-c++, gcc34, gcc34-c++, compat-gcc-34, compat-gcc-34-c++, libstdc++so7-devel, avr-gcc, avr-gcc-c++, arm-gp2x-linux-gcc, arm-gp2x-linux-gcc-c++
+%define compilers gcc g++ cc c++ gcc296 g++296 gcc32 c++32 g++32 gcc34 c++34 g++34 gcc44 g++44 g++-libstdc++-so_7 avr-gcc avr-c++ avr-g++ arm-gp2x-linux-gcc arm-gp2x-linux-c++ arm-gp2x-linux-g++ msp430-gcc
+%define pkgs gcc, gcc-c++, compat-gcc, compat-gcc-c++, compat-gcc-32, compat-gcc-32-c++, gcc34, gcc34-c++, compat-gcc-34, compat-gcc-34-c++, gcc44, gcc44-c++, libstdc++so7-devel, avr-gcc, avr-gcc-c++, arm-gp2x-linux-gcc, arm-gp2x-linux-gcc-c++, msp430-gcc
%define abs2rel() perl -MFile::Spec -e 'print File::Spec->abs2rel(@ARGV)' %1 %2
%{expand: %%define relccache %(%abs2rel %{_bindir}/ccache %{_libdir}/ccache)}
Name: ccache
-Version: 2.4
-Release: 17%{?dist}
+Version: 3.0
+Release: 0.1.pre0%{?dist}
Summary: C/C++ compiler cache
Group: Development/Tools
License: GPLv2+
URL: http://ccache.samba.org/
-Source0: http://samba.org/ftp/ccache/%{name}-%{version}.tar.gz
+Source0: http://samba.org/ftp/ccache/%{name}-%{version}pre0.tar.bz2
Source1: %{name}.sh.in
Source2: %{name}.csh.in
-Patch0: %{name}-html-links.patch
-Patch1: %{name}-2.4-coverage-231462.patch
-Patch2: %{name}-2.4-hardlink-doc.patch
-Patch3: %{name}-2.4-noHOME-315441.patch
-Patch4: http://patch-tracking.debian.net/patch/series/dl/ccache/2.4-17/06_md.diff
+Patch0: %{name}-3.0pre0-nostrip.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: perl(File::Spec)
+BuildRequires: zlib-devel >= 1.2.3
# For pathmunge in profile.d/ccache.sh, #123621
Requires: setup >= 2.5.48
Requires(triggerin): coreutils
Requires(triggerpostun): coreutils
%description
-ccache is a compiler cache. It acts as a caching pre-processor to
-C/C++ compilers, using the -E compiler switch and a hash to detect
-when a compilation can be satisfied from cache. This often results in
-a 5 to 10 times speedup in common compilations.
+ccache is a compiler cache. It speeds up recompilation of C/C++ code
+by caching previous compiles and detecting when the same compile is
+being done again. The main focus is to handle the GNU C/C++ compiler
+(GCC), but it may also work with compilers that mimic GCC good enough.
%prep
-%setup -q
-%patch0 -p0
-%patch1 -p0
-%patch2 -p0
-%patch3 -p0
-%patch4 -p1
+%setup -q -n %{name}-%{version}pre0
+%patch0 -p1
sed -e 's|@LIBDIR@|%{_libdir}|g' -e 's|@CACHEDIR@|%{_var}/cache/ccache|g' \
%{SOURCE1} > %{name}.sh
sed -e 's|@LIBDIR@|%{_libdir}|g' -e 's|@CACHEDIR@|%{_var}/cache/ccache|g' \
%{SOURCE2} > %{name}.csh
+# Make sure system zlib is used
+rm -r zlib
+# Unclean 3.0pre0 tarball
+rm -r .deps
%build
@@ -68,6 +65,10 @@ done
install -dm 770 $RPM_BUILD_ROOT%{_var}/cache/ccache
+%check
+make check
+
+
%clean
rm -fr $RPM_BUILD_ROOT
@@ -75,7 +76,6 @@ rm -fr $RPM_BUILD_ROOT
%pre
getent group ccache >/dev/null || groupadd -r ccache || :
-
%triggerin -- %{pkgs}
for name in %{compilers} ; do
for c in $name %{_target_cpu}-%{_vendor}-%{_target_os}-$name ; do
@@ -95,7 +95,7 @@ done
%files -f %{name}-%{version}.compilers
%defattr(-,root,root,-)
-%doc COPYING README web/*.html
+%doc COPYING NEWS README
%config(noreplace) %{_sysconfdir}/profile.d/%{name}.*sh
%{_bindir}/ccache
%dir %{_libdir}/ccache/
@@ -104,6 +104,15 @@ done
%changelog
+* Mon Mar 1 2010 Ville Skyttä