[plt-scheme] mzc, ++ccf <flag> : Add C compiler flag

From: Geoffrey S. Knauth (geoff at knauth.org)
Date: Sun Sep 9 08:36:33 EDT 2007

On Sep 9, 2007, at 07:53, Geoffrey S. Knauth wrote:
> On Sep 9, 2007, at 07:40, Matthew Flatt wrote:
>> I see, though, that if you were building for CGC, then you'd have to
>> use ++ccf instead of ++cppf, because there's no separate pre- 
>> processing
>> step in CGC compilation. To fix that inconsistency, I think all the
>> ++cppf flags should be used for ++ccf, too, which would be  
>> analogous to
>> the way that CPPFLAGS and CFLAGS usually work (I think).
> Thank you, Matthew!  I'm going to do a little test to see if, with  
> gcc, the -I flags are passed to both the preprocessor and the  
> compiler.

1.  My immediate problem is solved (thank you!).

2.  Just noodling around...  I can't tell if gcc uses cpp any more.   
I only see a call to cc1 below.

[gknauth at merlin test]$ cat gcc-test.c
#include <stdio.h>
#include <hidden-message.h>
int main(int argc, char **argv) {
[gknauth at merlin test]$ cat obscure/hidden-message.h
#define MESSAGE "\"I still haven't found what I'm looking for.\" (U2)"
[gknauth at merlin test]$ gcc -v -I `pwd`/obscure gcc-test.c
Using built-in specs.
Target: i686-apple-darwin8
Configured with: /private/var/tmp/gcc/gcc-5367.obj~1/src/configure -- 
disable-checking -enable-werror --prefix=/usr --mandir=/share/man -- 
enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg] 
[^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with- 
slibdir=/usr/lib --build=powerpc-apple-darwin8 --with-arch=nocona -- 
with-tune=generic --program-prefix= --host=i686-apple-darwin8 -- 
Thread model: posix
gcc version 4.0.1 (Apple Computer, Inc. build 5367)
  /usr/libexec/gcc/i686-apple-darwin8/4.0.1/cc1 -quiet -v -I /Users/ 
gknauth/test/plt/t-mysql/test/obscure -D__DYNAMIC__ gcc-test.c -fPIC - 
quiet -dumpbase gcc-test.c -march=nocona -auxbase gcc-test -version - 
o /var/tmp//ccf0Qhgn.s
ignoring nonexistent directory "/usr/lib/gcc/i686-apple- 
#include "..." search starts here:
#include <...> search starts here:
End of search list.
GNU C version 4.0.1 (Apple Computer, Inc. build 5367) (i686-apple- 
	compiled by GNU C version 4.0.1 (Apple Computer, Inc. build 5367).
GGC heuristics: --param ggc-min-expand=100 --param ggc-min- 
Compiler executable checksum: 6194c5c0186b5ef61debe245948e5508
  as -arch i386 -force_cpusubtype_ALL -o /var/tmp//ccCVjNXt.o /var/ 
  /usr/libexec/gcc/i686-apple-darwin8/4.0.1/collect2 -dynamic -arch  
i386 -weak_reference_mismatches non-weak -o a.out -lcrt1.o -L/usr/lib/ 
gcc/i686-apple-darwin8/4.0.1 -L/usr/lib/gcc/i686-apple-darwin8/4.0.1 - 
L/usr/lib/gcc/i686-apple-darwin8/4.0.1/../../.. /var/tmp//ccCVjNXt.o - 
lgcc -lSystem

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20070909/756e5d56/attachment.html>

Posted on the users mailing list.