VirtualBox

Changeset 992 in kBuild


Ignore:
Timestamp:
May 29, 2007 7:45:16 PM (18 years ago)
Author:
bird
Message:

Made env.sh reflect that ARCH is more important than CPU. Added keyword suggestions for a bunch of architecture.

Location:
trunk/kBuild
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/kBuild/env.sh

    r811 r992  
    2727#set -x
    2828
    29 # kBuild path.
     29#
     30# Determin the kBuild path from the script location.
     31#
    3032if [ -z "$PATH_KBUILD" ]; then
    3133    PATH_KBUILD=`dirname "$0"`
     
    4042echo "dbg: PATH_KBUILD=$PATH_KBUILD"
    4143
    42 # Type.
     44#
     45# Set default build type.
     46#
    4347if [ -z "$BUILD_TYPE" ]; then
    4448    BUILD_TYPE=release
     
    4751echo "dbg: BUILD_TYPE=$BUILD_TYPE"
    4852
    49 
    50 # Host platform.
    51 if [ -z "$BUILD_PLATFORM_CPU" ]; then
    52     BUILD_PLATFORM_CPU=`uname -m`
    53     case "$BUILD_PLATFORM_CPU" in
    54         x86_64|AMD64|amd64)
    55            BUILD_PLATFORM_CPU='k8'
    56            ;;
    57     esac
    58 fi
    59 export BUILD_PLATFORM_CPU
    60 echo "dbg: BUILD_PLATFORM_CPU=$BUILD_PLATFORM_CPU"
    61 
     53#
     54# Determin the host platform.
     55#
     56# The CPU isn't important, only the other two are.  But, since the cpu,
     57# arch and platform (and build type) share a common key space, try make
     58# sure any new additions are unique. (See header.kmk, KBUILD_OSES/ARCHES.)
     59#
    6260if [ -z "$BUILD_PLATFORM_ARCH" ]; then
    63     case "$BUILD_PLATFORM_CPU" in
    64         i[3456789]86|i86pc)
     61    # Try deduce it from the cpu if given.
     62    if [ -s "$BUILD_PLATFORM_CPU" ]; then
     63        case "$BUILD_PLATFORM_CPU" in
     64            i[3456789]86)
     65                BUILD_PLATFORM_ARCH='x86'
     66                ;;
     67            k8|k8l|k9|k10)
     68                BUILD_PLATFORM_ARCH='amd64'
     69                ;;
     70        esac
     71    fi
     72fi
     73if [ -z "$BUILD_PLATFORM_ARCH" ]; then
     74    # Use uname (lots of guesses here, please help clean this up...)
     75    BUILD_PLATFORM_ARCH=`uname -m`
     76    case "$BUILD_PLATFORM_ARCH" in
     77        x86_64|AMD64|amd64|k8|k8l|k9|k10)
     78            BUILD_PLATFORM_ARCH='amd64'
     79            ;;
     80        x86|i86pc|ia32|i[3456789]86)
    6581            BUILD_PLATFORM_ARCH='x86'
    6682            ;;
    67         k8|k8l|k9|k10)
    68             BUILD_PLATFORM_ARCH='amd64'
    69             ;;
     83        sparc32|sparc)
     84            BUILD_PLATFORM_ARCH='sparc32'
     85            ;;
     86        sparc64)
     87            BUILD_PLATFORM_ARCH='sparc64'
     88            ;;
     89        s390)
     90            ## @todo: 31-bit vs 64-bit on the mainframe?
     91            BUILD_PLATFORM_ARCH='s390'
     92            ;;
     93        ppc32|ppc|powerpc)
     94            BUILD_PLATFORM_ARCH='ppc32'
     95            ;;
     96        ppc64|powerpc64)
     97            BUILD_PLATFORM_ARCH='ppc64'
     98            ;;
     99        mips32|mips)
     100            BUILD_PLATFORM_ARCH='mips32'
     101            ;;
     102        mips64)
     103            BUILD_PLATFORM_ARCH='mips64'
     104            ;;
     105        ia64)
     106            BUILD_PLATFORM_ARCH='ia64'
     107            ;;
     108        #hppa32|hppa|parisc32|parisc)?
     109        hppa32|parisc32)
     110            BUILD_PLATFORM_ARCH='hppa32'
     111            ;;
     112        hppa64|parisc64)
     113            BUILD_PLATFORM_ARCH='hppa64'
     114            ;;
     115        arm)
     116            BUILD_PLATFORM_ARCH='arm'
     117            ;;
     118        alpha)
     119            BUILD_PLATFORM_ARCH='alpha'
     120            ;;
     121
    70122        *)  echo "$0: unknown cpu/arch - $BUILD_PLATFORM_CPU"
    71123            sleep 1
     
    78130echo "dbg: BUILD_PLATFORM_ARCH=$BUILD_PLATFORM_ARCH"
    79131
     132if [ -s "$BUILD_PLATFORM_CPU" ]; then
     133    BUILD_PLATFORM_CPU="blend"
     134fi
     135export BUILD_PLATFORM_CPU
     136echo "dbg: BUILD_PLATFORM_CPU=$BUILD_PLATFORM_CPU"
    80137
    81138if [ -z "$BUILD_PLATFORM" ]; then
     
    125182
    126183
    127 # Target platform.
     184#
     185# The target platform.
     186# Defaults to the host when not specified.
     187#
    128188if [ -z "$BUILD_TARGET_CPU" ]; then
    129     BUILD_TARGET_CPU=$BUILD_PLATFORM_CPU
     189    BUILD_TARGET_CPU="$BUILD_PLATFORM_CPU"
    130190fi
    131191export BUILD_TARGET_CPU
     
    133193
    134194if [ -z "$BUILD_TARGET_ARCH" ]; then
    135     case "$BUILD_TARGET_CPU" in
    136         i[3456789]86|i86pc)
    137             BUILD_TARGET_ARCH='x86'
    138             ;;
    139         k8|k8l|k9|k10)
    140             BUILD_TARGET_ARCH='amd64'
    141             ;;
    142         *)  echo "$0: unknown cpu/arch - $BUILD_TARGET_CPU"
    143             sleep 1
    144             exit 1
    145             ;;
    146     esac
    147 
     195    BUILD_TARGET_ARCH="$BUILD_PLATFORM_ARCH"
    148196fi
    149197export BUILD_TARGET_ARCH
     
    151199
    152200if [ -z "$BUILD_TARGET" ]; then
    153     BUILD_TARGET=$BUILD_PLATFORM
     201    BUILD_TARGET="$BUILD_PLATFORM"
    154202fi
    155203export BUILD_TARGET
     
    161209_PATH_SEP=":"
    162210case "$BUILD_PLATFORM" in
    163     os2|win|win32|win64|nt|winnt|win2k|winxp)
     211    os2|win|nt)
    164212        _SUFF_EXE=".exe"
    165213        _PATH_SEP=";"
     
    167215esac
    168216
    169 # Make shell
     217# Make shell. OS/2 and DOS only?
    170218export MAKESHELL="$PATH_KBUILD/bin/$BUILD_PLATFORM.$BUILD_PLATFORM_ARCH/kmk_ash${_SUFF_EXE}";
    171219
    172 # The PATH.
     220#
     221# Add the bin/x.y/ directory to the PATH.
     222# NOTE! Once bootstrapped this is the only thing that is actually necessary.
     223#
    173224PATH="$PATH_KBUILD/bin/$BUILD_PLATFORM.$BUILD_PLATFORM_ARCH/${_PATH_SEP}$PATH"
    174225export PATH
  • trunk/kBuild/header.kmk

    r989 r992  
    138138#
    139139KBUILD_OSES   := darwin freebsd l4 linux netbsd nt openbsd os2 solaris win
    140 KBUILD_ARCHES := x86 amd64 sparc32 sparc64 mips32 mips64 ppc32 ppc64
     140KBUILD_ARCHES := x86 amd64 sparc32 sparc64 s390 ppc32 ppc64 mips32 mips64 ia64 hppa32 hppa64 arm alpha
    141141
    142142
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette