Merge the canadian branch to default.
Now the preliminray support for canadian-crosses is done,
merge to default. The few remaining quirks, if any, will
be resolved on mainstream.
1.1 --- a/config/toolchain.in Tue Jun 23 22:57:12 2009 +0200
1.2 +++ b/config/toolchain.in Fri Jun 26 19:55:33 2009 +0200
1.3 @@ -123,7 +123,7 @@
1.4
1.5 config CANADIAN
1.6 bool
1.7 - prompt "Canadian (NO CODE!) (EXPERIMENTAL)"
1.8 + prompt "Canadian (EXPERIMENTAL)"
1.9 depends on EXPERIMENTAL
1.10 help
1.11 Build a canadian-toolchain.
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/samples/mingw32,i686-none-linux-gnu/crosstool.config Fri Jun 26 19:55:33 2009 +0200
2.3 @@ -0,0 +1,357 @@
2.4 +#
2.5 +# Automatically generated make config: don't edit
2.6 +# crosstool-NG version: hg:canadian@1421:d39f714dce54
2.7 +# Mon Jun 22 18:27:13 2009
2.8 +#
2.9 +
2.10 +#
2.11 +# Paths and misc options
2.12 +#
2.13 +
2.14 +#
2.15 +# crosstool-NG behavior
2.16 +#
2.17 +# CT_OBSOLETE is not set
2.18 +CT_EXPERIMENTAL=y
2.19 +# CT_DEBUG_CT is not set
2.20 +
2.21 +#
2.22 +# Paths
2.23 +#
2.24 +CT_LOCAL_TARBALLS_DIR="${HOME}/src"
2.25 +CT_SAVE_TARBALLS=y
2.26 +CT_WORK_DIR="${CT_TOP_DIR}/targets"
2.27 +CT_PREFIX_DIR="${HOME}/x-tools/${samp_name}"
2.28 +CT_INSTALL_DIR="${CT_PREFIX_DIR}"
2.29 +# CT_CUSTOM_PATCH is not set
2.30 +CT_REMOVE_DOCS=y
2.31 +# CT_INSTALL_DIR_RO is not set
2.32 +
2.33 +#
2.34 +# Downloading
2.35 +#
2.36 +# CT_FORBID_DOWNLOAD is not set
2.37 +# CT_FORCE_DOWNLOAD is not set
2.38 +# CT_USE_MIRROR is not set
2.39 +CT_CONNECT_TIMEOUT=10
2.40 +# CT_ONLY_DOWNLOAD is not set
2.41 +
2.42 +#
2.43 +# Extracting
2.44 +#
2.45 +# CT_FORCE_EXTRACT is not set
2.46 +CT_OVERIDE_CONFIG_GUESS_SUB=y
2.47 +# CT_ONLY_EXTRACT is not set
2.48 +
2.49 +#
2.50 +# Build behavior
2.51 +#
2.52 +CT_PARALLEL_JOBS=4
2.53 +CT_LOAD=0
2.54 +CT_NICE=0
2.55 +CT_USE_PIPES=y
2.56 +# CT_CONFIG_SHELL_ASH is not set
2.57 +
2.58 +#
2.59 +# Logging
2.60 +#
2.61 +# CT_LOG_ERROR is not set
2.62 +# CT_LOG_WARN is not set
2.63 +# CT_LOG_INFO is not set
2.64 +CT_LOG_EXTRA=y
2.65 +# CT_LOG_DEBUG is not set
2.66 +# CT_LOG_ALL is not set
2.67 +CT_LOG_LEVEL_MAX="EXTRA"
2.68 +# CT_LOG_SEE_TOOLS_WARN is not set
2.69 +CT_LOG_PROGRESS_BAR=y
2.70 +CT_LOG_TO_FILE=y
2.71 +CT_LOG_FILE_COMPRESS=y
2.72 +
2.73 +#
2.74 +# Target options
2.75 +#
2.76 +CT_ARCH="x86"
2.77 +# CT_ARCH_64 is not set
2.78 +# CT_ARCH_SUPPORTS_BOTH_MMU is not set
2.79 +# CT_ARCH_SUPPORTS_BOTH_ENDIAN is not set
2.80 +CT_ARCH_SUPPORT_ARCH=y
2.81 +# CT_ARCH_SUPPORT_ABI is not set
2.82 +CT_ARCH_SUPPORT_CPU=y
2.83 +CT_ARCH_SUPPORT_TUNE=y
2.84 +# CT_ARCH_SUPPORT_FPU is not set
2.85 +# CT_ARCH_DEFAULT_HAS_MMU is not set
2.86 +# CT_ARCH_DEFAULT_BE is not set
2.87 +# CT_ARCH_DEFAULT_LE is not set
2.88 +CT_ARCH_ARCH="i686"
2.89 +CT_ARCH_CPU=""
2.90 +CT_ARCH_TUNE="i686"
2.91 +CT_ARCH_FLOAT_HW=y
2.92 +# CT_ARCH_FLOAT_SW is not set
2.93 +CT_TARGET_CFLAGS=""
2.94 +CT_TARGET_LDFLAGS=""
2.95 +
2.96 +#
2.97 +# General target options
2.98 +#
2.99 +# CT_ARCH_alpha is not set
2.100 +# CT_ARCH_arm is not set
2.101 +# CT_ARCH_ia64 is not set
2.102 +# CT_ARCH_mips is not set
2.103 +# CT_ARCH_powerpc is not set
2.104 +# CT_ARCH_powerpc64 is not set
2.105 +# CT_ARCH_sh is not set
2.106 +CT_ARCH_x86=y
2.107 +# CT_ARCH_x86_64 is not set
2.108 +CT_ARCH_USE_MMU=y
2.109 +
2.110 +#
2.111 +# Target optimisations
2.112 +#
2.113 +
2.114 +#
2.115 +# Toolchain options
2.116 +#
2.117 +
2.118 +#
2.119 +# General toolchain options
2.120 +#
2.121 +CT_USE_SYSROOT=y
2.122 +CT_SYSROOT_DIR_PREFIX=""
2.123 +CT_SHARED_LIBS=y
2.124 +
2.125 +#
2.126 +# Tuple completion and aliasing
2.127 +#
2.128 +CT_TARGET_VENDOR="none"
2.129 +CT_TARGET_ALIAS_SED_EXPR=""
2.130 +CT_TARGET_ALIAS=""
2.131 +
2.132 +#
2.133 +# Toolchain type
2.134 +#
2.135 +# CT_NATIVE is not set
2.136 +# CT_CROSS is not set
2.137 +# CT_CROSS_NATIVE is not set
2.138 +CT_CANADIAN=y
2.139 +CT_TOOLCHAIN_TYPE="canadian"
2.140 +
2.141 +#
2.142 +# Build system
2.143 +#
2.144 +CT_BUILD=""
2.145 +CT_BUILD_PREFIX=""
2.146 +CT_BUILD_SUFFIX=""
2.147 +
2.148 +#
2.149 +# Host system
2.150 +#
2.151 +CT_HOST="mingw32"
2.152 +CT_HOST_PREFIX="mingw32-"
2.153 +CT_HOST_SUFFIX=""
2.154 +
2.155 +#
2.156 +# Target system
2.157 +#
2.158 +CT_TARGET_PREFIX="i686-none-linux-gnu-"
2.159 +CT_TARGET_SUFFIX=""
2.160 +
2.161 +#
2.162 +# Operating System
2.163 +#
2.164 +# CT_BARE_METAL is not set
2.165 +CT_KERNEL="linux"
2.166 +CT_KERNEL_VERSION="2.6.29.4"
2.167 +# CT_KERNEL_bare_metal is not set
2.168 +CT_KERNEL_linux=y
2.169 +CT_KERNEL_LINUX_INSTALL=y
2.170 +CT_KERNEL_LINUX_INSTALL_CHECK=y
2.171 +# CT_KERNEL_V_2_6_18_8 is not set
2.172 +# CT_KERNEL_V_2_6_19_7 is not set
2.173 +# CT_KERNEL_V_2_6_20_21 is not set
2.174 +# CT_KERNEL_V_2_6_21_7 is not set
2.175 +# CT_KERNEL_V_2_6_22_19 is not set
2.176 +# CT_KERNEL_V_2_6_23_17 is not set
2.177 +# CT_KERNEL_V_2_6_24_7 is not set
2.178 +# CT_KERNEL_V_2_6_25_20 is not set
2.179 +# CT_KERNEL_V_2_6_26_8 is not set
2.180 +# CT_KERNEL_V_2_6_27_24 is not set
2.181 +# CT_KERNEL_V_2_6_28_10 is not set
2.182 +# CT_KERNEL_V_2_6_29 is not set
2.183 +# CT_KERNEL_V_2_6_29_1 is not set
2.184 +# CT_KERNEL_V_2_6_29_2 is not set
2.185 +# CT_KERNEL_V_2_6_29_3 is not set
2.186 +CT_KERNEL_V_2_6_29_4=y
2.187 +# CT_KERNEL_V_select is not set
2.188 +CT_KERNEL_LINUX_VERBOSITY_0=y
2.189 +# CT_KERNEL_LINUX_VERBOSITY_1 is not set
2.190 +# CT_KERNEL_LINUX_VERBOSITY_2 is not set
2.191 +CT_KERNEL_LINUX_VERBOSE_LEVEL=0
2.192 +# CT_KERNEL_LINUX_USE_CUSTOM_HEADERS is not set
2.193 +
2.194 +#
2.195 +# Companion libraries
2.196 +#
2.197 +CT_GMP_MPFR=y
2.198 +# CT_GMP_V_4_2_2 is not set
2.199 +CT_GMP_V_4_2_4=y
2.200 +CT_GMP_VERSION="4.2.4"
2.201 +# CT_MPFR_V_2_3_1 is not set
2.202 +# CT_MPFR_V_2_3_2 is not set
2.203 +# CT_MPFR_V_2_4_0 is not set
2.204 +CT_MPFR_V_2_4_1=y
2.205 +CT_MPFR_VERSION="2.4.1"
2.206 +# CT_PPL_CLOOG_MPC is not set
2.207 +
2.208 +#
2.209 +# Companion libraries common options
2.210 +#
2.211 +# CT_COMP_LIBS_CHECK is not set
2.212 +# CT_COMP_LIBS_TARGET is not set
2.213 +
2.214 +#
2.215 +# Binary utilities
2.216 +#
2.217 +CT_ARCH_BINFMT_ELF=y
2.218 +# CT_ARCH_BINFMT_FLAT is not set
2.219 +
2.220 +#
2.221 +# GNU binutils
2.222 +#
2.223 +CT_BINUTILS_VERSION="2.19.1"
2.224 +# CT_BINUTILS_V_2_14 is not set
2.225 +# CT_BINUTILS_V_2_15 is not set
2.226 +# CT_BINUTILS_V_2_16_1 is not set
2.227 +# CT_BINUTILS_V_2_17 is not set
2.228 +# CT_BINUTILS_V_2_18 is not set
2.229 +# CT_BINUTILS_V_2_18_50_0_4 is not set
2.230 +# CT_BINUTILS_V_2_18_50_0_6 is not set
2.231 +# CT_BINUTILS_V_2_18_50_0_7 is not set
2.232 +# CT_BINUTILS_V_2_18_50_0_8 is not set
2.233 +# CT_BINUTILS_V_2_18_50_0_9 is not set
2.234 +# CT_BINUTILS_V_2_18_90 is not set
2.235 +# CT_BINUTILS_V_2_18_91 is not set
2.236 +# CT_BINUTILS_V_2_18_92 is not set
2.237 +# CT_BINUTILS_V_2_18_93 is not set
2.238 +# CT_BINUTILS_V_2_19 is not set
2.239 +CT_BINUTILS_V_2_19_1=y
2.240 +# CT_BINUTILS_V_2_19_50_0_1 is not set
2.241 +# CT_BINUTILS_V_2_19_51_0_1 is not set
2.242 +# CT_BINUTILS_V_2_19_51_0_2 is not set
2.243 +CT_BINUTILS_EXTRA_CONFIG="--enable-targets=i686-none-linux-gnu"
2.244 +# CT_BINUTILS_FOR_TARGET is not set
2.245 +
2.246 +#
2.247 +# C compiler
2.248 +#
2.249 +CT_CC="gcc"
2.250 +CT_CC_VERSION="4.3.2"
2.251 +CT_CC_gcc=y
2.252 +# CT_CC_V_3_2_3 is not set
2.253 +# CT_CC_V_3_3_6 is not set
2.254 +# CT_CC_V_3_4_6 is not set
2.255 +# CT_CC_V_4_0_0 is not set
2.256 +# CT_CC_V_4_0_1 is not set
2.257 +# CT_CC_V_4_0_2 is not set
2.258 +# CT_CC_V_4_0_3 is not set
2.259 +# CT_CC_V_4_0_4 is not set
2.260 +# CT_CC_V_4_1_0 is not set
2.261 +# CT_CC_V_4_1_1 is not set
2.262 +# CT_CC_V_4_1_2 is not set
2.263 +# CT_CC_V_4_2_0 is not set
2.264 +# CT_CC_V_4_2_1 is not set
2.265 +# CT_CC_V_4_2_2 is not set
2.266 +# CT_CC_V_4_2_3 is not set
2.267 +# CT_CC_V_4_2_4 is not set
2.268 +# CT_CC_V_4_3_0 is not set
2.269 +# CT_CC_V_4_3_1 is not set
2.270 +CT_CC_V_4_3_2=y
2.271 +# CT_CC_V_4_3_3 is not set
2.272 +# CT_CC_V_4_4_0 is not set
2.273 +CT_CC_GCC_4_3_or_later=y
2.274 +# CT_CC_GCC_4_4_or_later is not set
2.275 +CT_CC_CXA_ATEXIT=y
2.276 +CT_CC_SJLJ_EXCEPTIONS_CONFIGURE=y
2.277 +# CT_CC_SJLJ_EXCEPTIONS_USE is not set
2.278 +# CT_CC_SJLJ_EXCEPTIONS_DONT_USE is not set
2.279 +CT_CC_CORE_EXTRA_CONFIG=""
2.280 +CT_CC_EXTRA_CONFIG=""
2.281 +CT_CC_PKGVERSION="crosstool-NG-${CT_VERSION}"
2.282 +CT_CC_BUGURL=""
2.283 +CT_CC_SUPPORT_CXX=y
2.284 +CT_CC_SUPPORT_FORTRAN=y
2.285 +CT_CC_SUPPORT_JAVA=y
2.286 +CT_CC_SUPPORT_ADA=y
2.287 +CT_CC_SUPPORT_OBJC=y
2.288 +CT_CC_SUPPORT_OBJCXX=y
2.289 +
2.290 +#
2.291 +# Additional supported languages:
2.292 +#
2.293 +CT_CC_LANG_CXX=y
2.294 +# CT_CC_LANG_FORTRAN is not set
2.295 +# CT_CC_LANG_JAVA is not set
2.296 +# CT_CC_LANG_ADA is not set
2.297 +# CT_CC_LANG_OBJC is not set
2.298 +# CT_CC_LANG_OBJCXX is not set
2.299 +CT_CC_LANG_OTHERS=""
2.300 +CT_LIBC="glibc"
2.301 +
2.302 +#
2.303 +# C-library
2.304 +#
2.305 +CT_LIBC_VERSION="2.9"
2.306 +# CT_LIBC_eglibc is not set
2.307 +CT_LIBC_glibc=y
2.308 +# CT_LIBC_uClibc is not set
2.309 +# CT_LIBC_V_2_3_6 is not set
2.310 +# CT_LIBC_V_2_5 is not set
2.311 +# CT_LIBC_V_2_5_1 is not set
2.312 +# CT_LIBC_V_2_6 is not set
2.313 +# CT_LIBC_V_2_6_1 is not set
2.314 +# CT_LIBC_V_2_7 is not set
2.315 +# CT_LIBC_V_2_8 is not set
2.316 +CT_LIBC_V_2_9=y
2.317 +# CT_LIBC_V_LATEST is not set
2.318 +# CT_LIBC_V_date is not set
2.319 +CT_LIBC_GLIBC_2_8_or_later=y
2.320 +CT_LIBC_GLIBC_TARBALL=y
2.321 +# CT_LIBC_GLIBC_CVS is not set
2.322 +
2.323 +#
2.324 +# glibc/eglibc common options
2.325 +#
2.326 +CT_LIBC_GLIBC_EXTRA_CONFIG=""
2.327 +CT_LIBC_GLIBC_CONFIGPARMS=""
2.328 +CT_LIBC_GLIBC_EXTRA_CFLAGS=""
2.329 +CT_LIBC_EXTRA_CC_ARGS=""
2.330 +# CT_LIBC_GLIBC_USE_PORTS is not set
2.331 +CT_LIBC_ADDONS_LIST=""
2.332 +# CT_LIBC_GLIBC_KERNEL_VERSION_NONE is not set
2.333 +CT_LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS=y
2.334 +# CT_LIBC_GLIBC_KERNEL_VERSION_CHOSEN is not set
2.335 +CT_LIBC_GLIBC_MIN_KERNEL="2.6.29.4"
2.336 +
2.337 +#
2.338 +# Common C library options
2.339 +#
2.340 +CT_LIBC_SUPPORT_NPTL=y
2.341 +CT_LIBC_SUPPORT_LINUXTHREADS=y
2.342 +CT_THREADS="nptl"
2.343 +CT_THREADS_NPTL=y
2.344 +# CT_THREADS_LINUXTHREADS is not set
2.345 +# CT_THREADS_NONE is not set
2.346 +
2.347 +#
2.348 +# Tools facilities
2.349 +#
2.350 +# CT_TOOL_libelf is not set
2.351 +# CT_TOOL_sstrip is not set
2.352 +
2.353 +#
2.354 +# Debug facilities
2.355 +#
2.356 +# CT_DEBUG_dmalloc is not set
2.357 +# CT_DEBUG_duma is not set
2.358 +# CT_DEBUG_gdb is not set
2.359 +# CT_DEBUG_ltrace is not set
2.360 +# CT_DEBUG_strace is not set
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/samples/mingw32,i686-none-linux-gnu/reported.by Fri Jun 26 19:55:33 2009 +0200
3.3 @@ -0,0 +1,3 @@
3.4 +reporter_name="Bart vd. Meulen"
3.5 +reporter_url=""
3.6 +reporter_comment="Sample for building a canadian cross-compiler"
4.1 --- a/scripts/build/cc/gcc.sh Tue Jun 23 22:57:12 2009 +0200
4.2 +++ b/scripts/build/cc/gcc.sh Fri Jun 26 19:55:33 2009 +0200
4.3 @@ -41,6 +41,10 @@
4.4 #------------------------------------------------------------------------------
4.5 # Core gcc pass 1
4.6 do_cc_core_pass_1() {
4.7 + # If we're building a canadian compiler no use to build the CC
4.8 + # core compiler, we're not using it
4.9 + [ -n "${CT_CANADIAN}" ] && return 0
4.10 +
4.11 # If we're building for bare metal, build the static core gcc,
4.12 # with libgcc.
4.13 # In case we're not bare metal, and we're NPTL, build the static core gcc.
4.14 @@ -54,6 +58,10 @@
4.15
4.16 # Core gcc pass 2
4.17 do_cc_core_pass_2() {
4.18 + # If we're building a canadian compiler no use to build the CC
4.19 + # core compiler, we're not using it
4.20 + [ -n "${CT_CANADIAN}" ] && return 0
4.21 +
4.22 # In case we're building for bare metal, do nothing, we already have
4.23 # our compiler.
4.24 # In case we're NPTL, build the shared core gcc and the target libgcc.
5.1 --- a/scripts/build/internals.sh Tue Jun 23 22:57:12 2009 +0200
5.2 +++ b/scripts/build/internals.sh Fri Jun 26 19:55:33 2009 +0200
5.3 @@ -9,9 +9,7 @@
5.4 CT_DoStep INFO "Cleaning-up the toolchain's directory"
5.5
5.6 CT_DoLog EXTRA "Removing access to the build system tools"
5.7 - find "${CT_PREFIX_DIR}/bin" -name "${CT_BUILD}-"'*' -exec rm -fv {} \; |CT_DoLog DEBUG
5.8 - find "${CT_PREFIX_DIR}/bin" -name "${CT_HOST}-"'*' -exec rm -fv {} \; |CT_DoLog DEBUG
5.9 - CT_DoExecLog DEBUG rm -fv "${CT_PREFIX_DIR}/bin/makeinfo"
5.10 + CT_DoExecLog DEBUG rm -rf "${CT_PREFIX_DIR}/buildtools"
5.11
5.12 if [ "${CT_BARE_METAL}" != "y" ]; then
5.13 CT_DoLog EXTRA "Installing the populate helper"
6.1 --- a/scripts/crosstool-NG.sh.in Tue Jun 23 22:57:12 2009 +0200
6.2 +++ b/scripts/crosstool-NG.sh.in Fri Jun 26 19:55:33 2009 +0200
6.3 @@ -223,8 +223,10 @@
6.4 CT_DoExecLog ALL mkdir -p "${CT_CONFIG_DIR}"
6.5 CT_DoExecLog ALL mkdir -p "${CT_INSTALL_DIR}"
6.6 CT_DoExecLog ALL mkdir -p "${CT_PREFIX_DIR}"
6.7 -CT_DoExecLog ALL mkdir -p "${CT_CC_CORE_STATIC_PREFIX_DIR}"
6.8 -CT_DoExecLog ALL mkdir -p "${CT_CC_CORE_SHARED_PREFIX_DIR}"
6.9 +if [ -z "${CT_CANADIAN}" ]; then
6.10 + CT_DoExecLog ALL mkdir -p "${CT_CC_CORE_STATIC_PREFIX_DIR}"
6.11 + CT_DoExecLog ALL mkdir -p "${CT_CC_CORE_SHARED_PREFIX_DIR}"
6.12 +fi
6.13
6.14 # Only create the state dir if asked for a restartable build
6.15 [ -n "${CT_DEBUG_CT_SAVE_STEPS}" ] && CT_DoExecLog ALL mkdir -p "${CT_STATE_DIR}"
6.16 @@ -320,9 +322,18 @@
6.17 # Prepare mangling patterns to later modify BUILD and HOST (see below)
6.18 case "${CT_TOOLCHAIN_TYPE}" in
6.19 cross)
6.20 + # A cross-compiler runs on the same machine it is built on
6.21 CT_HOST="${CT_BUILD}"
6.22 build_mangle="build_"
6.23 host_mangle="build_"
6.24 + target_mangle=""
6.25 + install_build_tools_for="BUILD HOST"
6.26 + ;;
6.27 + canadian)
6.28 + build_mangle="build_"
6.29 + host_mangle="host_"
6.30 + target_mangle=""
6.31 + install_build_tools_for="BUILD HOST TARGET"
6.32 ;;
6.33 *) CT_Abort "No code for '${CT_TOOLCHAIN_TYPE}' toolchain type!"
6.34 ;;
6.35 @@ -331,11 +342,13 @@
6.36 # Save the real tuples to generate shell-wrappers to the real tools
6.37 CT_REAL_BUILD="${CT_BUILD}"
6.38 CT_REAL_HOST="${CT_HOST}"
6.39 + CT_REAL_TARGET="${CT_TARGET}"
6.40
6.41 # Canonicalise CT_BUILD and CT_HOST
6.42 # Not only will it give us full-qualified tuples, but it will also ensure
6.43 # that they are valid tuples (in case of typo with user-provided tuples)
6.44 # That's way better than trying to rewrite config.sub ourselves...
6.45 + # CT_TARGET is already made canonical in CT_DoBuildTargetTuple
6.46 CT_BUILD=$(CT_DoConfigSub "${CT_BUILD}")
6.47 CT_HOST=$(CT_DoConfigSub "${CT_HOST}")
6.48
6.49 @@ -345,12 +358,13 @@
6.50 # support canadain build, later...
6.51 CT_BUILD="${CT_BUILD/-/-${build_mangle}}"
6.52 CT_HOST="${CT_HOST/-/-${host_mangle}}"
6.53 + CT_TARGET="${CT_TARGET/-/-${target_mangle}}"
6.54
6.55 # Now we have mangled our BUILD and HOST tuples, we must fake the new
6.56 # cross-tools for those mangled tuples.
6.57 CT_DoLog DEBUG "Making build system tools available"
6.58 - CT_DoExecLog ALL mkdir -p "${CT_PREFIX_DIR}/bin"
6.59 - for m in BUILD HOST; do
6.60 + CT_DoExecLog ALL mkdir -p "${CT_PREFIX_DIR}/buildtools"
6.61 + for m in ${install_build_tools_for}; do
6.62 r="CT_REAL_${m}"
6.63 v="CT_${m}"
6.64 p="CT_${m}_PREFIX"
6.65 @@ -386,8 +400,8 @@
6.66 # bally needed
6.67 if [ -n "${where}" ]; then
6.68 CT_DoLog DEBUG " '${!v}-${tool}' -> '${where}'"
6.69 - printf "#${BANG}${CT_SHELL}\nexec '${where}' \"\${@}\"\n" >"${CT_PREFIX_DIR}/bin/${!v}-${tool}"
6.70 - CT_DoExecLog ALL chmod 700 "${CT_PREFIX_DIR}/bin/${!v}-${tool}"
6.71 + printf "#${BANG}${CT_SHELL}\nexec '${where}' \"\${@}\"\n" >"${CT_PREFIX_DIR}/buildtools/${!v}-${tool}"
6.72 + CT_DoExecLog ALL chmod 700 "${CT_PREFIX_DIR}/buildtools/${!v}-${tool}"
6.73 else
6.74 case "${tool}" in
6.75 # We'll at least need some of them...
6.76 @@ -417,7 +431,8 @@
6.77 # Of course, neither cross-native nor canadian can run on BUILD,
6.78 # so don't add those PATHs in this case...
6.79 case "${CT_TOOLCHAIN_TYPE}" in
6.80 - cross) export PATH="${CT_PREFIX_DIR}/bin:${CT_CC_CORE_SHARED_PREFIX_DIR}/bin:${CT_CC_CORE_STATIC_PREFIX_DIR}/bin:${PATH}";;
6.81 + cross) export PATH="${CT_PREFIX_DIR}/buildtools:${CT_PREFIX_DIR}/bin:${CT_CC_CORE_SHARED_PREFIX_DIR}/bin:${CT_CC_CORE_STATIC_PREFIX_DIR}/bin:${PATH}";;
6.82 + canadian) export PATH="${CT_PREFIX_DIR}/buildtools:${PATH}";;
6.83 *) ;;
6.84 esac
6.85
6.86 @@ -425,8 +440,8 @@
6.87 # Go ahead with those, by creating a wrapper that keeps partial files, and that
6.88 # never fails:
6.89 CT_DoLog DEBUG " 'makeinfo' -> '$(CT_Which makeinfo)'"
6.90 - printf "#${BANG}${CT_SHELL}\n$(CT_Which makeinfo) --force \"\${@}\"\ntrue\n" >"${CT_PREFIX_DIR}/bin/makeinfo"
6.91 - CT_DoExecLog ALL chmod 700 "${CT_PREFIX_DIR}/bin/makeinfo"
6.92 + printf "#${BANG}${CT_SHELL}\n$(CT_Which makeinfo) --force \"\${@}\"\ntrue\n" >"${CT_PREFIX_DIR}/buildtools/makeinfo"
6.93 + CT_DoExecLog ALL chmod 700 "${CT_PREFIX_DIR}/buildtools/makeinfo"
6.94
6.95 # Help gcc
6.96 CT_CFLAGS_FOR_HOST=
6.97 @@ -446,6 +461,7 @@
6.98 export PARALLELMFLAGS
6.99
6.100 CT_DoLog EXTRA "Installing user-supplied crosstool-NG configuration"
6.101 + CT_DoExecLog ALL mkdir -p "${CT_PREFIX_DIR}/bin"
6.102 CT_DoExecLog DEBUG install -m 0755 "${CT_LIB_DIR}/scripts/toolchain-config.in" "${CT_PREFIX_DIR}/bin/${CT_TARGET}-ct-ng.config"
6.103 CT_DoExecLog DEBUG sed -r -i -e 's,@@grep@@,"'"${grep}"'",;' "${CT_PREFIX_DIR}/bin/${CT_TARGET}-ct-ng.config"
6.104 bzip2 -c -9 .config >>"${CT_PREFIX_DIR}/bin/${CT_TARGET}-ct-ng.config"
7.1 --- a/scripts/saveSample.sh.in Tue Jun 23 22:57:12 2009 +0200
7.2 +++ b/scripts/saveSample.sh.in Fri Jun 26 19:55:33 2009 +0200
7.3 @@ -59,18 +59,22 @@
7.4 CT_LOG_WARN=y
7.5 CT_LOG_LEVEL_MAX="WARN"
7.6
7.7 -# Create the sample directory
7.8 -if [ ! -d "samples/${CT_TARGET}" ]; then
7.9 - mkdir -p "samples/${CT_TARGET}"
7.10 -fi
7.11 +# Compute the name of the sample directory
7.12 +case "${CT_TOOLCHAIN_TYPE}" in
7.13 + cross) samp_name="${CT_TARGET}";;
7.14 + canadian) samp_name="${CT_HOST},${CT_TARGET}";;
7.15 + *) CT_Abort "Unsupported toolchain type '${CT_TOOLCHAIN_TYPE}'";;
7.16 +esac
7.17 +samp_dir="samples/${samp_name}"
7.18 +mkdir -p "${samp_dir}"
7.19
7.20 # Save the crosstool-NG config file
7.21 -"${sed}" -r -e 's|^(CT_PREFIX_DIR)=.*|\1="${HOME}/x-tools/${CT_TARGET}"|;' \
7.22 +"${sed}" -r -e 's|^(CT_PREFIX_DIR)=.*|\1="${HOME}/x-tools/${samp_name}"|;' \
7.23 -e 's|^# CT_LOG_TO_FILE is not set$|CT_LOG_TO_FILE=y|;' \
7.24 -e 's|^# CT_LOG_FILE_COMPRESS is not set$|CT_LOG_FILE_COMPRESS=y|;' \
7.25 -e 's|^(CT_LOCAL_TARBALLS_DIR)=.*|\1="${HOME}/src"|;' \
7.26 <.config \
7.27 - >"samples/${CT_TARGET}/crosstool.config"
7.28 + >"${samp_dir}/crosstool.config"
7.29
7.30 # Function to copy a file to the sample directory
7.31 # Needed in case the file is already there (think of a previously available sample)
7.32 @@ -94,12 +98,12 @@
7.33 # Save the uClibc .config file
7.34 if [ -n "${CT_LIBC_UCLIBC_CONFIG_FILE}" ]; then
7.35 # We save the file, and then point the saved sample to this file
7.36 - CT_DoAddFileToSample "${CT_LIBC_UCLIBC_CONFIG_FILE}" "samples/${CT_TARGET}/${CT_LIBC}-${CT_LIBC_VERSION}.config"
7.37 - "${sed}" -r -i -e 's|^(CT_LIBC_UCLIBC_CONFIG_FILE)=.+$|\1="'"${samp_top_dir}"'/samples/${CT_TARGET}/${CT_LIBC}-${CT_LIBC_VERSION}.config"|;' \
7.38 - "samples/${CT_TARGET}/crosstool.config"
7.39 + CT_DoAddFileToSample "${CT_LIBC_UCLIBC_CONFIG_FILE}" "${samp_dir}/${CT_LIBC}-${CT_LIBC_VERSION}.config"
7.40 + "${sed}" -r -i -e 's|^(CT_LIBC_UCLIBC_CONFIG_FILE)=.+$|\1="'"${samp_top_dir}"'/${samp_dir}/${CT_LIBC}-${CT_LIBC_VERSION}.config"|;' \
7.41 + "${samp_dir}/crosstool.config"
7.42 else
7.43 # remove any dangling files
7.44 - for f in "samples/${CT_TARGET}/${CT_LIBC}-"*.config; do
7.45 + for f in "${samp_dir}/${CT_LIBC}-"*.config; do
7.46 if [ -f "${f}" ]; then rm -f "${f}"; fi
7.47 done
7.48 fi
7.49 @@ -108,7 +112,7 @@
7.50 exec >&7
7.51
7.52 # Fill-in the reported-by info
7.53 -[ -f "samples/${CT_TARGET}/reported.by" ] && . "samples/${CT_TARGET}/reported.by"
7.54 +[ -f "${samp_dir}/reported.by" ] && . "${samp_dir}/reported.by"
7.55 old_name="${reporter_name}"
7.56 old_url="${reporter_url}"
7.57 read -p "Reporter name [${reporter_name}]: " reporter_name
7.58 @@ -123,4 +127,4 @@
7.59 ( echo "reporter_name=\"${reporter_name:=${old_name}}\""
7.60 echo "reporter_url=\"${reporter_url:=${old_url}}\""
7.61 printf "reporter_comment=\"${reporter_comment}\"\n"
7.62 -) >"samples/${CT_TARGET}/reported.by"
7.63 +) >"${samp_dir}/reported.by"
8.1 --- a/scripts/showSamples.sh Tue Jun 23 22:57:12 2009 +0200
8.2 +++ b/scripts/showSamples.sh Fri Jun 26 19:55:33 2009 +0200
8.3 @@ -34,6 +34,12 @@
8.4 [ "${CT_EXPERIMENTAL}" = "y" ] && printf "X" || printf " "
8.5 echo "]"
8.6 if [ ${verbose} -ne 0 ]; then
8.7 + case "${CT_TOOLCHAIN_TYPE}" in
8.8 + cross) ;;
8.9 + canadian)
8.10 + printf " Host : ${CT_HOST}\n"
8.11 + ;;
8.12 + esac
8.13 echo " OS : ${CT_KERNEL}${CT_KERNEL_VERSION:+-}${CT_KERNEL_VERSION}"
8.14 if [ "${CT_GMP_MPFR}" = "y" ]; then
8.15 echo " GMP/MPFR : gmp-${CT_GMP_VERSION} / mpfr-${CT_MPFR_VERSION}"
8.16 @@ -64,8 +70,13 @@
8.17 printf "| "
8.18 [ "${CT_EXPERIMENTAL}" = "y" ] && printf "X"
8.19 [ -f "${sample_top}/samples/${sample}/broken" ] && printf "B"
8.20 - printf ' '
8.21 - printf "| ''${CT_KERNEL}'' |"
8.22 + printf ' | '
8.23 + case "${CT_TOOLCHAIN_TYPE}" in
8.24 + cross) ;;
8.25 + canadian) printf "${CT_HOST}";;
8.26 + *) ;;
8.27 + esac
8.28 + printf " | ''${CT_KERNEL}'' |"
8.29 if [ "${CT_KERNEL}" != "bare-metal" ];then
8.30 if [ "${CT_KERNEL_LINUX_HEADERS_USE_CUSTOM_DIR}" = "y" ]; then
8.31 printf " //custom// "
8.32 @@ -102,13 +113,7 @@
8.33 printf "| [[http://ymorin.is-a-geek.org/|YEM]] "
8.34 fi
8.35 )
8.36 - sample_updated=$(date -u "+%Y%m%d" \
8.37 - -d "$(LC_ALL=C svn info ${sample_top}/samples/${sample} \
8.38 - |GREP_OPTIONS= "${grep}" -E '^Last Changed Date:' \
8.39 - |"${sed}" -r -e 's/^[^:]+: //;' \
8.40 - -e 's/^(.+:.. [+-][[:digit:]]{4}) \(.+\)$/\1/;' \
8.41 - )" \
8.42 - )
8.43 + sample_updated="$( hg log -l 1 --template '{date|shortdate}' "${sample_top}/samples/${sample}" )"
8.44 printf "| ${sample_updated} "
8.45 echo "|"
8.46 fi
8.47 @@ -124,6 +129,7 @@
8.48 echo "^ @@DATE@@ ^ |||||||||||||"
8.49 printf "^ Target "
8.50 printf "^ Status "
8.51 + printf "^ Host "
8.52 printf "^ Kernel headers\\\\\\\\ version ^"
8.53 printf "^ binutils\\\\\\\\ version "
8.54 printf "^ C compiler\\\\\\\\ version ^"