git: Rewrite bsd.cpu.gcc50.mk (new cpus types; i386 removed)

John Marino marino at crater.dragonflybsd.org
Fri Mar 4 02:00:46 PST 2016


commit c995a55de10136c7802e86c68e60641021ea01bb
Author: John Marino <draco at marino.st>
Date:   Fri Mar 4 10:35:13 2016 +0100

    Rewrite bsd.cpu.gcc50.mk (new cpus types; i386 removed)
    
    The bsd.cpu.gcc50.mk should have been reworked when gcc50 came into
    base.  The gcc47 version was such an unmaintainable mess (despite putting
    a lot of time into it) that the gcc50 version was just copied from it as
    a "good enough" solution that required work later.  It's time to pay the
    piper.  I've almost rewritten it from scratch with a goal of comprehension
    and maintainability.
    
    - All 32-bit architectures were removed
    - CPU types are formally defined per architecture.  If somebody tries to
      define CPUTYPE to an unrecognized value, the native march flag will be
      set with generic features for that architecture.  It will not propagate
      values that gcc50 doesn't understand (as it did previously)
    - Support for several new cpus have been added.
    - For x86_64 (the only arch currently supported on DF), the recognized
      CPUTYPE values are:
        * athlon64       (aka k8, opteron, athlon-fx)
        * athlon64-sse3  (aka k8-sse3, opteron-sse3)
        * barcelona      (aka amdfam10)
        * bdver(1|2|3|4)
        * bonnell
        * broadwell
        * btver(1|2)
        * core2
        * haswell
        * ivybridge
        * knl
        * nocona
        * nehalem
        * sandybridge
        * silvermont
        * skylake
        * skylake-avx512
        * westmere
        * znver1
    - The method for defining CPU features was reworked.  The new method
      removes a ton of repetition by allowing CPU features to be build on
      other CPUs.  It's more readable and easy to add new ones.  The trade-off
      is that when CPUTYPE is defined to a legal value, the mk file will
      define features for all CPUs internal (OTOH, condition chain is gone).
    - CPU feature has been made fully complete based on GCC 5.3 documention
    - Adding new architectures will be easy using x86_64 as a template
    - General makefile improvements were made
    
    When CPUTYPE is not defined (which is the default), this version of the
    makefile is functionally identical to the previous versions.  Most of the
    improvements are only executed when CPUTYPE type is defined in arguments
    or /etc/make.conf

Summary of changes:
 share/mk/bsd.cpu.gcc50.mk | 221 ++++++++++++++++++----------------------------
 1 file changed, 88 insertions(+), 133 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/c995a55de10136c7802e86c68e60641021ea01bb


-- 
DragonFly BSD source repository



More information about the Commits mailing list