scripts/crosstool-NG.sh.in: On MacOS/BSD use the output of CT_DoConfigGuess for CT_BUILD.
authorTitus von Boxberg <titus@v9g.de>
Wed May 19 18:13:00 2010 +0200 (2010-05-19)
changeset 1958b9ffc1ef43df
parent 1957 0b638721bff2
child 1959 a86d3c6ad7fe
scripts/crosstool-NG.sh.in: On MacOS/BSD use the output of CT_DoConfigGuess for CT_BUILD.

On 64bit MacOS `gcc -dumpmachine` gives i686 for the host machine.
This conflicts with the expectations of some following configure scripts
that a 64bit x86 is given as x86_64; i686 is understood as a 32 bit machine.
config.guess sets the host machine in CT_BUILD correctly.

yann.morin.1998@anciens.enib.fr:
As suggested by Khem RAJ on the ML, always use config.guess.
scripts/crosstool-NG.sh.in
     1.1 --- a/scripts/crosstool-NG.sh.in	Mon May 17 11:29:26 2010 +0200
     1.2 +++ b/scripts/crosstool-NG.sh.in	Wed May 19 18:13:00 2010 +0200
     1.3 @@ -332,9 +332,9 @@
     1.4      fi
     1.5  
     1.6      # Determine build system if not set by the user
     1.7 -    case "${CT_BUILD}" in
     1.8 -        "") CT_BUILD=$("${CT_BUILD_PREFIX}gcc${CT_BUILD_SUFFIX}" -dumpmachine);;
     1.9 -    esac
    1.10 +    if [ -z "${CT_BUILD}" ]; then
    1.11 +        CT_BUILD=$(CT_DoConfigGuess)
    1.12 +    fi
    1.13  
    1.14      # Prepare mangling patterns to later modify BUILD and HOST (see below)
    1.15      case "${CT_TOOLCHAIN_TYPE}" in