summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/toolchain.in2
-rw-r--r--samples/mingw32,i686-none-linux-gnu/crosstool.config357
-rw-r--r--samples/mingw32,i686-none-linux-gnu/reported.by3
-rw-r--r--scripts/build/cc/gcc.sh8
-rw-r--r--scripts/build/internals.sh4
-rw-r--r--scripts/crosstool-NG.sh.in34
-rw-r--r--scripts/saveSample.sh.in28
-rwxr-xr-xscripts/showSamples.sh24
8 files changed, 426 insertions, 34 deletions
diff --git a/config/toolchain.in b/config/toolchain.in
index 6cec94b..ffa4f3e 100644
--- a/config/toolchain.in
+++ b/config/toolchain.in
@@ -123,7 +123,7 @@ config CROSS_NATIVE
config CANADIAN
bool
- prompt "Canadian (NO CODE!) (EXPERIMENTAL)"
+ prompt "Canadian (EXPERIMENTAL)"
depends on EXPERIMENTAL
help
Build a canadian-toolchain.
diff --git a/samples/mingw32,i686-none-linux-gnu/crosstool.config b/samples/mingw32,i686-none-linux-gnu/crosstool.config
new file mode 100644
index 0000000..8a04d12
--- /dev/null
+++ b/samples/mingw32,i686-none-linux-gnu/crosstool.config
@@ -0,0 +1,357 @@
+#
+# Automatically generated make config: don't edit
+# crosstool-NG version: hg:canadian@1421:d39f714dce54
+# Mon Jun 22 18:27:13 2009
+#
+
+#
+# Paths and misc options
+#
+
+#
+# crosstool-NG behavior
+#
+# CT_OBSOLETE is not set
+CT_EXPERIMENTAL=y
+# CT_DEBUG_CT is not set
+
+#
+# Paths
+#
+CT_LOCAL_TARBALLS_DIR="${HOME}/src"
+CT_SAVE_TARBALLS=y
+CT_WORK_DIR="${CT_TOP_DIR}/targets"
+CT_PREFIX_DIR="${HOME}/x-tools/${samp_name}"
+CT_INSTALL_DIR="${CT_PREFIX_DIR}"
+# CT_CUSTOM_PATCH is not set
+CT_REMOVE_DOCS=y
+# CT_INSTALL_DIR_RO is not set
+
+#
+# Downloading
+#
+# CT_FORBID_DOWNLOAD is not set
+# CT_FORCE_DOWNLOAD is not set
+# CT_USE_MIRROR is not set
+CT_CONNECT_TIMEOUT=10
+# CT_ONLY_DOWNLOAD is not set
+
+#
+# Extracting
+#
+# CT_FORCE_EXTRACT is not set
+CT_OVERIDE_CONFIG_GUESS_SUB=y
+# CT_ONLY_EXTRACT is not set
+
+#
+# Build behavior
+#
+CT_PARALLEL_JOBS=4
+CT_LOAD=0
+CT_NICE=0
+CT_USE_PIPES=y
+# CT_CONFIG_SHELL_ASH is not set
+
+#
+# Logging
+#
+# CT_LOG_ERROR is not set
+# CT_LOG_WARN is not set
+# CT_LOG_INFO is not set
+CT_LOG_EXTRA=y
+# CT_LOG_DEBUG is not set
+# CT_LOG_ALL is not set
+CT_LOG_LEVEL_MAX="EXTRA"
+# CT_LOG_SEE_TOOLS_WARN is not set
+CT_LOG_PROGRESS_BAR=y
+CT_LOG_TO_FILE=y
+CT_LOG_FILE_COMPRESS=y
+
+#
+# Target options
+#
+CT_ARCH="x86"
+# CT_ARCH_64 is not set
+# CT_ARCH_SUPPORTS_BOTH_MMU is not set
+# CT_ARCH_SUPPORTS_BOTH_ENDIAN is not set
+CT_ARCH_SUPPORT_ARCH=y
+# CT_ARCH_SUPPORT_ABI is not set
+CT_ARCH_SUPPORT_CPU=y
+CT_ARCH_SUPPORT_TUNE=y
+# CT_ARCH_SUPPORT_FPU is not set
+# CT_ARCH_DEFAULT_HAS_MMU is not set
+# CT_ARCH_DEFAULT_BE is not set
+# CT_ARCH_DEFAULT_LE is not set
+CT_ARCH_ARCH="i686"
+CT_ARCH_CPU=""
+CT_ARCH_TUNE="i686"
+CT_ARCH_FLOAT_HW=y
+# CT_ARCH_FLOAT_SW is not set
+CT_TARGET_CFLAGS=""
+CT_TARGET_LDFLAGS=""
+
+#
+# General target options
+#
+# CT_ARCH_alpha is not set
+# CT_ARCH_arm is not set
+# CT_ARCH_ia64 is not set
+# CT_ARCH_mips is not set
+# CT_ARCH_powerpc is not set
+# CT_ARCH_powerpc64 is not set
+# CT_ARCH_sh is not set
+CT_ARCH_x86=y
+# CT_ARCH_x86_64 is not set
+CT_ARCH_USE_MMU=y
+
+#
+# Target optimisations
+#
+
+#
+# Toolchain options
+#
+
+#
+# General toolchain options
+#
+CT_USE_SYSROOT=y
+CT_SYSROOT_DIR_PREFIX=""
+CT_SHARED_LIBS=y
+
+#
+# Tuple completion and aliasing
+#
+CT_TARGET_VENDOR="none"
+CT_TARGET_ALIAS_SED_EXPR=""
+CT_TARGET_ALIAS=""
+
+#
+# Toolchain type
+#
+# CT_NATIVE is not set
+# CT_CROSS is not set
+# CT_CROSS_NATIVE is not set
+CT_CANADIAN=y
+CT_TOOLCHAIN_TYPE="canadian"
+
+#
+# Build system
+#
+CT_BUILD=""
+CT_BUILD_PREFIX=""
+CT_BUILD_SUFFIX=""
+
+#
+# Host system
+#
+CT_HOST="mingw32"
+CT_HOST_PREFIX="mingw32-"
+CT_HOST_SUFFIX=""
+
+#
+# Target system
+#
+CT_TARGET_PREFIX="i686-none-linux-gnu-"
+CT_TARGET_SUFFIX=""
+
+#
+# Operating System
+#
+# CT_BARE_METAL is not set
+CT_KERNEL="linux"
+CT_KERNEL_VERSION="2.6.29.4"
+# CT_KERNEL_bare_metal is not set
+CT_KERNEL_linux=y
+CT_KERNEL_LINUX_INSTALL=y
+CT_KERNEL_LINUX_INSTALL_CHECK=y
+# CT_KERNEL_V_2_6_18_8 is not set
+# CT_KERNEL_V_2_6_19_7 is not set
+# CT_KERNEL_V_2_6_20_21 is not set
+# CT_KERNEL_V_2_6_21_7 is not set
+# CT_KERNEL_V_2_6_22_19 is not set
+# CT_KERNEL_V_2_6_23_17 is not set
+# CT_KERNEL_V_2_6_24_7 is not set
+# CT_KERNEL_V_2_6_25_20 is not set
+# CT_KERNEL_V_2_6_26_8 is not set
+# CT_KERNEL_V_2_6_27_24 is not set
+# CT_KERNEL_V_2_6_28_10 is not set
+# CT_KERNEL_V_2_6_29 is not set
+# CT_KERNEL_V_2_6_29_1 is not set
+# CT_KERNEL_V_2_6_29_2 is not set
+# CT_KERNEL_V_2_6_29_3 is not set
+CT_KERNEL_V_2_6_29_4=y
+# CT_KERNEL_V_select is not set
+CT_KERNEL_LINUX_VERBOSITY_0=y
+# CT_KERNEL_LINUX_VERBOSITY_1 is not set
+# CT_KERNEL_LINUX_VERBOSITY_2 is not set
+CT_KERNEL_LINUX_VERBOSE_LEVEL=0
+# CT_KERNEL_LINUX_USE_CUSTOM_HEADERS is not set
+
+#
+# Companion libraries
+#
+CT_GMP_MPFR=y
+# CT_GMP_V_4_2_2 is not set
+CT_GMP_V_4_2_4=y
+CT_GMP_VERSION="4.2.4"
+# CT_MPFR_V_2_3_1 is not set
+# CT_MPFR_V_2_3_2 is not set
+# CT_MPFR_V_2_4_0 is not set
+CT_MPFR_V_2_4_1=y
+CT_MPFR_VERSION="2.4.1"
+# CT_PPL_CLOOG_MPC is not set
+
+#
+# Companion libraries common options
+#
+# CT_COMP_LIBS_CHECK is not set
+# CT_COMP_LIBS_TARGET is not set
+
+#
+# Binary utilities
+#
+CT_ARCH_BINFMT_ELF=y
+# CT_ARCH_BINFMT_FLAT is not set
+
+#
+# GNU binutils
+#
+CT_BINUTILS_VERSION="2.19.1"
+# CT_BINUTILS_V_2_14 is not set
+# CT_BINUTILS_V_2_15 is not set
+# CT_BINUTILS_V_2_16_1 is not set
+# CT_BINUTILS_V_2_17 is not set
+# CT_BINUTILS_V_2_18 is not set
+# CT_BINUTILS_V_2_18_50_0_4 is not set
+# CT_BINUTILS_V_2_18_50_0_6 is not set
+# CT_BINUTILS_V_2_18_50_0_7 is not set
+# CT_BINUTILS_V_2_18_50_0_8 is not set
+# CT_BINUTILS_V_2_18_50_0_9 is not set
+# CT_BINUTILS_V_2_18_90 is not set
+# CT_BINUTILS_V_2_18_91 is not set
+# CT_BINUTILS_V_2_18_92 is not set
+# CT_BINUTILS_V_2_18_93 is not set
+# CT_BINUTILS_V_2_19 is not set
+CT_BINUTILS_V_2_19_1=y
+# CT_BINUTILS_V_2_19_50_0_1 is not set
+# CT_BINUTILS_V_2_19_51_0_1 is not set
+# CT_BINUTILS_V_2_19_51_0_2 is not set
+CT_BINUTILS_EXTRA_CONFIG="--enable-targets=i686-none-linux-gnu"
+# CT_BINUTILS_FOR_TARGET is not set
+
+#
+# C compiler
+#
+CT_CC="gcc"
+CT_CC_VERSION="4.3.2"
+CT_CC_gcc=y
+# CT_CC_V_3_2_3 is not set
+# CT_CC_V_3_3_6 is not set
+# CT_CC_V_3_4_6 is not set
+# CT_CC_V_4_0_0 is not set
+# CT_CC_V_4_0_1 is not set
+# CT_CC_V_4_0_2 is not set
+# CT_CC_V_4_0_3 is not set
+# CT_CC_V_4_0_4 is not set
+# CT_CC_V_4_1_0 is not set
+# CT_CC_V_4_1_1 is not set
+# CT_CC_V_4_1_2 is not set
+# CT_CC_V_4_2_0 is not set
+# CT_CC_V_4_2_1 is not set
+# CT_CC_V_4_2_2 is not set
+# CT_CC_V_4_2_3 is not set
+# CT_CC_V_4_2_4 is not set
+# CT_CC_V_4_3_0 is not set
+# CT_CC_V_4_3_1 is not set
+CT_CC_V_4_3_2=y
+# CT_CC_V_4_3_3 is not set
+# CT_CC_V_4_4_0 is not set
+CT_CC_GCC_4_3_or_later=y
+# CT_CC_GCC_4_4_or_later is not set
+CT_CC_CXA_ATEXIT=y
+CT_CC_SJLJ_EXCEPTIONS_CONFIGURE=y
+# CT_CC_SJLJ_EXCEPTIONS_USE is not set
+# CT_CC_SJLJ_EXCEPTIONS_DONT_USE is not set
+CT_CC_CORE_EXTRA_CONFIG=""
+CT_CC_EXTRA_CONFIG=""
+CT_CC_PKGVERSION="crosstool-NG-${CT_VERSION}"
+CT_CC_BUGURL=""
+CT_CC_SUPPORT_CXX=y
+CT_CC_SUPPORT_FORTRAN=y
+CT_CC_SUPPORT_JAVA=y
+CT_CC_SUPPORT_ADA=y
+CT_CC_SUPPORT_OBJC=y
+CT_CC_SUPPORT_OBJCXX=y
+
+#
+# Additional supported languages:
+#
+CT_CC_LANG_CXX=y
+# CT_CC_LANG_FORTRAN is not set
+# CT_CC_LANG_JAVA is not set
+# CT_CC_LANG_ADA is not set
+# CT_CC_LANG_OBJC is not set
+# CT_CC_LANG_OBJCXX is not set
+CT_CC_LANG_OTHERS=""
+CT_LIBC="glibc"
+
+#
+# C-library
+#
+CT_LIBC_VERSION="2.9"
+# CT_LIBC_eglibc is not set
+CT_LIBC_glibc=y
+# CT_LIBC_uClibc is not set
+# CT_LIBC_V_2_3_6 is not set
+# CT_LIBC_V_2_5 is not set
+# CT_LIBC_V_2_5_1 is not set
+# CT_LIBC_V_2_6 is not set
+# CT_LIBC_V_2_6_1 is not set
+# CT_LIBC_V_2_7 is not set
+# CT_LIBC_V_2_8 is not set
+CT_LIBC_V_2_9=y
+# CT_LIBC_V_LATEST is not set
+# CT_LIBC_V_date is not set
+CT_LIBC_GLIBC_2_8_or_later=y
+CT_LIBC_GLIBC_TARBALL=y
+# CT_LIBC_GLIBC_CVS is not set
+
+#
+# glibc/eglibc common options
+#
+CT_LIBC_GLIBC_EXTRA_CONFIG=""
+CT_LIBC_GLIBC_CONFIGPARMS=""
+CT_LIBC_GLIBC_EXTRA_CFLAGS=""
+CT_LIBC_EXTRA_CC_ARGS=""
+# CT_LIBC_GLIBC_USE_PORTS is not set
+CT_LIBC_ADDONS_LIST=""
+# CT_LIBC_GLIBC_KERNEL_VERSION_NONE is not set
+CT_LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS=y
+# CT_LIBC_GLIBC_KERNEL_VERSION_CHOSEN is not set
+CT_LIBC_GLIBC_MIN_KERNEL="2.6.29.4"
+
+#
+# Common C library options
+#
+CT_LIBC_SUPPORT_NPTL=y
+CT_LIBC_SUPPORT_LINUXTHREADS=y
+CT_THREADS="nptl"
+CT_THREADS_NPTL=y
+# CT_THREADS_LINUXTHREADS is not set
+# CT_THREADS_NONE is not set
+
+#
+# Tools facilities
+#
+# CT_TOOL_libelf is not set
+# CT_TOOL_sstrip is not set
+
+#
+# Debug facilities
+#
+# CT_DEBUG_dmalloc is not set
+# CT_DEBUG_duma is not set
+# CT_DEBUG_gdb is not set
+# CT_DEBUG_ltrace is not set
+# CT_DEBUG_strace is not set
diff --git a/samples/mingw32,i686-none-linux-gnu/reported.by b/samples/mingw32,i686-none-linux-gnu/reported.by
new file mode 100644
index 0000000..a6ea065
--- /dev/null
+++ b/samples/mingw32,i686-none-linux-gnu/reported.by
@@ -0,0 +1,3 @@
+reporter_name="Bart vd. Meulen"
+reporter_url=""
+reporter_comment="Sample for building a canadian cross-compiler"
diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh
index 15dc5a5..e1f5d25 100644
--- a/scripts/build/cc/gcc.sh
+++ b/scripts/build/cc/gcc.sh
@@ -41,6 +41,10 @@ do_cc_extract() {
#------------------------------------------------------------------------------
# Core gcc pass 1
do_cc_core_pass_1() {
+ # If we're building a canadian compiler no use to build the CC
+ # core compiler, we're not using it
+ [ -n "${CT_CANADIAN}" ] && return 0
+
# If we're building for bare metal, build the static core gcc,
# with libgcc.
# In case we're not bare metal, and we're NPTL, build the static core gcc.
@@ -54,6 +58,10 @@ do_cc_core_pass_1() {
# Core gcc pass 2
do_cc_core_pass_2() {
+ # If we're building a canadian compiler no use to build the CC
+ # core compiler, we're not using it
+ [ -n "${CT_CANADIAN}" ] && return 0
+
# In case we're building for bare metal, do nothing, we already have
# our compiler.
# In case we're NPTL, build the shared core gcc and the target libgcc.
diff --git a/scripts/build/internals.sh b/scripts/build/internals.sh
index 8a887bf..a920c50 100644
--- a/scripts/build/internals.sh
+++ b/scripts/build/internals.sh
@@ -9,9 +9,7 @@ do_finish() {
CT_DoStep INFO "Cleaning-up the toolchain's directory"
CT_DoLog EXTRA "Removing access to the build system tools"
- find "${CT_PREFIX_DIR}/bin" -name "${CT_BUILD}-"'*' -exec rm -fv {} \; |CT_DoLog DEBUG
- find "${CT_PREFIX_DIR}/bin" -name "${CT_HOST}-"'*' -exec rm -fv {} \; |CT_DoLog DEBUG
- CT_DoExecLog DEBUG rm -fv "${CT_PREFIX_DIR}/bin/makeinfo"
+ CT_DoExecLog DEBUG rm -rf "${CT_PREFIX_DIR}/buildtools"
if [ "${CT_BARE_METAL}" != "y" ]; then
CT_DoLog EXTRA "Installing the populate helper"
diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in
index 2d893a3..36c77ba 100644
--- a/scripts/crosstool-NG.sh.in
+++ b/scripts/crosstool-NG.sh.in
@@ -223,8 +223,10 @@ CT_DoExecLog ALL mkdir -p "${CT_BUILD_DIR}"
CT_DoExecLog ALL mkdir -p "${CT_CONFIG_DIR}"
CT_DoExecLog ALL mkdir -p "${CT_INSTALL_DIR}"
CT_DoExecLog ALL mkdir -p "${CT_PREFIX_DIR}"
-CT_DoExecLog ALL mkdir -p "${CT_CC_CORE_STATIC_PREFIX_DIR}"
-CT_DoExecLog ALL mkdir -p "${CT_CC_CORE_SHARED_PREFIX_DIR}"
+if [ -z "${CT_CANADIAN}" ]; then
+ CT_DoExecLog ALL mkdir -p "${CT_CC_CORE_STATIC_PREFIX_DIR}"
+ CT_DoExecLog ALL mkdir -p "${CT_CC_CORE_SHARED_PREFIX_DIR}"
+fi
# Only create the state dir if asked for a restartable build
[ -n "${CT_DEBUG_CT_SAVE_STEPS}" ] && CT_DoExecLog ALL mkdir -p "${CT_STATE_DIR}"
@@ -320,9 +322,18 @@ if [ -z "${CT_RESTART}" ]; then
# Prepare mangling patterns to later modify BUILD and HOST (see below)
case "${CT_TOOLCHAIN_TYPE}" in
cross)
+ # A cross-compiler runs on the same machine it is built on
CT_HOST="${CT_BUILD}"
build_mangle="build_"
host_mangle="build_"
+ target_mangle=""
+ install_build_tools_for="BUILD HOST"
+ ;;
+ canadian)
+ build_mangle="build_"
+ host_mangle="host_"
+ target_mangle=""
+ install_build_tools_for="BUILD HOST TARGET"
;;
*) CT_Abort "No code for '${CT_TOOLCHAIN_TYPE}' toolchain type!"
;;
@@ -331,11 +342,13 @@ if [ -z "${CT_RESTART}" ]; then
# Save the real tuples to generate shell-wrappers to the real tools
CT_REAL_BUILD="${CT_BUILD}"
CT_REAL_HOST="${CT_HOST}"
+ CT_REAL_TARGET="${CT_TARGET}"
# Canonicalise CT_BUILD and CT_HOST
# Not only will it give us full-qualified tuples, but it will also ensure
# that they are valid tuples (in case of typo with user-provided tuples)
# That's way better than trying to rewrite config.sub ourselves...
+ # CT_TARGET is already made canonical in CT_DoBuildTargetTuple
CT_BUILD=$(CT_DoConfigSub "${CT_BUILD}")
CT_HOST=$(CT_DoConfigSub "${CT_HOST}")
@@ -345,12 +358,13 @@ if [ -z "${CT_RESTART}" ]; then
# support canadain build, later...
CT_BUILD="${CT_BUILD/-/-${build_mangle}}"
CT_HOST="${CT_HOST/-/-${host_mangle}}"
+ CT_TARGET="${CT_TARGET/-/-${target_mangle}}"
# Now we have mangled our BUILD and HOST tuples, we must fake the new
# cross-tools for those mangled tuples.
CT_DoLog DEBUG "Making build system tools available"
- CT_DoExecLog ALL mkdir -p "${CT_PREFIX_DIR}/bin"
- for m in BUILD HOST; do
+ CT_DoExecLog ALL mkdir -p "${CT_PREFIX_DIR}/buildtools"
+ for m in ${install_build_tools_for}; do
r="CT_REAL_${m}"
v="CT_${m}"
p="CT_${m}_PREFIX"
@@ -386,8 +400,8 @@ if [ -z "${CT_RESTART}" ]; then
# bally needed
if [ -n "${where}" ]; then
CT_DoLog DEBUG " '${!v}-${tool}' -> '${where}'"
- printf "#${BANG}${CT_SHELL}\nexec '${where}' \"\${@}\"\n" >"${CT_PREFIX_DIR}/bin/${!v}-${tool}"
- CT_DoExecLog ALL chmod 700 "${CT_PREFIX_DIR}/bin/${!v}-${tool}"
+ printf "#${BANG}${CT_SHELL}\nexec '${where}' \"\${@}\"\n" >"${CT_PREFIX_DIR}/buildtools/${!v}-${tool}"
+ CT_DoExecLog ALL chmod 700 "${CT_PREFIX_DIR}/buildtools/${!v}-${tool}"
else
case "${tool}" in
# We'll at least need some of them...
@@ -417,7 +431,8 @@ if [ -z "${CT_RESTART}" ]; then
# Of course, neither cross-native nor canadian can run on BUILD,
# so don't add those PATHs in this case...
case "${CT_TOOLCHAIN_TYPE}" in
- cross) export PATH="${CT_PREFIX_DIR}/bin:${CT_CC_CORE_SHARED_PREFIX_DIR}/bin:${CT_CC_CORE_STATIC_PREFIX_DIR}/bin:${PATH}";;
+ 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}";;
+ canadian) export PATH="${CT_PREFIX_DIR}/buildtools:${PATH}";;
*) ;;
esac
@@ -425,8 +440,8 @@ if [ -z "${CT_RESTART}" ]; then
# Go ahead with those, by creating a wrapper that keeps partial files, and that
# never fails:
CT_DoLog DEBUG " 'makeinfo' -> '$(CT_Which makeinfo)'"
- printf "#${BANG}${CT_SHELL}\n$(CT_Which makeinfo) --force \"\${@}\"\ntrue\n" >"${CT_PREFIX_DIR}/bin/makeinfo"
- CT_DoExecLog ALL chmod 700 "${CT_PREFIX_DIR}/bin/makeinfo"
+ printf "#${BANG}${CT_SHELL}\n$(CT_Which makeinfo) --force \"\${@}\"\ntrue\n" >"${CT_PREFIX_DIR}/buildtools/makeinfo"
+ CT_DoExecLog ALL chmod 700 "${CT_PREFIX_DIR}/buildtools/makeinfo"
# Help gcc
CT_CFLAGS_FOR_HOST=
@@ -446,6 +461,7 @@ if [ -z "${CT_RESTART}" ]; then
export PARALLELMFLAGS
CT_DoLog EXTRA "Installing user-supplied crosstool-NG configuration"
+ CT_DoExecLog ALL mkdir -p "${CT_PREFIX_DIR}/bin"
CT_DoExecLog DEBUG install -m 0755 "${CT_LIB_DIR}/scripts/toolchain-config.in" "${CT_PREFIX_DIR}/bin/${CT_TARGET}-ct-ng.config"
CT_DoExecLog DEBUG sed -r -i -e 's,@@grep@@,"'"${grep}"'",;' "${CT_PREFIX_DIR}/bin/${CT_TARGET}-ct-ng.config"
bzip2 -c -9 .config >>"${CT_PREFIX_DIR}/bin/${CT_TARGET}-ct-ng.config"
diff --git a/scripts/saveSample.sh.in b/scripts/saveSample.sh.in
index 6b3f205..4ef71ce 100644
--- a/scripts/saveSample.sh.in
+++ b/scripts/saveSample.sh.in
@@ -59,18 +59,22 @@ unset CT_LOG_PROGRESS_BAR CT_LOG_ERROR CT_LOG_INFO CT_LOG_EXTRA CT_LOG_DEBUG LOG
CT_LOG_WARN=y
CT_LOG_LEVEL_MAX="WARN"
-# Create the sample directory
-if [ ! -d "samples/${CT_TARGET}" ]; then
- mkdir -p "samples/${CT_TARGET}"
-fi
+# Compute the name of the sample directory
+case "${CT_TOOLCHAIN_TYPE}" in
+ cross) samp_name="${CT_TARGET}";;
+ canadian) samp_name="${CT_HOST},${CT_TARGET}";;
+ *) CT_Abort "Unsupported toolchain type '${CT_TOOLCHAIN_TYPE}'";;
+esac
+samp_dir="samples/${samp_name}"
+mkdir -p "${samp_dir}"
# Save the crosstool-NG config file
-"${sed}" -r -e 's|^(CT_PREFIX_DIR)=.*|\1="${HOME}/x-tools/${CT_TARGET}"|;' \
+"${sed}" -r -e 's|^(CT_PREFIX_DIR)=.*|\1="${HOME}/x-tools/${samp_name}"|;' \
-e 's|^# CT_LOG_TO_FILE is not set$|CT_LOG_TO_FILE=y|;' \
-e 's|^# CT_LOG_FILE_COMPRESS is not set$|CT_LOG_FILE_COMPRESS=y|;' \
-e 's|^(CT_LOCAL_TARBALLS_DIR)=.*|\1="${HOME}/src"|;' \
<.config \
- >"samples/${CT_TARGET}/crosstool.config"
+ >"${samp_dir}/crosstool.config"
# Function to copy a file to the sample directory
# Needed in case the file is already there (think of a previously available sample)
@@ -94,12 +98,12 @@ fi
# Save the uClibc .config file
if [ -n "${CT_LIBC_UCLIBC_CONFIG_FILE}" ]; then
# We save the file, and then point the saved sample to this file
- CT_DoAddFileToSample "${CT_LIBC_UCLIBC_CONFIG_FILE}" "samples/${CT_TARGET}/${CT_LIBC}-${CT_LIBC_VERSION}.config"
- "${sed}" -r -i -e 's|^(CT_LIBC_UCLIBC_CONFIG_FILE)=.+$|\1="'"${samp_top_dir}"'/samples/${CT_TARGET}/${CT_LIBC}-${CT_LIBC_VERSION}.config"|;' \
- "samples/${CT_TARGET}/crosstool.config"
+ CT_DoAddFileToSample "${CT_LIBC_UCLIBC_CONFIG_FILE}" "${samp_dir}/${CT_LIBC}-${CT_LIBC_VERSION}.config"
+ "${sed}" -r -i -e 's|^(CT_LIBC_UCLIBC_CONFIG_FILE)=.+$|\1="'"${samp_top_dir}"'/${samp_dir}/${CT_LIBC}-${CT_LIBC_VERSION}.config"|;' \
+ "${samp_dir}/crosstool.config"
else
# remove any dangling files
- for f in "samples/${CT_TARGET}/${CT_LIBC}-"*.config; do
+ for f in "${samp_dir}/${CT_LIBC}-"*.config; do
if [ -f "${f}" ]; then rm -f "${f}"; fi
done
fi
@@ -108,7 +112,7 @@ fi
exec >&7
# Fill-in the reported-by info
-[ -f "samples/${CT_TARGET}/reported.by" ] && . "samples/${CT_TARGET}/reported.by"
+[ -f "${samp_dir}/reported.by" ] && . "${samp_dir}/reported.by"
old_name="${reporter_name}"
old_url="${reporter_url}"
read -p "Reporter name [${reporter_name}]: " reporter_name
@@ -123,4 +127,4 @@ reporter_comment=$(cat)
( echo "reporter_name=\"${reporter_name:=${old_name}}\""
echo "reporter_url=\"${reporter_url:=${old_url}}\""
printf "reporter_comment=\"${reporter_comment}\"\n"
-) >"samples/${CT_TARGET}/reported.by"
+) >"${samp_dir}/reported.by"
diff --git a/scripts/showSamples.sh b/scripts/showSamples.sh
index f06a183..e952d64 100755
--- a/scripts/showSamples.sh
+++ b/scripts/showSamples.sh
@@ -34,6 +34,12 @@ dump_single_sample() {
[ "${CT_EXPERIMENTAL}" = "y" ] && printf "X" || printf " "
echo "]"
if [ ${verbose} -ne 0 ]; then
+ case "${CT_TOOLCHAIN_TYPE}" in
+ cross) ;;
+ canadian)
+ printf " Host : ${CT_HOST}\n"
+ ;;
+ esac
echo " OS : ${CT_KERNEL}${CT_KERNEL_VERSION:+-}${CT_KERNEL_VERSION}"
if [ "${CT_GMP_MPFR}" = "y" ]; then
echo " GMP/MPFR : gmp-${CT_GMP_VERSION} / mpfr-${CT_MPFR_VERSION}"
@@ -64,8 +70,13 @@ dump_single_sample() {
printf "| "
[ "${CT_EXPERIMENTAL}" = "y" ] && printf "X"
[ -f "${sample_top}/samples/${sample}/broken" ] && printf "B"
- printf ' '
- printf "| ''${CT_KERNEL}'' |"
+ printf ' | '
+ case "${CT_TOOLCHAIN_TYPE}" in
+ cross) ;;
+ canadian) printf "${CT_HOST}";;
+ *) ;;
+ esac
+ printf " | ''${CT_KERNEL}'' |"
if [ "${CT_KERNEL}" != "bare-metal" ];then
if [ "${CT_KERNEL_LINUX_HEADERS_USE_CUSTOM_DIR}" = "y" ]; then
printf " //custom// "
@@ -102,13 +113,7 @@ dump_single_sample() {
printf "| [[http://ymorin.is-a-geek.org/|YEM]] "
fi
)
- sample_updated=$(date -u "+%Y%m%d" \
- -d "$(LC_ALL=C svn info ${sample_top}/samples/${sample} \
- |GREP_OPTIONS= "${grep}" -E '^Last Changed Date:' \
- |"${sed}" -r -e 's/^[^:]+: //;' \
- -e 's/^(.+:.. [+-][[:digit:]]{4}) \(.+\)$/\1/;' \
- )" \
- )
+ sample_updated="$( hg log -l 1 --template '{date|shortdate}' "${sample_top}/samples/${sample}" )"
printf "| ${sample_updated} "
echo "|"
fi
@@ -124,6 +129,7 @@ if [ "${opt}" = -w ]; then
echo "^ @@DATE@@ ^ |||||||||||||"
printf "^ Target "
printf "^ Status "
+ printf "^ Host "
printf "^ Kernel headers\\\\\\\\ version ^"
printf "^ binutils\\\\\\\\ version "
printf "^ C compiler\\\\\\\\ version ^"