[cfe-dev] utils/ccc -print-prog-name
Nuno Lopes
nunoplopes at sapo.pt
Fri Jan 25 04:52:42 PST 2008
Hi,
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 :)
Nuno
Index: utils/ccc
===================================================================
--- utils/ccc (revision 46352)
+++ utils/ccc (working copy)
@@ -19,7 +19,7 @@
sys.exit(1)
def run(args):
- print ' '.join(args)
+ #print ' '.join(args)
code = subprocess.call(args)
if code:
sys.exit(code)
@@ -39,7 +39,7 @@
def main(args):
action = 'link'
output = ''
- compile_opts = ['-U__GNUC__']
+ compile_opts = []
link_opts = []
files = []
@@ -50,6 +50,8 @@
action = 'preprocess'
if arg == '-c':
action = 'compile'
+ if arg[:16] == '-print-prog-name':
+ action = 'print-prog-name'
if arg == '-o':
output = args[i+1]
i += 1
@@ -68,6 +70,11 @@
files.append(arg)
i += 1
+ if action == 'print-prog-name':
+ # assume we can handle everything
+ print sys.argv[0]
+ sys.exit(0)
+
if not files:
error('no input files')
More information about the cfe-dev
mailing list