ccc -g

I'm seeing some really strange behaviour with ccc and -g.

If -g is present twice, clang hard-errors (which is a problem since this happens a lot when makefiles do CFLAGS += -g and inherit -g from the environment. It's very common with XCode too.)

If -g is present once, then clang runs but somehow fails. The reason that this is very strange is that if I set CCC_ECHO and then copy the clang command the ccc claims to be executing... it works.

David

Hi David,

I think you are using the old ccc (utils/ccc); could you try with the
new ccc (tools/ccc/ccc) and see if you have better results?

I see:

Hi David,

I think you are using the old ccc (utils/ccc); could you try with the
new ccc (tools/ccc/ccc) and see if you have better results?

Yes, I was. Last time I tried tools/ccc/ccc it didn't work at all. Seems to be a bit better now...

I see:
--
ddunbar@frank:CodeGen$ ~/llvm/tools/clang/tools/ccc/ccc -### -S -g -g
-g -x c /dev/null
ccc: Unknown host 'linux', using generic host information.
ccc version 1.0
"clang" "-S" "--disable-fp-elim" "--nozero-initialized-in-bss" "-g"
"-o" "null.s" "-x" "c" "/dev/null"
--

Feel free to file any problems you have with the new ccc in bugzilla.

It seems to work. Now I'm getting a weird failure with clang thinking that a function declared as:

const char *
gs_skip_type_qualifier_and_layout_info (const char *types)

should compile to:

declare i32 @gs_skip_type_qualifier_and_layout_info(i8*, i8*)

I'll see if I can work out what is going on there...

David

Yes, I was. Last time I tried tools/ccc/ccc it didn't work at all. Seems
to be a bit better now...

Ok. Please make me aware of issues, I would like to get rid of
utils/ccc fairly soon.

It seems to work. Now I'm getting a weird failure with clang thinking that
a function declared as:

const char *
gs_skip_type_qualifier_and_layout_info (const char *types)

should compile to:

declare i32 @gs_skip_type_qualifier_and_layout_info(i8*, i8*)

This is likely due to a bug in the caching mechanism I am doing for
ABI handling. I have temporarily disabled it while I investigate the
problem. Did r63780 magically fix this problem for you?

- Daniel