[ccache] permit ccache to build with clang

Eitan Adler lists at eitanadler.com
Sun Sep 23 06:40:55 MDT 2012


On 23 September 2012 04:30, Joel Rosdahl <joel at rosdahl.net> wrote:

>> My patch is probably wrong. Is there a different way to make autoconf
>> only pass -l during the link stage?
>
> -I isn't used when linking. What you need to do is to make sure that
> exactly the right set of -I options is used for each source code file.

I'm an idiot: I misread the 'I' as an 'l' and forgot to reread the
original error message.

> A more reasonable way would probably be to make a configure test that
> turns off -Werror for silly compilers.

After some more experimentation this seems to only happen under ccache

[9858 eitan at radar ~ ]%clang -I /usr/local/include -I. -I. -Wall -Wextra -c b.c
clang: warning: argument unused during compilation: '-I /usr/local/include'
clang: warning: argument unused during compilation: '-I .'
clang: warning: argument unused during compilation: '-I .'
[9849 eitan at radar ~ !2!]%whence clang
/usr/local/libexec/ccache/clang
[9850 eitan at radar ~ ]%clang -Wall -Wextra -c b.c
clang: warning: argument unused during compilation: '-I /usr/local/include'
clang: warning: argument unused during compilation: '-I .'
clang: warning: argument unused during compilation: '-I .'
[9851 eitan at radar ~ ]%clang -Wall -Wextra b.c
[9852 eitan at radar ~ ]%/usr/local/bin/clang -I. -I. -Wall -Wextra b.c
[9853 eitan at radar ~ ]%/usr/local/bin/clang -I. -I. -Wall -Wextra -c b.c
[9854 eitan at radar ~ ]%
[9856 eitan at radar ~ ]%<b.c
#include <stdio.h>

int main(void) {
        return 0;
}



-- 
Eitan Adler


More information about the ccache mailing list