[cfe-dev] how to get -ast-print to work?

Marko Sch├╝tz MarkoSchuetz at web.de
Thu Feb 4 05:03:33 PST 2010


When I use -ast-print like below, I get an error.

marko at prpad:tmp% clang -cc1 col.c -ast-print
gcc: unrecognized option '-cc1'
/tmp/cc-05816a.s: Assembler messages:
/tmp/cc-05816a.s:4: Warning: unterminated string; newline inserted
/tmp/cc-05816a.s:5: Warning: unterminated string; newline inserted
gcc: unrecognized option '-cc1'

marko at prpad:tmp% file `which clang`
/usr/pkg/bin/clang: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for NetBSD 5.0, stripped

marko at prpad:tmp% file `which gcc`  
/usr/bin/gcc: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for NetBSD 5.0, not stripped

I traced the run of clang: it seems to find /usr/pkg/libexec/clang-cc,
but then apparently forks /usr/bin/gcc.

This is with clang-2.6.

Best regards,

Marko
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100204/a484e5a2/attachment.sig>


More information about the cfe-dev mailing list