[cfe-dev] ccc patch
Török Edwin
edwintorok at gmail.com
Sun Feb 3 06:33:20 PST 2008
Sanghyeon Seo wrote:
> 2008/2/1, Sam Bishop <sam at bishop.dhs.org>:
> - components = path.rpartition(".")
> + components = path.split(".")[-1]
>
> This is not correct. rpartition returns 3-tuple, for example ('test',
> '.', 'c') for 'test.c'.
>
> Applied, after fixing the above problem.
>
>
ccc now creates object files without an extension, and this breaks
./configure checks with ccc:
$ /home/edwin/llvm-svn/llvm/tools/clang/utils/ccc -c conftest.c
clang -emit-llvm-bc -x c -o conftesto conftest.c
Output of configuring ClamAV with
CC=/home/edwin/llvm-svn/llvm/tools/clang/utils/ccc:
.....
checking limits.h usability... no
checking limits.h presence... yes
configure: WARNING: limits.h: present but cannot be compiled
configure: WARNING: limits.h: check for missing prerequisite headers?
configure: WARNING: limits.h: see the Autoconf documentation
configure: WARNING: limits.h: section "Present But Cannot Be Compiled"
configure: WARNING: limits.h: proceeding with the preprocessor's result
configure: WARNING: limits.h: in the future, the compiler will take
precedence
.....
This patch fixes the problem:
Index: utils/ccc
===================================================================
--- utils/ccc (revision 46686)
+++ utils/ccc (working copy)
@@ -41,7 +41,7 @@
i = path.rfind('.')
if i < 0:
return path
- return path[:i] + newext
+ return path[:i] + "." + newext
def inferlanguage(extension):
if extension == "c":
More information about the cfe-dev
mailing list