1.1 --- a/scripts/build/cc/gcc.sh Sun Jul 17 17:56:22 2011 +0200
1.2 +++ b/scripts/build/cc/gcc.sh Sun Jul 17 18:10:53 2011 +0200
1.3 @@ -67,6 +67,7 @@
1.4 y,*,*)
1.5 do_core=y
1.6 core_opts+=( "mode=static" )
1.7 + core_opts+=( "host=${CT_HOST}" )
1.8 core_opts+=( "complibs=${CT_COMPLIBS_DIR}" )
1.9 core_opts+=( "prefix=${CT_CC_CORE_STATIC_PREFIX_DIR}" )
1.10 ;;
1.11 @@ -75,6 +76,7 @@
1.12 ,,nptl)
1.13 do_core=y
1.14 core_opts+=( "mode=static" )
1.15 + core_opts+=( "host=${CT_HOST}" )
1.16 core_opts+=( "complibs=${CT_COMPLIBS_DIR}" )
1.17 core_opts+=( "prefix=${CT_CC_CORE_STATIC_PREFIX_DIR}" )
1.18 ;;
1.19 @@ -102,6 +104,7 @@
1.20 y,*,*)
1.21 do_core=y
1.22 core_opts+=( "mode=baremetal" )
1.23 + core_opts+=( "host=${CT_HOST}" )
1.24 core_opts+=( "build_libgcc=yes" )
1.25 core_opts+=( "build_libstdcxx=yes" )
1.26 core_opts+=( "complibs=${CT_COMPLIBS_DIR}" )
1.27 @@ -115,6 +118,7 @@
1.28 ,,nptl)
1.29 do_core=y
1.30 core_opts+=( "mode=shared" )
1.31 + core_opts+=( "host=${CT_HOST}" )
1.32 core_opts+=( "build_libgcc=yes" )
1.33 core_opts+=( "complibs=${CT_COMPLIBS_DIR}" )
1.34 core_opts+=( "prefix=${CT_CC_CORE_SHARED_PREFIX_DIR}" )
1.35 @@ -122,6 +126,7 @@
1.36 ,,win32)
1.37 do_core=y
1.38 core_opts+=( "mode=static" )
1.39 + core_opts+=( "host=${CT_HOST}" )
1.40 core_opts+=( "build_libgcc=yes" )
1.41 core_opts+=( "complibs=${CT_COMPLIBS_DIR}" )
1.42 core_opts+=( "prefix=${CT_CC_CORE_STATIC_PREFIX_DIR}" )
1.43 @@ -129,6 +134,7 @@
1.44 *)
1.45 do_core=y
1.46 core_opts+=( "mode=static" )
1.47 + core_opts+=( "host=${CT_HOST}" )
1.48 core_opts+=( "complibs=${CT_COMPLIBS_DIR}" )
1.49 core_opts+=( "prefix=${CT_CC_CORE_STATIC_PREFIX_DIR}" )
1.50 if [ "${CT_CC_GCC_4_3_or_later}" = "y" ]; then
1.51 @@ -152,6 +158,7 @@
1.52 # - we need to build statically linked or not : build_staticlinked=[yes|no] (default: no)
1.53 # - where to find the companion libs (prefix) : complibs=<prefix_dir> (no default value)
1.54 # - the prefix to install into (directory) : prefix=<directory> (no default value)
1.55 +# - the machine we will run on (tuple) : host=<tuple> (no default tuple)
1.56 # Usage: do_cc_core_backend mode=[static|shared|baremetal] build_libgcc=[yes|no] build_staticlinked=[yes|no]
1.57 do_cc_core_backend() {
1.58 local mode
1.59 @@ -159,6 +166,7 @@
1.60 local build_libstdcxx=no
1.61 local build_staticlinked=no
1.62 local build_manuals=no
1.63 + local host
1.64 local prefix
1.65 local complibs
1.66 local lang_opt
1.67 @@ -354,7 +362,7 @@
1.68 LDFLAGS="${core_LDFLAGS[*]}" \
1.69 "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/configure" \
1.70 --build=${CT_BUILD} \
1.71 - --host=${CT_HOST} \
1.72 + --host=${host} \
1.73 --target=${CT_TARGET} \
1.74 --prefix="${prefix}" \
1.75 --with-local-prefix="${CT_SYSROOT_DIR}" \