utils/ccc -print-prog-name


Below you'll find a patch to add support for 'ccc -print-prog-name=ld'. This is used by autoconf+libtool based ./configure.
I've also removed the -U__GNUC__ argument, as clang aims to be gcc compatible, so let's use the full power :slight_smile:


Index: utils/ccc

Thanks. Applied with a little changes. (See below.)

- print ' '.join(args)
+ #print ' '.join(args)

I want to keep this. This print is helpful when ccc behaves unexpectedly.

+ if arg[:16] == '-print-prog-name':
+ action = 'print-prog-name'

Better arg.startswith('-print-prog-name').

+ if action == 'print-prog-name':
+ # assume we can handle everything
+ print sys.argv[0]
+ sys.exit(0)

Better return here.

Thank you!

P.S.: shh, I'm a PHP core developer, so don't tell anyone I made a patch to a python script :stuck_out_tongue: