Message107815
-bash-3.00$ cat _configtest.c
// xxx
-bash-3.00$
-------------------------------------
This is how the C compiler is invoked:
$ cc -E -o _configtest.i _configtest.c
# 1 "_configtest.c"
#ident "acomp: Sun C 5.9 SunOS_i386 2007/05/03"
$
It does not generate a _configtest.i file .. which is because the `-E` option on Solaris sends the preprocessed output directly to `stdout` without respecting the `-o` option. From "man cc",
-E Runs the source file through the preprocessor only and
sends the output to stdout. The preprocessor is built
directly into the compiler, except in -Xs mode, where
/usr/ccs/lib/cpp is invoked. Includes the preprocessor
line numbering information. See also -P option.
But the `-P` option does output to the .i file:
-P Preprocesses only the named C files and leaves the
result in corresponding files suffixed .i. The output
will not contain any preprocessing line directives,
unlike -E.
So the fix is to use `-P` instead of `-E` on Solaris. I see that `-E` is used in lib/python2.7/distutils/ccompiler.py .. around this line:
else:
cpp = cc + " -E" # not always
Tarek, note the "not always" command above. At least, we now know that on Solaris this happens to be "-P".
The resulting .i file is:
-bash-3.00$ cat _configtest.i
#ident "acomp: Sun C 5.9 SunOS_i386 2007/05/03"
-bash-3.00$
-------------------------------------
As for `cc` itself:
-bash-3.00$ which cc
/usr/bin/cc
-bash-3.00$ cc -V
cc: Sun C 5.9 SunOS_i386 2007/05/03
usage: cc [ options] files. Use 'cc -flags' for details |
|
Date |
User |
Action |
Args |
2010-06-14 21:53:42 | srid | set | recipients:
+ srid, tarek |
2010-06-14 21:53:42 | srid | set | messageid: <1276552422.47.0.672081295596.issue8918@psf.upfronthosting.co.za> |
2010-06-14 21:53:40 | srid | link | issue8918 messages |
2010-06-14 21:53:40 | srid | create | |
|