------- Comment #5 from skunk at iskunk dot org 2006-08-02 16:18 ------- Created an attachment (id=11998) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11998&action=view) test-cc.pl: Fussy compiler simulator script
This is a Perl script I put together to investigate the CFLAGS behavior, instead of repeated bootstraps on my 64-bit Slowaris box. You set the following environment variables... CC=/path/to/test-cc.pl REAL_CC=gcc CFLAGS="(your usual compiler flags) --foobaz" ...and the script will bork if it does not see exactly one instance of --foobaz. Otherwise, it'll remove that option, and invoke $REAL_CC with what remains. The system/stage[23] compiler will, of course, similarly choke if it sees --foobaz. So here, you have a way of verifying that $CC and $CFLAGS are always and only used together. Currently, this is not the case; I'm seeing GCC's stage1 build passing nothing more than "-g" to the compiler, despite CFLAGS. (Even setting STAGE1_CFLAGS in the environment before configure time has no effect.) There is also a point in the stage2 build where $CFLAGS is passed to xgcc. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28515