Monday, November 12, 2012

Building GCC: configure option to pass CFLAGS into generated Makefiles? (the Monkey Speaks)

I am hoping I can use "configure --enable..." below to pass one of the CFLAGS mentioned here into the generated Makefiles that are used when I build gcc, so I can have a copy of gcc that contains the intermediate assembly source...  (Why? It's complicated).

I do not mind script-hacking Makefiles directly, which I have done before, but somehow it seems like it may the wrong way. (?) 

Sometimes, I think that GCC is the monolith, and I am a monkey, with some bones...

-save-temps=obj , -save-temps=cwd, & other optimizations from GCC 4.5 General Optimizer Improvements


With this option, you can pass a string of -f (functionality) flags to the compiler to use when building libstdc++. This option can change the library ABI. FLAGS is a quoted string of options, like
--enable-cxx-flags='-fvtable-gc -fomit-frame-pointer -ansi'
Note that the flags don't necessarily have to all be -f flags, as shown, but usually those are the ones that will make sense for experimentation and configure-time overriding.
The advantage of --enable-cxx-flags over setting CXXFLAGS in the 'make' environment is that, if files are automatically rebuilt, the same flags will be used when compiling those files as well, so that everything matches.

Fun with GCC: Configure

'via Blog this'

No comments:

Post a Comment