Skip to content
Snippets Groups Projects
  • Simon McVittie's avatar
    06392f76
    helpers: Make $PLATFORM detection more generic · 06392f76
    Simon McVittie authored
    
    We can make a pretty good guess at what $PLATFORM will be: on many
    CPU architectures, there is one well-known name for the architecture,
    and $PLATFORM always takes that value. We might as well try it, even
    on otherwise unknown architectures - the worst that can happen is that
    our guess was wrong.
    
    Known exceptions include:
    
    * ARM 32-bit (Debian's porterboxes are v7l or v8l)
    * i386 (Meson calls it x86, but $PLATFORM can be i386, i486, i586 or i686)
    * mips family (Debian's porterboxes are octeon2 or octeon3)
    * PowerPC (Debian's porterbox is power8)
    * s390x (Debian's porterbox is z900)
    * x86_64 ($PLATFORM can sometimes be haswell or xeon_phi)
    
    of which we are unlikely to care about the non-x86 cases in practice.
    
    Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
    06392f76
    History
    helpers: Make $PLATFORM detection more generic
    Simon McVittie authored
    
    We can make a pretty good guess at what $PLATFORM will be: on many
    CPU architectures, there is one well-known name for the architecture,
    and $PLATFORM always takes that value. We might as well try it, even
    on otherwise unknown architectures - the worst that can happen is that
    our guess was wrong.
    
    Known exceptions include:
    
    * ARM 32-bit (Debian's porterboxes are v7l or v8l)
    * i386 (Meson calls it x86, but $PLATFORM can be i386, i486, i586 or i686)
    * mips family (Debian's porterboxes are octeon2 or octeon3)
    * PowerPC (Debian's porterbox is power8)
    * s390x (Debian's porterbox is z900)
    * x86_64 ($PLATFORM can sometimes be haswell or xeon_phi)
    
    of which we are unlikely to care about the non-x86 cases in practice.
    
    Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>