diff options
author | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2009-10-03 16:49:51 (GMT) |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2009-10-03 16:49:51 (GMT) |
commit | 9b9be141ee4b9a140c9cd4c9eae7c7b4385822ec (patch) | |
tree | 78156c49c6a7085d26587991222e8b19be972b79 /scripts | |
parent | 26edbc5b62418e0eea8bacb9f8c076c46ae51ed8 (diff) | |
parent | 89351cb89887e1e7de93afea665351cf70fe6f86 (diff) |
Merge.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/addToolVersion.sh | 24 | ||||
-rw-r--r-- | scripts/build/companion_libs/cloog.sh | 40 | ||||
-rw-r--r-- | scripts/build/debug/300-gdb.sh | 4 | ||||
-rw-r--r-- | scripts/build/internals.sh | 16 | ||||
-rw-r--r-- | scripts/build/libc/eglibc.sh | 4 | ||||
-rw-r--r-- | scripts/build/libc/glibc.sh | 22 | ||||
-rwxr-xr-x | scripts/config.guess | 111 | ||||
-rwxr-xr-x | scripts/config.sub | 7 | ||||
-rw-r--r-- | scripts/crosstool-NG.sh.in | 2 | ||||
-rw-r--r-- | scripts/functions | 4 | ||||
-rw-r--r-- | scripts/saveSample.sh.in | 4 | ||||
-rwxr-xr-x | scripts/showSamples.sh | 36 |
12 files changed, 124 insertions, 150 deletions
diff --git a/scripts/addToolVersion.sh b/scripts/addToolVersion.sh index 255b8fe..c9102ca 100755 --- a/scripts/addToolVersion.sh +++ b/scripts/addToolVersion.sh @@ -77,35 +77,35 @@ addToolVersion() { SedExpr1="${SedExpr1} prompt \"${version}" case "${EXP},${OBS}" in ,) ;; - ,*) exp_obs_prompt=" (OBSOLETE)" - deps=" depends on OBSOLETE\n" + ,*) exp_obs_prompt=" (OBSOLETE)" + deps=" depends on OBSOLETE" ;; - *,) exp_obs_prompt=" (EXPERIMENTAL)" - deps=" depends on EXPERIMENTAL\n" + *,) exp_obs_prompt=" (EXPERIMENTAL)" + deps=" depends on EXPERIMENTAL" ;; - *) exp_obs_prompt=" (EXPERIMENTAL, OBSOLETE)" - deps=" depends on EXPERIMENTAL && OBSOLETE\n" + *) exp_obs_prompt=" (EXPERIMENTAL, OBSOLETE)" + deps=" depends on EXPERIMENTAL \\&\\& OBSOLETE" ;; esac [ -n "${exp_obs_prompt}" ] && SedExpr1="${SedExpr1}${exp_obs_prompt}" - SedExpr1="${SedExpr1}\"\n" - [ -n "${deps}" ] && SedExpr1="${SedExpr1}${deps}" + SedExpr1="${SedExpr1}\"" + [ -n "${deps}" ] && SedExpr1="${SedExpr1}\n${deps}" if [ "${tool}" = "gcc" ]; then # Extract 'M'ajor and 'm'inor from version string ver_M=$(echo "${version}...." |cut -d . -f 1) ver_m=$(echo "${version}...." |cut -d . -f 2) if [ ${ver_M} -gt 4 \ -o \( ${ver_M} -eq 4 -a ${ver_m} -ge 3 \) ]; then - SedExpr1="${SedExpr1} select CC_GCC_4_3_or_later\n" + SedExpr1="${SedExpr1}\n select CC_GCC_4_3_or_later" fi if [ ${ver_M} -gt 4 \ -o \( ${ver_M} -eq 4 -a ${ver_m} -ge 4 \) ]; then - SedExpr1="${SedExpr1} select CC_GCC_4_4_or_later\n" + SedExpr1="${SedExpr1}\n select CC_GCC_4_4_or_later" fi fi SedExpr2=" default \"${version}\" if ${cat}_V_${v}" - "${sed}" -r -i -e 's/^(# CT_INSERT_VERSION_ABOVE)$/'"${SedExpr1}"'\n\1/;' "${file}" - "${sed}" -r -i -e 's/^(# CT_INSERT_VERSION_STRING_ABOVE)$/'"${SedExpr2}"'\n\1/;' "${file}" + "${sed}" -r -i -e 's/^(# CT_INSERT_VERSION_BELOW)$/\1\n\n'"${SedExpr1}"'/;' "${file}" + "${sed}" -r -i -e 's/^(# CT_INSERT_VERSION_STRING_BELOW)$/\1\n'"${SedExpr2}"'/;' "${file}" } cat= diff --git a/scripts/build/companion_libs/cloog.sh b/scripts/build/companion_libs/cloog.sh index 0e6d74f..f6eb68a 100644 --- a/scripts/build/companion_libs/cloog.sh +++ b/scripts/build/companion_libs/cloog.sh @@ -18,29 +18,47 @@ do_cloog_get() { # Extract CLooG do_cloog_extract() { + local _t + CT_Extract "cloog-ppl-${CT_CLOOG_VERSION}" - CT_Pushd "${CT_SRC_DIR}/cloog-ppl" + + # Version 0.15.3 has a dirname 'cloog-ppl' (with no version in it!) + # while versions 0.15.4 onward do have the version in the dirname. + case "${CT_CLOOG_VERSION}" in + 0.15.3) _t="";; + *) _t="-${CT_CLOOG_VERSION}";; + esac + CT_Pushd "${CT_SRC_DIR}/cloog-ppl${_t}" CT_Patch "cloog-ppl-${CT_CLOOG_VERSION}" nochdir CT_Popd } do_cloog() { + local _t + + # Version 0.15.3 has a dirname 'cloog-ppl' (with no version in it!) + # while versions 0.15.4 onward do have the version in the dirname. + case "${CT_CLOOG_VERSION}" in + 0.15.3) _t="";; + *) _t="-${CT_CLOOG_VERSION}";; + esac + mkdir -p "${CT_BUILD_DIR}/build-cloog-ppl" cd "${CT_BUILD_DIR}/build-cloog-ppl" CT_DoStep INFO "Installing CLooG/ppl" CT_DoLog EXTRA "Configuring CLooG/ppl" - CFLAGS="${CT_CFLAGS_FOR_HOST}" \ - CT_DoExecLog ALL \ - "${CT_SRC_DIR}/cloog-ppl/configure" \ - --build=${CT_BUILD} \ - --host=${CT_HOST} \ - --prefix="${CT_PREFIX_DIR}" \ - --with-gmp="${CT_PREFIX_DIR}" \ - --with-ppl="${CT_PREFIX_DIR}" \ - --enable-shared \ - --disable-static \ + CFLAGS="${CT_CFLAGS_FOR_HOST}" \ + CT_DoExecLog ALL \ + "${CT_SRC_DIR}/cloog-ppl${_t}/configure" \ + --build=${CT_BUILD} \ + --host=${CT_HOST} \ + --prefix="${CT_PREFIX_DIR}" \ + --with-gmp="${CT_PREFIX_DIR}" \ + --with-ppl="${CT_PREFIX_DIR}" \ + --enable-shared \ + --disable-static \ --with-bits=gmp CT_DoLog EXTRA "Building CLooG/ppl" diff --git a/scripts/build/debug/300-gdb.sh b/scripts/build/debug/300-gdb.sh index 9207ca7..d9f2439 100644 --- a/scripts/build/debug/300-gdb.sh +++ b/scripts/build/debug/300-gdb.sh @@ -265,6 +265,10 @@ do_debug_gdb_build() { unset ac_cv_func_strncmp_works + CT_DoLog EXTRA "Cleaning up ncurses" + cd "${CT_BUILD_DIR}/build-ncurses" + CT_DoExecLog ALL make DESTDIR="${CT_SYSROOT_DIR}" uninstall + CT_EndStep # native gdb build fi diff --git a/scripts/build/internals.sh b/scripts/build/internals.sh index 093636a..144cb87 100644 --- a/scripts/build/internals.sh +++ b/scripts/build/internals.sh @@ -8,9 +8,6 @@ do_finish() { CT_DoStep INFO "Cleaning-up the toolchain's directory" - CT_DoLog EXTRA "Removing access to the build system tools" - CT_DoExecLog DEBUG rm -rf "${CT_PREFIX_DIR}/buildtools" - if [ "${CT_BARE_METAL}" != "y" ]; then CT_DoLog EXTRA "Installing the populate helper" sed -r -e 's|@@CT_TARGET@@|'"${CT_TARGET}"'|g;' \ @@ -58,11 +55,11 @@ do_finish() { if [ "${CT_DEBUG_CT}" = "y" ]; then _t="" # If debugging crosstool-NG, don't strip the wrapper fi - CT_DoExecLog "${HOST_CC}" \ - -Wall -Wextra -Wunreachable-code -Werror \ - -O3 -static ${_t} \ - "${CT_LIB_DIR}/scripts/wrapper.c" \ - -o ".${CT_TARGET}-wrapper" + CT_DoExecLog DEBUG "${CT_HOST}-gcc" \ + -Wall -Wextra -Wunreachable-code -Werror \ + -O3 -static ${_t} \ + "${CT_LIB_DIR}/scripts/wrapper.c" \ + -o ".${CT_TARGET}-wrapper" ;; esac @@ -82,6 +79,9 @@ do_finish() { CT_Popd fi + CT_DoLog EXTRA "Removing access to the build system tools" + CT_DoExecLog DEBUG rm -rf "${CT_PREFIX_DIR}/buildtools" + # Remove the generated documentation files if [ "${CT_REMOVE_DOCS}" = "y" ]; then CT_DoLog EXTRA "Removing installed documentation" diff --git a/scripts/build/libc/eglibc.sh b/scripts/build/libc/eglibc.sh index 245cda8..e2bd37b 100644 --- a/scripts/build/libc/eglibc.sh +++ b/scripts/build/libc/eglibc.sh @@ -54,7 +54,7 @@ do_libc_get() { -a -f "${CT_LOCAL_TARBALLS_DIR}/${eglibc_linuxthreads}" \ -a -f "${CT_LOCAL_TARBALLS_DIR}/${eglibc_localedef}" \ -a -f "${CT_LOCAL_TARBALLS_DIR}/${eglibc_ports}" \ - "${CT_FORCE_DOWNLOAD}" != "y" \ + -a "${CT_FORCE_DOWNLOAD}" != "y" \ ]; then CT_DoLog DEBUG "Got 'eglibc-${CT_LIBC_VERSION}' from local storage" for file in ${eglibc} ${eglibc_linuxthreads} ${eglibc_localedef} ${eglibc_ports}; do @@ -252,7 +252,7 @@ do_libc() { CT_DoLog DEBUG "Extra CC args passed : '${extra_cc_args}'" BUILD_CC="${CT_BUILD}-gcc" \ - CFLAGS="${CT_TARGET_CFLAGS} ${CT_LIBC_GLIBC_EXTRA_CFLAGS} -O" \ + CFLAGS="${CT_TARGET_CFLAGS} ${CT_LIBC_GLIBC_EXTRA_CFLAGS} -O2" \ CC="${CT_TARGET}-gcc ${CT_LIBC_EXTRA_CC_ARGS} ${extra_cc_args}" \ AR=${CT_TARGET}-ar \ RANLIB=${CT_TARGET}-ranlib \ diff --git a/scripts/build/libc/glibc.sh b/scripts/build/libc/glibc.sh index a83fb25..44633b1 100644 --- a/scripts/build/libc/glibc.sh +++ b/scripts/build/libc/glibc.sh @@ -47,8 +47,6 @@ do_libc_get() { "glibc-${version}-branch${date:+:}${date}" \ "glibc-${addon}-cvs-${CT_LIBC_VERSION}" done -# elif [ "${CT_LIBC_GLIBC_SNAPSHOT}" = "y" ]; then -# : # Not yet handled... fi return 0 @@ -180,7 +178,7 @@ do_libc_headers() { libc_cv_ppc_machine=yes \ CT_DoExecLog ALL \ - make CFLAGS="-O -DBOOTSTRAP_GCC" \ + make CFLAGS="-O2 -DBOOTSTRAP_GCC" \ OBJDUMP_FOR_HOST="${CT_TARGET}-objdump" \ PARALLELMFLAGS="${PARALLELMFLAGS}" \ sysdeps/gnu/errlist.c @@ -197,7 +195,7 @@ do_libc_headers() { CT_DoExecLog ALL \ make cross-compiling=yes \ install_root=${CT_SYSROOT_DIR} \ - CFLAGS="-O -DBOOTSTRAP_GCC" \ + CFLAGS="-O2 -DBOOTSTRAP_GCC" \ ${LIBC_SYSROOT_ARG} \ OBJDUMP_FOR_HOST="${CT_TARGET}-objdump" \ PARALLELMFLAGS="${PARALLELMFLAGS}" \ @@ -294,12 +292,6 @@ do_libc_start_files() { # Add some default CC args glibc_version_major=$(echo ${CT_LIBC_VERSION} |sed -r -e 's/^([[:digit:]]+).*/\1/') glibc_version_minor=$(echo ${CT_LIBC_VERSION} |sed -r -e 's/^[[:digit:]]+[\.-_]([[:digit:]]+).*/\1/') - # In case we're using a snapshot, fake a >=2.6 version. - if [ "${CT_LIBC_V_LATEST}" = "y" \ - -o "${CT_LIBC_V_date}" = "y" ]; then - glibc_version_major=3 - glibc_version_minor=0 - fi if [ ${glibc_version_major} -eq 2 -a ${glibc_version_minor} -ge 6 \ -o ${glibc_version_major} -gt 2 ]; then # Don't use -pipe: configure chokes on it for glibc >= 2.6. @@ -325,7 +317,7 @@ do_libc_start_files() { # Please see the comment for the configure step in do_libc(). BUILD_CC="${CT_BUILD}-gcc" \ - CFLAGS="${CT_TARGET_CFLAGS} ${CT_LIBC_GLIBC_EXTRA_CFLAGS} -O " \ + CFLAGS="${CT_TARGET_CFLAGS} ${CT_LIBC_GLIBC_EXTRA_CFLAGS} -O2" \ CC="${cross_cc} ${CT_LIBC_EXTRA_CC_ARGS} ${extra_cc_args}" \ AR=${CT_TARGET}-ar \ RANLIB=${CT_TARGET}-ranlib \ @@ -409,12 +401,6 @@ do_libc() { # Add some default CC args glibc_version_major=$(echo ${CT_LIBC_VERSION} |sed -r -e 's/^([[:digit:]]+).*/\1/') glibc_version_minor=$(echo ${CT_LIBC_VERSION} |sed -r -e 's/^[[:digit:]]+[\.-_]([[:digit:]]+).*/\1/') - # In case we're using a snapshot, fake a >=2.6 version. - if [ "${CT_LIBC_V_LATEST}" = "y" \ - -o "${CT_LIBC_V_date}" = "y" ]; then - glibc_version_major=3 - glibc_version_minor=0 - fi if [ ${glibc_version_major} -eq 2 -a ${glibc_version_minor} -ge 6 \ -o ${glibc_version_major} -gt 2 ]; then # Don't use -pipe: configure chokes on it for glibc >= 2.6. @@ -457,7 +443,7 @@ do_libc() { # silly messages. GNU folks again, he? BUILD_CC="${CT_BUILD}-gcc" \ - CFLAGS="${CT_TARGET_CFLAGS} ${CT_LIBC_GLIBC_EXTRA_CFLAGS} -O" \ + CFLAGS="${CT_TARGET_CFLAGS} ${CT_LIBC_GLIBC_EXTRA_CFLAGS} -O2" \ CC="${CT_TARGET}-gcc ${CT_LIBC_EXTRA_CC_ARGS} ${extra_cc_args}" \ AR=${CT_TARGET}-ar \ RANLIB=${CT_TARGET}-ranlib \ diff --git a/scripts/config.guess b/scripts/config.guess index bb0b03e..e792aac 100755 --- a/scripts/config.guess +++ b/scripts/config.guess @@ -4,7 +4,7 @@ # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. -timestamp='2009-08-19' +timestamp='2009-09-18' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -854,6 +854,20 @@ EOF i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ @@ -876,6 +890,9 @@ EOF frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; + i*86:Linux:*:*) + echo ${UNAME_MACHINE}-pc-linux-gnu + exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; @@ -911,29 +928,12 @@ EOF or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in @@ -942,8 +942,11 @@ EOF *) echo hppa-unknown-linux-gnu ;; esac exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux @@ -966,58 +969,6 @@ EOF xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include <features.h> - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^LIBC/{ - s: ::g - p - }'`" - test x"${LIBC}" != x && { - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit - } - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both @@ -1247,6 +1198,16 @@ EOF *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in + i386) + eval $set_cc_for_build + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + UNAME_PROCESSOR="x86_64" + fi + fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} diff --git a/scripts/config.sub b/scripts/config.sub index 8ca084b..0a55da1 100755 --- a/scripts/config.sub +++ b/scripts/config.sub @@ -4,7 +4,7 @@ # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. -timestamp='2009-08-19' +timestamp='2009-09-25' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -287,6 +287,7 @@ case $basic_machine in | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ + | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ @@ -300,7 +301,7 @@ case $basic_machine in | z8k | z80) basic_machine=$basic_machine-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12) + m6811 | m68hc11 | m6812 | m68hc12 | picochip) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none @@ -371,7 +372,7 @@ case $basic_machine in | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ - | romp-* | rs6000-* \ + | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in index ba30c4f..f1e38fc 100644 --- a/scripts/crosstool-NG.sh.in +++ b/scripts/crosstool-NG.sh.in @@ -83,7 +83,7 @@ CT_DoExecLog DEBUG mkdir -p "${CT_BIN_OVERIDE_DIR}" cat "${CT_LIB_DIR}/paths.mk" |while read trash line; do tool="${line%%=*}" path="${line#*=}" - CT_DoLog DEBUG " '${tool}' -> '${path}'" + CT_DoLog DEBUG "Creating script-override for '${tool}' -> '${path}'" printf "#${BANG}${CT_SHELL}\nexec '${path}' \"\${@}\"\n" >"${CT_BIN_OVERIDE_DIR}/${tool}" CT_DoExecLog ALL chmod 700 "${CT_BIN_OVERIDE_DIR}/${tool}" done diff --git a/scripts/functions b/scripts/functions index ae584c4..62a2f99 100644 --- a/scripts/functions +++ b/scripts/functions @@ -79,7 +79,7 @@ CT_DoLog() { if [ $# -eq 0 ]; then cat - else - printf "${@}\n" + printf "${*}\n" fi |( IFS="${CR}" # We want the full lines, even leading spaces _prog_bar_cpt=0 _prog_bar[0]='/' @@ -116,7 +116,7 @@ CT_DoLog() { CT_DoExecLog() { local level="$1" shift - CT_DoLog DEBUG "==> Executing: '${@}'" + CT_DoLog DEBUG "==> Executing: '${*}'" "${@}" 2>&1 |CT_DoLog "${level}" } diff --git a/scripts/saveSample.sh.in b/scripts/saveSample.sh.in index 4ef71ce..e91dc9e 100644 --- a/scripts/saveSample.sh.in +++ b/scripts/saveSample.sh.in @@ -69,7 +69,7 @@ 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/${samp_name}"|;' \ +"${sed}" -r -e 's|^(CT_PREFIX_DIR)=.*|\1="${HOME}/x-tools/${CT_TARGET}"|;' \ -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"|;' \ @@ -99,7 +99,7 @@ fi 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}" "${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"|;' \ + "${sed}" -r -i -e 's|^(CT_LIBC_UCLIBC_CONFIG_FILE)=.+$|\1="'"${samp_top_dir}"'/samples/${CT_TARGET}/${CT_LIBC}-${CT_LIBC_VERSION}.config"|;' \ "${samp_dir}/crosstool.config" else # remove any dangling files diff --git a/scripts/showSamples.sh b/scripts/showSamples.sh index e952d64..13e5a3f 100755 --- a/scripts/showSamples.sh +++ b/scripts/showSamples.sh @@ -29,6 +29,7 @@ dump_single_sample() { fi . "${sample_top}/samples/${sample}/crosstool.config" if [ -z "${wiki}" ]; then + t_width=13 printf " %-*s [%s" ${width} "${sample}" "${sample_type}" [ -f "${sample_top}/samples/${sample}/broken" ] && printf "B" || printf " " [ "${CT_EXPERIMENTAL}" = "y" ] && printf "X" || printf " " @@ -37,15 +38,18 @@ dump_single_sample() { case "${CT_TOOLCHAIN_TYPE}" in cross) ;; canadian) - printf " Host : ${CT_HOST}\n" + printf " %-*s : %s\n" ${t_width} "Host" "${CT_HOST}" ;; esac - echo " OS : ${CT_KERNEL}${CT_KERNEL_VERSION:+-}${CT_KERNEL_VERSION}" + printf " %-*s : %s\n" ${t_width} "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}" + printf " %-*s : %s\n" ${t_width} "GMP/MPFR" "gmp-${CT_GMP_VERSION} / mpfr-${CT_MPFR_VERSION}" fi - echo " binutils : binutils-${CT_BINUTILS_VERSION}" - printf " C compiler: ${CT_CC}-${CT_CC_VERSION} (C" + if [ "${CT_PPL_CLOOG_MPC}" = "y" ]; then + printf " %-*s : %s\n" ${t_width} "PPL/CLOOG/MPC" "ppl-${CT_PPL_VERSION} / cloog-${CT_CLOOG_VERSION} / mpc-${CT_MPC_VERSION}" + fi + printf " %-*s : %s\n" ${t_width} "binutils" "binutils-${CT_BINUTILS_VERSION}" + printf " %-*s : %s" ${t_width} "C compiler" "${CT_CC}-${CT_CC_VERSION} (C" [ "${CT_CC_LANG_CXX}" = "y" ] && printf ",C++" [ "${CT_CC_LANG_FORTRAN}" = "y" ] && printf ",Fortran" [ "${CT_CC_LANG_JAVA}" = "y" ] && printf ",Java" @@ -53,17 +57,17 @@ dump_single_sample() { [ "${CT_CC_LANG_OBJC}" = "y" ] && printf ",Objective-C" [ "${CT_CC_LANG_OBJCXX}" = "y" ] && printf ",Objective-C++" [ -n "${CT_CC_LANG_OTHERS}" ] && printf ",${CT_CC_LANG_OTHERS}" - echo ")" - echo " C library : ${CT_LIBC}${CT_LIBC_VERSION:+-}${CT_LIBC_VERSION}" - printf " Tools :" - [ "${CT_LIBELF}" ] && printf " libelf-${CT_LIBELF_VERSION}" - [ "${CT_SSTRIP}" ] && printf " sstrip" - [ "${CT_DMALLOC}" ] && printf " dmalloc-${CT_DMALLOC_VERSION}" - [ "${CT_DUMA}" ] && printf " duma-${CT_DUMA_VERSION}" - [ "${CT_GDB}" ] && printf " gdb-${CT_GDB_VERSION}" - [ "${CT_LTRACE}" ] && printf " ltrace-${CT_LTRACE_VERSION}" - [ "${CT_STRACE}" ] && printf " strace-${CT_STRACE_VERSION}" - echo + printf ")\n" + printf " %-*s : %s\n" ${t_width} "C library" "${CT_LIBC}${CT_LIBC_VERSION:+-}${CT_LIBC_VERSION}" + printf " %-*s :" ${t_width} "Tools" + [ "${CT_TOOL_libelf}" ] && printf " libelf-${CT_LIBELF_VERSION}" + [ "${CT_TOOL_sstrip}" ] && printf " sstrip" + [ "${CT_DEBUG_dmalloc}" ] && printf " dmalloc-${CT_DMALLOC_VERSION}" + [ "${CT_DEBUG_duma}" ] && printf " duma-${CT_DUMA_VERSION}" + [ "${CT_DEBUG_gdb}" ] && printf " gdb-${CT_GDB_VERSION}" + [ "${CT_DEBUG_ltrace}" ] && printf " ltrace-${CT_LTRACE_VERSION}" + [ "${CT_DEBUG_strace}" ] && printf " strace-${CT_STRACE_VERSION}" + printf "\n" fi else printf "| ''${sample}'' " |