Merge commit 'ccache-2_4-18_fc13' into el5
Conflicts: Makefile ccache.csh.in ccache.sh.in ccache.spec
This commit is contained in:
commit
18f551150f
|
@ -0,0 +1,81 @@
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
|
@ -0,0 +1,45 @@
|
||||||
|
Index: config.h.in
|
||||||
|
===================================================================
|
||||||
|
RCS file: /cvsroot/ccache/config.h.in,v
|
||||||
|
retrieving revision 1.5
|
||||||
|
retrieving revision 1.7
|
||||||
|
diff -u -r1.5 -r1.7
|
||||||
|
--- config.h.in 7 Mar 2003 12:09:19 -0000 1.5
|
||||||
|
+++ config.h.in 25 Jul 2005 07:05:46 -0000 1.7
|
||||||
|
@@ -19,6 +19,9 @@
|
||||||
|
/* Define to 1 if you have the `gethostname' function. */
|
||||||
|
#undef HAVE_GETHOSTNAME
|
||||||
|
|
||||||
|
+/* Define to 1 if you have the `getpwuid' function. */
|
||||||
|
+#undef HAVE_GETPWUID
|
||||||
|
+
|
||||||
|
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||||
|
#undef HAVE_INTTYPES_H
|
||||||
|
|
||||||
|
@@ -31,6 +34,9 @@
|
||||||
|
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
|
||||||
|
#undef HAVE_NDIR_H
|
||||||
|
|
||||||
|
+/* Define to 1 if you have the <pwd.h> header file. */
|
||||||
|
+#undef HAVE_PWD_H
|
||||||
|
+
|
||||||
|
/* Define to 1 if you have the `realpath' function. */
|
||||||
|
#undef HAVE_REALPATH
|
||||||
|
|
||||||
|
Index: util.c
|
||||||
|
===================================================================
|
||||||
|
RCS file: /cvsroot/ccache/util.c,v
|
||||||
|
retrieving revision 1.34
|
||||||
|
retrieving revision 1.37
|
||||||
|
diff -u -r1.34 -r1.37
|
||||||
|
--- util.c 6 Sep 2004 12:59:12 -0000 1.34
|
||||||
|
+++ util.c 17 Jul 2006 03:41:12 -0000 1.37
|
||||||
|
@@ -448,7 +444,7 @@
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
- fatal("Unable to determine home directory");
|
||||||
|
+ fprintf(stderr, "ccache: Unable to determine home directory");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
|
@ -9,8 +9,8 @@ endif
|
||||||
# want that even if they have that write permission can set the CCACHE_DIR
|
# want that even if they have that write permission can set the CCACHE_DIR
|
||||||
# and unset the CCACHE_UMASK environment variables in their personal profile.
|
# and unset the CCACHE_UMASK environment variables in their personal profile.
|
||||||
|
|
||||||
if ( ! $?CCACHE_DIR && -d @CACHEDIR@ && -w @CACHEDIR@ ) then
|
if ( ! $?CCACHE_DIR && -w @CACHEDIR@ && -d @CACHEDIR@ ) then
|
||||||
setenv CCACHE_DIR /var/cache/ccache
|
setenv CCACHE_DIR @CACHEDIR@
|
||||||
setenv CCACHE_UMASK 002
|
setenv CCACHE_UMASK 002
|
||||||
unsetenv CCACHE_HARDLINK
|
unsetenv CCACHE_HARDLINK
|
||||||
endif
|
endif
|
||||||
|
|
11
ccache.sh.in
11
ccache.sh.in
|
@ -1,16 +1,17 @@
|
||||||
# Use ccache by default. Users who don't want that can set the CCACHE_DISABLE
|
# Use ccache by default. Users who don't want that can set the CCACHE_DISABLE
|
||||||
# environment variable in their personal profile.
|
# environment variable in their personal profile.
|
||||||
|
|
||||||
if ! echo "$PATH" | grep -qw @LIBDIR@/ccache ; then
|
case ":$PATH:" in
|
||||||
PATH="@LIBDIR@/ccache:$PATH"
|
*:@LIBDIR@/ccache:*) ;;
|
||||||
fi
|
*) PATH="@LIBDIR@/ccache:$PATH" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
# If @CACHEDIR@ is writable, use a shared cache there. Users who don't
|
# 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
|
# want that even if they have that write permission can set the CCACHE_DIR
|
||||||
# and unset the CCACHE_UMASK environment variables in their personal profile.
|
# and unset the CCACHE_UMASK environment variables in their personal profile.
|
||||||
|
|
||||||
if [ -z "$CCACHE_DIR" -a -d @CACHEDIR@ -a -w @CACHEDIR@ ] ; then
|
if [ -z "$CCACHE_DIR" ] && [ -w @CACHEDIR@ ] && [ -d @CACHEDIR@ ] ; then
|
||||||
export CCACHE_DIR=/var/cache/ccache
|
export CCACHE_DIR=@CACHEDIR@
|
||||||
export CCACHE_UMASK=002
|
export CCACHE_UMASK=002
|
||||||
unset CCACHE_HARDLINK
|
unset CCACHE_HARDLINK
|
||||||
fi
|
fi
|
||||||
|
|
66
ccache.spec
66
ccache.spec
|
@ -6,18 +6,20 @@
|
||||||
|
|
||||||
Name: ccache
|
Name: ccache
|
||||||
Version: 2.4
|
Version: 2.4
|
||||||
Release: 10%{?dist}
|
Release: 18%{?dist}
|
||||||
Summary: C/C++ compiler cache
|
Summary: C/C++ compiler cache
|
||||||
|
|
||||||
Group: Development/Tools
|
Group: Development/Tools
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: http://ccache.samba.org/
|
URL: http://ccache.samba.org/
|
||||||
Source0: http://ccache.samba.org/ftp/ccache/%{name}-%{version}.tar.gz
|
Source0: http://samba.org/ftp/ccache/%{name}-%{version}.tar.gz
|
||||||
Source1: %{name}.sh.in
|
Source1: %{name}.sh.in
|
||||||
Source2: %{name}.csh.in
|
Source2: %{name}.csh.in
|
||||||
Patch0: %{name}-html-links.patch
|
Patch0: %{name}-html-links.patch
|
||||||
Patch1: %{name}-2.4-coverage-231462.patch
|
Patch1: %{name}-2.4-coverage-231462.patch
|
||||||
Patch2: %{name}-2.4-hardlink-doc.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
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
BuildRequires: perl(File::Spec)
|
BuildRequires: perl(File::Spec)
|
||||||
|
@ -36,6 +38,8 @@ a 5 to 10 times speedup in common compilations.
|
||||||
%patch0 -p0
|
%patch0 -p0
|
||||||
%patch1 -p0
|
%patch1 -p0
|
||||||
%patch2 -p0
|
%patch2 -p0
|
||||||
|
%patch3 -p0
|
||||||
|
%patch4 -p1
|
||||||
sed -e 's|@LIBDIR@|%{_libdir}|g' -e 's|@CACHEDIR@|%{_var}/cache/ccache|g' \
|
sed -e 's|@LIBDIR@|%{_libdir}|g' -e 's|@CACHEDIR@|%{_var}/cache/ccache|g' \
|
||||||
%{SOURCE1} > %{name}.sh
|
%{SOURCE1} > %{name}.sh
|
||||||
sed -e 's|@LIBDIR@|%{_libdir}|g' -e 's|@CACHEDIR@|%{_var}/cache/ccache|g' \
|
sed -e 's|@LIBDIR@|%{_libdir}|g' -e 's|@CACHEDIR@|%{_var}/cache/ccache|g' \
|
||||||
|
@ -98,68 +102,96 @@ done
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Sun Aug 19 2007 Ville Skyttä <ville.skytta at iki.fi> - 2.4-10
|
* Fri Jun 4 2010 Ville Skyttä <ville.skytta@iki.fi> - 2.4-18
|
||||||
|
- Don't use "pathmunge" in the profile.d sh script to work around #548960.
|
||||||
|
|
||||||
|
* Sat Dec 19 2009 Ville Skyttä <ville.skytta@iki.fi> - 2.4-17
|
||||||
|
- Minor profile.d script performance improvements.
|
||||||
|
- Fix hardcoded /var/cache/ccache in profile.d scripts.
|
||||||
|
|
||||||
|
* Mon Aug 10 2009 Ville Skyttä <ville.skytta@iki.fi> - 2.4-16
|
||||||
|
- Switch #438201 patch URL to Debian patch tracking (original is MIA).
|
||||||
|
|
||||||
|
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4-15
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4-14
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Mar 19 2008 Ville Skyttä <ville.skytta@iki.fi> - 2.4-13
|
||||||
|
- Apply patch to fix path to saved dependency files (#438201).
|
||||||
|
|
||||||
|
* Sat Feb 9 2008 Ville Skyttä <ville.skytta@iki.fi> - 2.4-12
|
||||||
|
- Rebuild.
|
||||||
|
|
||||||
|
* Tue Oct 2 2007 Ville Skyttä <ville.skytta@iki.fi> - 2.4-11
|
||||||
|
- Apply upstream fix for problems when $HOME is not set (#315441).
|
||||||
|
|
||||||
|
* Wed Aug 22 2007 Ville Skyttä <ville.skytta@iki.fi>
|
||||||
|
- Fix URL to upstream tarball.
|
||||||
|
|
||||||
|
* Sun Aug 19 2007 Ville Skyttä <ville.skytta@iki.fi> - 2.4-10
|
||||||
- License: GPLv2+
|
- License: GPLv2+
|
||||||
- Make compiler symlinks relative.
|
- Make compiler symlinks relative.
|
||||||
- Make profile.d scripts noreplace.
|
- Make profile.d scripts noreplace.
|
||||||
|
|
||||||
* Mon Jul 30 2007 Ville Skyttä <ville.skytta at iki.fi> - 2.4-9
|
* Mon Jul 30 2007 Ville Skyttä <ville.skytta@iki.fi> - 2.4-9
|
||||||
- Use shared cache dir for users in the ccache group by default
|
- Use shared cache dir for users in the ccache group by default
|
||||||
(#247760, based on Andy Shevchenko's work).
|
(#247760, based on Andy Shevchenko's work).
|
||||||
- Fix outdated hardlink info in cache sharing docs.
|
- Fix outdated hardlink info in cache sharing docs.
|
||||||
- Add auto-symlink support for avr-gcc(-c++) and arm-gp2x-linux-gcc(-c++).
|
- Add auto-symlink support for avr-gcc(-c++) and arm-gp2x-linux-gcc(-c++).
|
||||||
- Make triggers always exit with a zero exit status.
|
- Make triggers always exit with a zero exit status.
|
||||||
|
|
||||||
* Thu Mar 15 2007 Ville Skyttä <ville.skytta at iki.fi> - 2.4-8
|
* Thu Mar 15 2007 Ville Skyttä <ville.skytta@iki.fi> - 2.4-8
|
||||||
- Bypass cache with --coverage, -fprofile-arcs and -ftest-coverage
|
- Bypass cache with --coverage, -fprofile-arcs and -ftest-coverage
|
||||||
(upstream CVS and Matt Fago, #231462).
|
(upstream CVS and Matt Fago, #231462).
|
||||||
|
|
||||||
* Fri Nov 10 2006 Ville Skyttä <ville.skytta at iki.fi> - 2.4-7
|
* Fri Nov 10 2006 Ville Skyttä <ville.skytta@iki.fi> - 2.4-7
|
||||||
- Require coreutils for triggers (#215030).
|
- Require coreutils for triggers (#215030).
|
||||||
|
|
||||||
* Wed Aug 9 2006 Ville Skyttä <ville.skytta at iki.fi> - 2.4-6
|
* Wed Aug 9 2006 Ville Skyttä <ville.skytta@iki.fi> - 2.4-6
|
||||||
- Add auto-symlink support for compat-gcc-34(-c++).
|
- Add auto-symlink support for compat-gcc-34(-c++).
|
||||||
- Untabify, escape macros in changelog.
|
- Untabify, escape macros in changelog.
|
||||||
|
|
||||||
* Tue May 16 2006 Ville Skyttä <ville.skytta at iki.fi> - 2.4-5
|
* Tue May 16 2006 Ville Skyttä <ville.skytta@iki.fi> - 2.4-5
|
||||||
- Add auto-symlink support for g++-libstdc++-so_7.
|
- Add auto-symlink support for g++-libstdc++-so_7.
|
||||||
|
|
||||||
* Sat Nov 26 2005 Ville Skyttä <ville.skytta at iki.fi> - 2.4-4
|
* Sat Nov 26 2005 Ville Skyttä <ville.skytta@iki.fi> - 2.4-4
|
||||||
- Drop "bin" from compiler symlink path.
|
- Drop "bin" from compiler symlink path.
|
||||||
- Make profile.d snippets non-executable (#35714).
|
- Make profile.d snippets non-executable (#35714).
|
||||||
|
|
||||||
* Sun May 1 2005 Ville Skyttä <ville.skytta at iki.fi> - 2.4-3
|
* Sun May 1 2005 Ville Skyttä <ville.skytta@iki.fi> - 2.4-3
|
||||||
- Auto-symlink update: add compat-gcc-32 and compat-gcc-32-c++, drop
|
- Auto-symlink update: add compat-gcc-32 and compat-gcc-32-c++, drop
|
||||||
bunch of no longer relevant compilers.
|
bunch of no longer relevant compilers.
|
||||||
|
|
||||||
* Fri Apr 7 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 2.4-2
|
* Fri Apr 7 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 2.4-2
|
||||||
- rebuilt
|
- rebuilt
|
||||||
|
|
||||||
* Sun Sep 26 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:2.4-0.fdr.1
|
* Sun Sep 26 2004 Ville Skyttä <ville.skytta@iki.fi> - 0:2.4-0.fdr.1
|
||||||
- Update to 2.4.
|
- Update to 2.4.
|
||||||
- Add symlinking support for gcc4 and gcc4-c++.
|
- Add symlinking support for gcc4 and gcc4-c++.
|
||||||
- Move the ccache executable to %%{_bindir}.
|
- Move the ccache executable to %%{_bindir}.
|
||||||
- Include more docs.
|
- Include more docs.
|
||||||
|
|
||||||
* Fri Jun 25 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:2.3-0.fdr.5
|
* Fri Jun 25 2004 Ville Skyttä <ville.skytta@iki.fi> - 0:2.3-0.fdr.5
|
||||||
- Add support for gcc33 and g++33.
|
- Add support for gcc33 and g++33.
|
||||||
|
|
||||||
* Thu Jun 10 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:2.3-0.fdr.4
|
* Thu Jun 10 2004 Ville Skyttä <ville.skytta@iki.fi> - 0:2.3-0.fdr.4
|
||||||
- Fix hardcoded lib path in profile.d scriptlets (bug 1558).
|
- Fix hardcoded lib path in profile.d scriptlets (bug 1558).
|
||||||
|
|
||||||
* Mon May 3 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:2.3-0.fdr.3
|
* Mon May 3 2004 Ville Skyttä <ville.skytta@iki.fi> - 0:2.3-0.fdr.3
|
||||||
- Add support for gcc34 and g++34, and
|
- Add support for gcc34 and g++34, and
|
||||||
%%{_target_cpu}-%%{_vendor}-%%{_target_os}-* variants.
|
%%{_target_cpu}-%%{_vendor}-%%{_target_os}-* variants.
|
||||||
|
|
||||||
* Thu Nov 13 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:2.3-0.fdr.2
|
* Thu Nov 13 2003 Ville Skyttä <ville.skytta@iki.fi> - 0:2.3-0.fdr.2
|
||||||
- Add overriding symlinks for gcc-ssa and g++-ssa (bug 963).
|
- Add overriding symlinks for gcc-ssa and g++-ssa (bug 963).
|
||||||
|
|
||||||
* Tue Nov 11 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:2.3-0.fdr.1
|
* Tue Nov 11 2003 Ville Skyttä <ville.skytta@iki.fi> - 0:2.3-0.fdr.1
|
||||||
- Update to 2.3.
|
- Update to 2.3.
|
||||||
- Implement triggers to keep list of "aliased" compilers up to date on the fly.
|
- Implement triggers to keep list of "aliased" compilers up to date on the fly.
|
||||||
- Add gcc32 and a bunch of legacy packages to the list of overridden compilers.
|
- Add gcc32 and a bunch of legacy packages to the list of overridden compilers.
|
||||||
|
|
||||||
* Sat Aug 2 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:2.2-0.fdr.6
|
* Sat Aug 2 2003 Ville Skyttä <ville.skytta@iki.fi> - 0:2.2-0.fdr.6
|
||||||
- Add c++ to the list of overridden compilers (bug 548).
|
- Add c++ to the list of overridden compilers (bug 548).
|
||||||
- Own everything including dirs under %%{_libdir}/ccache (bug 529).
|
- Own everything including dirs under %%{_libdir}/ccache (bug 529).
|
||||||
- %%{buildroot} -> $RPM_BUILD_ROOT.
|
- %%{buildroot} -> $RPM_BUILD_ROOT.
|
||||||
|
|
Loading…
Reference in New Issue