Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Sep 1995 00:38:46 -0700 (PDT)
From:      Jake Hamby <jehamby@lightside.com>
To:        hackers@freebsd.org
Subject:   -m486 option to GCC
Message-ID:  <Pine.BSF.3.91.950908003145.166A-100000@localhost>

next in thread | raw e-mail | index | archive | help
I remember in my Linux days that the '-m486' option was often passed to 
GCC to provide optimizations for 486-class PC's.  Apparently it didn't 
generate 486-specific code but simply padded functions out in such a way 
that performance was improved on 486's without sacrificing compatibility 
with 386's.  If you build GCC on a "i486-*-*" machine it will include the 
"-m486" option by default but on a "i386-*-*" machine, it won't.

My question is:  In Linux, 'uname -m' will tell you 'i486' if you have a 
486 or 'i386' otherwise (I'm not sure about Pentiums), whereas under 
FreeBSD, it always returns 'i386'.  Therefore GCC by default is built NOT 
to include the '-m486' option by default.  I would recommend that either:

a) The kernel be changed to return the "proper" machine name, and GCC be
recompiled with 486 optimizations on by default (since it doesn't hurt 
performance on 386's).  Of course purists would argue that 'i386' is the 
generic architecture name and shouldn't change depending on which machine 
you run 'uname' on.

b) When running "configure" in the build tree for GCC, the canonical name
be manually overridden to "i486-unknown-freebsd2.x.x" instead of
"i386-unknown-freebsd2.x.x" to build in this optimization. 

Note that the default Makefiles generated by imake under XFree86 will 
always include '-m486' anyway.  Comments?

-------------------------------------------------------------------------------
     Jake Hamby                         |   E-Mail:  jehamby@lightside.com
  Student, Cal Poly University, Pomona  |   System Administrator, JPL
-------------------------------------------------------------------------------




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.950908003145.166A-100000>