On Tue, 9 Dec 2003, Clifford Wolf wrote: > > IMO it would absolutely make sense if gnu autoconf (and automake) would > have a generic support for at least two compilers (and flags): One for > speed and one for size. So it would be possible (once people start using I think you are attempting to use a tool for more than it is intended to accomplish. Autoconf tests basic compiler functionality to ensure that code can be compiled with "reasonable" default options. Optimizations are a user or maintainer responsibility. Support for special optimizations can easily be added by the maintainer in the body of configure.ac. Automake supports the ability to pass per-target CFLAGS so the maintainer has the ability to control CFLAGS at the makefile level. The maintainer is free to extend, override, or discard, the Autoconf CFLAGS value, although users may be disconcerted if they don't see the CFLAGS they specify being used. > I can guess that this is likely to require a major redesign of some > autoconf parts - but I do know from my tests that this does absolutely > make sense (if creating good binaries is a declared target). The notion of "good binaries" as you describe is very target dependent. If the processor has a small cache or the system has constrained memory, then optimizing for size may speed things up, but it may very well slow things down on a different system. You are free to run a benchmark within the configure script to see which CFLAGS options produce the best performance for a given scrap of code. > BTW: Does autoconf support running a test with -fprofile-arcs and then > rebuilding with -fbranch-probabilities ? I configure to use -fprofile-arcs in my configure script. Doing a re-build with -fbranch-probabilities seems more like a procedural, or 'make' issue. Autoconf has nothing to do with make. Bob ====================================== Bob Friesenhahn bfriesen@xxxxxxxxxxxxxxxxxxx http://www.simplesystems.org/users/bfriesen