This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: proposal: Default settings from environment


On Tuesday 11 March 2003 01:25 pm, Andrew Haley wrote:
> Neal D. Becker writes:
>  > On Tuesday 11 March 2003 01:03 pm, Andrew Haley wrote:
>  > > Neal D. Becker writes:
>  > >
>  > > I'm a bit mystified by this.  Why can't you use $CC instead of gcc,
>  > > with $CC set to "gcc arg arg..."  ?
>  >
>  > The problem is not for me to modify my makefiles.  The problem is to
>  > setup defaults for my users.  They may or may not know anything about
>  > gcc or make.
>
> So, if they don't know anything about gcc, why can't you tell them
> "Don't type `gcc`, type `$CC` or things won't work right." ?
>
> In other words, why does your command that invokes gcc with some
> appropriate default options have to be called "gcc"?
>

How about they are building a project, and the makefiles run "cc" or "gcc".

Honestly, it's currently too much trouble to get a good set of optimizations 
for your platform with gcc.  There now exists a project whose sole reason for 
existence is to suggest gcc optimization switches.  This is silly.  Why can't 
gcc suggest it's own optimizations for the platform?  

I currently have a bunch of athons, some athlon-xp, a bunch of pentium4.  
Ideally, it would be easy to get a good guess as to optimizations for each 
platform.  Right now, it's not trivial to produce a makefile that would 
target each platform.

Another possible approach would be to add to -O.  Something like -Ofp could 
try to select the best floating point.  For example, on p4 this could give 
-march=pentium4 -mcpu=pentium4 -mfpmath=sse -msse2.  This approach would 
allow a single, simple makefile to optimize for any target.  The knowledge of 
how best to optimize would be moved back to the tool that probably has the 
best information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]