scripts/crosstool-NG.sh.in
branchcanadian
changeset 1426 cb3b1f427968
parent 1425 4131f2e955aa
child 1433 f04c7879f3c2
child 1444 8f6a793dc5b5
     1.1 --- a/scripts/crosstool-NG.sh.in	Fri Jun 26 19:09:22 2009 +0200
     1.2 +++ b/scripts/crosstool-NG.sh.in	Fri Jun 26 19:09:22 2009 +0200
     1.3 @@ -321,18 +321,20 @@
     1.4  
     1.5      # Prepare mangling patterns to later modify BUILD and HOST (see below)
     1.6      case "${CT_TOOLCHAIN_TYPE}" in
     1.7 -        canadian)
     1.8 -            CT_REAL_TARGET="${CT_TARGET}"
     1.9 -            build_mangle="build_"
    1.10 -            host_mangle="host_"
    1.11 -            install_build_tools_for="BUILD HOST TARGET"
    1.12 -            ;;
    1.13          cross)
    1.14 +            # A cross-compiler runs on the same machine it is built on
    1.15              CT_HOST="${CT_BUILD}"
    1.16              build_mangle="build_"
    1.17              host_mangle="build_"
    1.18 +            target_mangle=""
    1.19              install_build_tools_for="BUILD HOST"
    1.20              ;;
    1.21 +        canadian)
    1.22 +            build_mangle="build_"
    1.23 +            host_mangle="host_"
    1.24 +            target_mangle=""
    1.25 +            install_build_tools_for="BUILD HOST TARGET"
    1.26 +            ;;
    1.27          *)  CT_Abort "No code for '${CT_TOOLCHAIN_TYPE}' toolchain type!"
    1.28              ;;
    1.29      esac
    1.30 @@ -340,11 +342,13 @@
    1.31      # Save the real tuples to generate shell-wrappers to the real tools
    1.32      CT_REAL_BUILD="${CT_BUILD}"
    1.33      CT_REAL_HOST="${CT_HOST}"
    1.34 +    CT_REAL_TARGET="${CT_TARGET}"
    1.35  
    1.36      # Canonicalise CT_BUILD and CT_HOST
    1.37      # Not only will it give us full-qualified tuples, but it will also ensure
    1.38      # that they are valid tuples (in case of typo with user-provided tuples)
    1.39      # That's way better than trying to rewrite config.sub ourselves...
    1.40 +    # CT_TARGET is already made canonical in CT_DoBuildTargetTuple
    1.41      CT_BUILD=$(CT_DoConfigSub "${CT_BUILD}")
    1.42      CT_HOST=$(CT_DoConfigSub "${CT_HOST}")
    1.43  
    1.44 @@ -354,6 +358,7 @@
    1.45      #       support canadain build, later...
    1.46      CT_BUILD="${CT_BUILD/-/-${build_mangle}}"
    1.47      CT_HOST="${CT_HOST/-/-${host_mangle}}"
    1.48 +    CT_TARGET="${CT_TARGET/-/-${target_mangle}}"
    1.49  
    1.50      # Now we have mangled our BUILD and HOST tuples, we must fake the new
    1.51      # cross-tools for those mangled tuples.