diff --git a/ccache.changes b/ccache.changes index dab42ef..b5c3472 100644 --- a/ccache.changes +++ b/ccache.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Jan 4 23:37:14 UTC 2013 - llunak@suse.com + +- support -Xclang option + ------------------------------------------------------------------- Fri Nov 9 13:37:23 UTC 2012 - idonmez@suse.com diff --git a/ccache.spec b/ccache.spec index 2a54424..8c5321c 100644 --- a/ccache.spec +++ b/ccache.spec @@ -1,7 +1,7 @@ # # spec file for package ccache # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -25,6 +25,7 @@ Group: Development/Languages/C and C++ Url: http://ccache.samba.org/ Source0: http://samba.org/ftp/ccache/%{name}-%{version}.tar.bz2 +Patch1: xclang.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: zlib-devel @@ -37,6 +38,7 @@ again. Supported languages are C, C++, Objective-C and Objective-C++. %prep %setup -q +%patch1 -p1 %build %configure diff --git a/xclang.patch b/xclang.patch new file mode 100644 index 0000000..f907849 --- /dev/null +++ b/xclang.patch @@ -0,0 +1,45 @@ +commit 8e005b067d8c2423e24ee14ffdee8343f650f1e8 +Author: Bernhard Bauer +Date: Tue Aug 16 10:23:55 2011 +0200 + + Support -Xclang compiler option. + +diff --git a/compopt.c b/compopt.c +index 35d51ad..77b57f5 100644 +--- a/compopt.c ++++ b/compopt.c +@@ -49,6 +49,7 @@ static const struct compopt compopts[] = { + {"-U", AFFECTS_CPP | TAKES_ARG | TAKES_CONCAT_ARG}, + {"-V", TAKES_ARG}, + {"-Xassembler", TAKES_ARG}, ++ {"-Xclang", TAKES_ARG}, + {"-Xlinker", TAKES_ARG}, + {"-Xpreprocessor", TOO_HARD_DIRECT | TAKES_ARG}, + {"-aux-info", TAKES_ARG}, +commit 06be1c4cc33bf2def9c6e64483b397128f57dbe3 +Author: Lubos Lunak +Date: Thu Jul 26 14:45:16 2012 +0200 + + hash also Clang plugins + +diff --git a/ccache.c b/ccache.c +index 50b4260..738c022 100644 +--- a/ccache.c ++++ b/ccache.c +@@ -972,6 +972,16 @@ calculate_object_hash(struct args *args, struct mdfour *hash, int direct_mode) + continue; + } + ++ if (str_eq(args->argv[i], "-Xclang") ++ && i + 3 < args->argc ++ && str_eq(args->argv[i+1], "-load") ++ && str_eq(args->argv[i+2], "-Xclang") ++ && stat(args->argv[i+3], &st) == 0) { ++ hash_delimiter(hash, "plugin"); ++ hash_compiler(hash, &st, args->argv[i+3], false); ++ continue; ++ } ++ + /* All other arguments are included in the hash. */ + hash_delimiter(hash, "arg"); + hash_string(hash, args->argv[i]);