summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.sh66
-rw-r--r--config/arch/microblaze.in2
-rw-r--r--config/arch/xtensa.in.244
-rw-r--r--config/libc/newlib.in.26
-rwxr-xr-xscripts/addToolVersion.sh64
-rw-r--r--scripts/build/cc.sh6
-rw-r--r--scripts/build/cc/100-gcc.sh20
-rw-r--r--scripts/build/companion_libs/130-cloog.sh20
-rw-r--r--scripts/build/debug/300-gdb.sh24
-rwxr-xr-xscripts/patch-rework.sh62
-rwxr-xr-xscripts/showSamples.sh8
11 files changed, 162 insertions, 160 deletions
diff --git a/.travis.sh b/.travis.sh
index 90a439b..7cb6b14 100644
--- a/.travis.sh
+++ b/.travis.sh
@@ -4,42 +4,42 @@ export PATH="$(pwd):$PATH"
# Manage the travis build
ct-ng_travis_build()
{
- # Override the log behaviour
- sed -i -e 's/^.*\(CT_LOG_ERROR\).*$/# \1 is not set/' \
- -e 's/^.*\(CT_LOG_WARN\).*$/# \1 is not set/' \
- -e 's/^.*\(CT_LOG_INFO\).*$/# \1 is not set/' \
- -e 's/^.*\(CT_LOG_EXTRA\).*$/\1=y/' \
- -e 's/^.*\(CT_LOG_ALL\).*$/# \1 is not set/' \
- -e 's/^.*\(CT_LOG_DEBUG\).*$/# \1 is not set/' \
- -e 's/^.*\(CT_LOG_LEVEL_MAX\).*$/\1="EXTRA"/' \
- -e 's/^.*\(CT_LOG_PROGRESS_BAR\).*$/# \1 is not set/' \
- -e 's/^.*\(CT_LOCAL_TARBALLS_DIR\).*$/\1="${HOME}\/src"/' \
- -e 's/^.*\(CT_SAVE_TARBALLS\).*$/\1=y/' \
- .config
+ # Override the log behaviour
+ sed -i -e 's/^.*\(CT_LOG_ERROR\).*$/# \1 is not set/' \
+ -e 's/^.*\(CT_LOG_WARN\).*$/# \1 is not set/' \
+ -e 's/^.*\(CT_LOG_INFO\).*$/# \1 is not set/' \
+ -e 's/^.*\(CT_LOG_EXTRA\).*$/\1=y/' \
+ -e 's/^.*\(CT_LOG_ALL\).*$/# \1 is not set/' \
+ -e 's/^.*\(CT_LOG_DEBUG\).*$/# \1 is not set/' \
+ -e 's/^.*\(CT_LOG_LEVEL_MAX\).*$/\1="EXTRA"/' \
+ -e 's/^.*\(CT_LOG_PROGRESS_BAR\).*$/# \1 is not set/' \
+ -e 's/^.*\(CT_LOCAL_TARBALLS_DIR\).*$/\1="${HOME}\/src"/' \
+ -e 's/^.*\(CT_SAVE_TARBALLS\).*$/\1=y/' \
+ .config
- # Build the sample
- ct-ng build.2 &
- local build_pid=$!
+ # Build the sample
+ ct-ng build.2 &
+ local build_pid=$!
- # Start a runner task to print a "still running" line every 5 minutes
- # to avoid travis to think that the build is stuck
- {
- while true
- do
- sleep 300
- printf "Crosstool-NG is still running ...\r"
- done
- } &
- local runner_pid=$!
+ # Start a runner task to print a "still running" line every 5 minutes
+ # to avoid travis to think that the build is stuck
+ {
+ while true
+ do
+ sleep 300
+ printf "Crosstool-NG is still running ...\r"
+ done
+ } &
+ local runner_pid=$!
- # Wait for the build to finish and get the result
- wait $build_pid 2>/dev/null
- local result=$?
+ # Wait for the build to finish and get the result
+ wait $build_pid 2>/dev/null
+ local result=$?
- # Stop the runner task
- kill $runner_pid
- wait $runner_pid 2>/dev/null
+ # Stop the runner task
+ kill $runner_pid
+ wait $runner_pid 2>/dev/null
- # Return the result
- return $result
+ # Return the result
+ return $result
}
diff --git a/config/arch/microblaze.in b/config/arch/microblaze.in
index c664498..d236007 100644
--- a/config/arch/microblaze.in
+++ b/config/arch/microblaze.in
@@ -10,7 +10,7 @@
## select ARCH_DEFAULT_HAS_MMU
##
## help The MicroBlaze architecture, as defined by:
-## help http://www.xilinx.com/
+## help http://www.xilinx.com/
## help
## help Upstream projects do not currently provide
## help full support for the microblaze architecture
diff --git a/config/arch/xtensa.in.2 b/config/arch/xtensa.in.2
index 343cd2c..25ece70 100644
--- a/config/arch/xtensa.in.2
+++ b/config/arch/xtensa.in.2
@@ -1,31 +1,33 @@
choice
- prompt "Target Architecture Variant"
- default ARCH_xtensa_fsf
+ prompt "Target Architecture Variant"
+ default ARCH_xtensa_fsf
+
config XTENSA_CUSTOM
- bool "Custom Xtensa processor configuration"
+ bool "Custom Xtensa processor configuration"
config ARCH_xtensa_fsf
- bool "fsf - Default configuration"
+ bool "fsf - Default configuration"
endchoice
config ARCH_XTENSA_CUSTOM_NAME
- string "Custom Xtensa processor configuration name"
- depends on XTENSA_CUSTOM
- default ""
- help
- Enter the name of the custom processor configuration.
- Overlay file for that configuration must be called
- 'xtensa_<CUSTOM_NAME>.tar'.
- Leave blank to use the default 'xtensa-overlay.tar'.
- For more information about this option, please also consult
- section 'Using crosstool-NG to build Xtensa toolchains' in the
- docs/C - Misc. tutorials.txt
+ string "Custom Xtensa processor configuration name"
+ depends on XTENSA_CUSTOM
+ default ""
+ help
+ Enter the name of the custom processor configuration.
+ Overlay file for that configuration must be called
+ 'xtensa_<CUSTOM_NAME>.tar'.
+
+ Leave blank to use the default 'xtensa-overlay.tar'.
+ For more information about this option, please also consult
+ section 'Using crosstool-NG to build Xtensa toolchains' in the
+ docs/C - Misc. tutorials.txt
config ARCH_XTENSA_CUSTOM_OVERLAY_LOCATION
- string "Full path to custom Xtensa processor configurations"
- depends on XTENSA_CUSTOM
- default ""
- help
- Enter the path to the directory for the custom processor
- configuration file.
+ string "Full path to custom Xtensa processor configurations"
+ depends on XTENSA_CUSTOM
+ default ""
+ help
+ Enter the path to the directory for the custom processor
+ configuration file.
diff --git a/config/libc/newlib.in.2 b/config/libc/newlib.in.2
index ef5d076..b16b23a 100644
--- a/config/libc/newlib.in.2
+++ b/config/libc/newlib.in.2
@@ -31,9 +31,9 @@ config LIBC_NEWLIB_DISABLE_SUPPLIED_SYSCALLS
prompt "Disable the syscalls supplied with newlib"
help
Disable the syscalls that come with newlib. You
- will have to implement your own _sbrk, _read,
- _write... If you plan to port newlib to a new
- platform/board, say Yes.
+ will have to implement your own _sbrk, _read,
+ _write... If you plan to port newlib to a new
+ platform/board, say Yes.
config LIBC_NEWLIB_ENABLE_TARGET_OPTSPACE
bool
diff --git a/scripts/addToolVersion.sh b/scripts/addToolVersion.sh
index bd419f8..0144e4f 100755
--- a/scripts/addToolVersion.sh
+++ b/scripts/addToolVersion.sh
@@ -14,37 +14,37 @@ myname="$0"
doHelp() {
cat <<-EOF
- Usage: ${myname} <--tool> <[options] version [...]> ...
- 'tool' in one of:
- gcc, binutils, glibc, uClibc, newlib, linux, gdb, dmalloc,
- duma, strace, ltrace, libelf, gmp, mpfr, isl, cloog, mpc,
- mingw-w64, expat, ncurses
-
- Valid options for all tools:
- --stable, -s, +x (default)
- mark the version as being stable (as opposed to experimental, below)
-
- --experimental, -x, +s
- mark the version as being experimental (as opposed to stable, above)
-
- --current, -c, +o (default)
- mark the version as being cuurent (as opposed to obsolete, below)
-
- --obsolete, -o, +c
- mark the version as being obsolete (as opposed to current, above)
-
- Note: setting a new tool resets to the defaults: 'stable' and 'current'.
-
- 'version' is a valid version for the specified tool.
-
- Examples:
- add stable current version 2.6.19.2 to linux kernel:
- ${myname} --linux 2.6.19.2
-
- add experimental obsolete version 2.3.5 and stable current versions 2.6.1
- and 2.6.2 to glibc, add stable obsolete version 3.3.3 to gcc:
- ${myname} --glibc -x -o 2.3.5 -s -c 2.6.1 2.6.2 --gcc -o 3.3.3
- EOF
+ Usage: ${myname} <--tool> <[options] version [...]> ...
+ 'tool' in one of:
+ gcc, binutils, glibc, uClibc, newlib, linux, gdb, dmalloc,
+ duma, strace, ltrace, libelf, gmp, mpfr, isl, cloog, mpc,
+ mingw-w64, expat, ncurses
+
+ Valid options for all tools:
+ --stable, -s, +x (default)
+ mark the version as being stable (as opposed to experimental, below)
+
+ --experimental, -x, +s
+ mark the version as being experimental (as opposed to stable, above)
+
+ --current, -c, +o (default)
+ mark the version as being cuurent (as opposed to obsolete, below)
+
+ --obsolete, -o, +c
+ mark the version as being obsolete (as opposed to current, above)
+
+ Note: setting a new tool resets to the defaults: 'stable' and 'current'.
+
+ 'version' is a valid version for the specified tool.
+
+ Examples:
+ add stable current version 2.6.19.2 to linux kernel:
+ ${myname} --linux 2.6.19.2
+
+ add experimental obsolete version 2.3.5 and stable current versions 2.6.1
+ and 2.6.2 to glibc, add stable obsolete version 3.3.3 to gcc:
+ ${myname} --glibc -x -o 2.3.5 -s -c 2.6.1 2.6.2 --gcc -o 3.3.3
+ EOF
}
# Extract field $3 from version $1 with separator $2
@@ -187,7 +187,7 @@ while [ $# -gt 0 ]; do
--ltrace) EXP=; OBS=; cat=LTRACE; tool=ltrace; tool_prefix=debug; dot2suffix=;;
--gmp) EXP=; OBS=; cat=GMP; tool=gmp; tool_prefix=companion_libs; dot2suffix=;;
--mpfr) EXP=; OBS=; cat=MPFR; tool=mpfr; tool_prefix=companion_libs; dot2suffix=;;
- --isl) EXP=; OBS=; cat=ISL; tool=isl; tool_prefix=companion_libs; dot2suffix=;;
+ --isl) EXP=; OBS=; cat=ISL; tool=isl; tool_prefix=companion_libs; dot2suffix=;;
--cloog) EXP=; OBS=; cat=CLOOG; tool=cloog; tool_prefix=companion_libs; dot2suffix=;;
--mpc) EXP=; OBS=; cat=MPC; tool=mpc; tool_prefix=companion_libs; dot2suffix=;;
--libelf) EXP=; OBS=; cat=LIBELF; tool=libelf; tool_prefix=companion_libs; dot2suffix=;;
diff --git a/scripts/build/cc.sh b/scripts/build/cc.sh
index 3c8aaef..0db6b9c 100644
--- a/scripts/build/cc.sh
+++ b/scripts/build/cc.sh
@@ -38,21 +38,21 @@ do_cc_core_pass_1() {
# Core pass 2 the cc facilities
do_cc_core_pass_2() {
- for f in ${CT_CC_FACILITY_LIST}; do
+ for f in ${CT_CC_FACILITY_LIST}; do
do_${f}_core_pass_2
done
}
# Build for build the cc facilities
do_cc_for_build() {
- for f in ${CT_CC_FACILITY_LIST}; do
+ for f in ${CT_CC_FACILITY_LIST}; do
do_${f}_for_build
done
}
# Build for host the cc facilities
do_cc_for_host() {
- for f in ${CT_CC_FACILITY_LIST}; do
+ for f in ${CT_CC_FACILITY_LIST}; do
do_${f}_for_host
done
}
diff --git a/scripts/build/cc/100-gcc.sh b/scripts/build/cc/100-gcc.sh
index 7378187..0640452 100644
--- a/scripts/build/cc/100-gcc.sh
+++ b/scripts/build/cc/100-gcc.sh
@@ -143,7 +143,7 @@ do_gcc_core_pass_2() {
;;
*)
core_opts+=( "mode=static" )
- core_opts+=( "build_libgcc=yes" )
+ core_opts+=( "build_libgcc=yes" )
;;
esac
@@ -313,9 +313,9 @@ do_gcc_core_backend() {
if [ "${CT_ISL}" = "y" ]; then
extra_config+=("--with-isl=${complibs}")
fi
- if [ "${CT_CLOOG}" = "y" ]; then
- extra_config+=("--with-cloog=${complibs}")
- fi
+ if [ "${CT_CLOOG}" = "y" ]; then
+ extra_config+=("--with-cloog=${complibs}")
+ fi
elif [ "${CT_CC_GCC_HAS_GRAPHITE}" = "y" ]; then
extra_config+=("--with-isl=no")
extra_config+=("--with-cloog=no")
@@ -472,8 +472,8 @@ do_gcc_core_backend() {
CT_DoExecLog ALL ${make} ${JOBSFLAGS} -C libbacktrace
fi
- libgcc_rule="libgcc.mvars"
- core_targets=( gcc target-libgcc )
+ libgcc_rule="libgcc.mvars"
+ core_targets=( gcc target-libgcc )
# On bare metal and canadian build the host-compiler is used when
# actually the build-system compiler is required. Choose the correct
@@ -710,7 +710,7 @@ do_gcc_backend() {
extra_config+=("--enable-cxx-flags=${CT_CC_GCC_ENABLE_CXX_FLAGS}")
fi
if [ "${CT_THREADS}" = "none" ]; then
- extra_config+=(--disable-libatomic)
+ extra_config+=(--disable-libatomic)
fi
if [ "${CT_CC_GCC_LIBMUDFLAP}" = "y" ]; then
extra_config+=(--enable-libmudflap)
@@ -790,9 +790,9 @@ do_gcc_backend() {
if [ "${CT_ISL}" = "y" ]; then
extra_config+=("--with-isl=${complibs}")
fi
- if [ "${CT_CLOOG}" = "y" ]; then
- extra_config+=("--with-cloog=${complibs}")
- fi
+ if [ "${CT_CLOOG}" = "y" ]; then
+ extra_config+=("--with-cloog=${complibs}")
+ fi
elif [ "${CT_CC_GCC_HAS_GRAPHITE}" = "y" ]; then
extra_config+=("--with-isl=no")
extra_config+=("--with-cloog=no")
diff --git a/scripts/build/companion_libs/130-cloog.sh b/scripts/build/companion_libs/130-cloog.sh
index 1b37167..2376570 100644
--- a/scripts/build/companion_libs/130-cloog.sh
+++ b/scripts/build/companion_libs/130-cloog.sh
@@ -87,9 +87,9 @@ do_cloog_backend() {
done
if [ "${CT_CLOOG_0_18_or_later}" = y ]; then
- cloog_opts+=( --with-gmp=system --with-gmp-prefix="${prefix}" )
- cloog_opts+=( --with-isl=system --with-isl-prefix="${prefix}" )
- cloog_opts+=( --without-osl )
+ cloog_opts+=( --with-gmp=system --with-gmp-prefix="${prefix}" )
+ cloog_opts+=( --with-isl=system --with-isl-prefix="${prefix}" )
+ cloog_opts+=( --without-osl )
fi
CT_DoLog EXTRA "Configuring CLooG"
@@ -99,13 +99,13 @@ do_cloog_backend() {
LDFLAGS="${ldflags}" \
LIBS="-lm" \
"${CT_SRC_DIR}/cloog-${CT_CLOOG_VERSION}/configure" \
- --build=${CT_BUILD} \
- --host=${host} \
- --prefix="${prefix}" \
- --with-bits=gmp \
- --with-host-libstdcxx='-lstdc++' \
- --disable-shared \
- --enable-static \
+ --build=${CT_BUILD} \
+ --host=${host} \
+ --prefix="${prefix}" \
+ --with-bits=gmp \
+ --with-host-libstdcxx='-lstdc++' \
+ --disable-shared \
+ --enable-static \
"${cloog_opts[@]}"
CT_DoLog EXTRA "Building CLooG"
diff --git a/scripts/build/debug/300-gdb.sh b/scripts/build/debug/300-gdb.sh
index 7d23666..418e85c 100644
--- a/scripts/build/debug/300-gdb.sh
+++ b/scripts/build/debug/300-gdb.sh
@@ -95,10 +95,10 @@ do_debug_gdb_build() {
LD_for_gdb="${CT_HOST}-ld -static"
fi
- # Disable binutils options when building from the binutils-gdb repo.
- cross_extra_config+=("--disable-binutils")
- cross_extra_config+=("--disable-ld")
- cross_extra_config+=("--disable-gas")
+ # Disable binutils options when building from the binutils-gdb repo.
+ cross_extra_config+=("--disable-binutils")
+ cross_extra_config+=("--disable-ld")
+ cross_extra_config+=("--disable-gas")
CT_DoLog DEBUG "Extra config passed: '${cross_extra_config[*]}'"
@@ -186,10 +186,10 @@ do_debug_gdb_build() {
export ac_cv_func_strncmp_works=yes
- # Disable binutils options when building from the binutils-gdb repo.
- native_extra_config+=("--disable-binutils")
- native_extra_config+=("--disable-ld")
- native_extra_config+=("--disable-gas")
+ # Disable binutils options when building from the binutils-gdb repo.
+ native_extra_config+=("--disable-binutils")
+ native_extra_config+=("--disable-ld")
+ native_extra_config+=("--disable-gas")
CT_DoLog DEBUG "Extra config passed: '${native_extra_config[*]}'"
@@ -256,10 +256,10 @@ do_debug_gdb_build() {
fi
fi
- # Disable binutils options when building from the binutils-gdb repo.
- gdbserver_extra_config+=("--disable-binutils")
- gdbserver_extra_config+=("--disable-ld")
- gdbserver_extra_config+=("--disable-gas")
+ # Disable binutils options when building from the binutils-gdb repo.
+ gdbserver_extra_config+=("--disable-binutils")
+ gdbserver_extra_config+=("--disable-ld")
+ gdbserver_extra_config+=("--disable-gas")
CT_DoExecLog CFG \
CC="${CT_TARGET}-gcc" \
diff --git a/scripts/patch-rework.sh b/scripts/patch-rework.sh
index 2809348..d05d2c1 100755
--- a/scripts/patch-rework.sh
+++ b/scripts/patch-rework.sh
@@ -11,35 +11,35 @@ diff="$@"
do_help() {
cat <<-_EOF_
- ${0##*/}: transform a patchset of non-p1 patches into -p1 patches
-
- Usage:
- ${0##*/} <basedir> <src> <dst> [diffopts ...]
-
- Where:
- basedir
- points to the directory of the component to patch
-
- src
- points to the directory containing the existing patchset
- to transform
-
- dst
- points to the directory where to put transformed patches
-
- diffopts
- optional options to pass to diff, for debug purposes. You
- should not need it
-
- Example:
- Transform Gentoo patches against gcc-4.4.2 (some of which are
- -p0, -p1 or even -p2 patches) into all -p1 patches:
-
- tar xjf gcc-4.4.2.tar.bz2
- patch-rework.sh gcc-4.4.2 \\
- /path/to/gentoo/gcc/patches \\
- gcc-4.4.2.patches
- _EOF_
+ ${0##*/}: transform a patchset of non-p1 patches into -p1 patches
+
+ Usage:
+ ${0##*/} <basedir> <src> <dst> [diffopts ...]
+
+ Where:
+ basedir
+ points to the directory of the component to patch
+
+ src
+ points to the directory containing the existing patchset
+ to transform
+
+ dst
+ points to the directory where to put transformed patches
+
+ diffopts
+ optional options to pass to diff, for debug purposes. You
+ should not need it
+
+ Example:
+ Transform Gentoo patches against gcc-4.4.2 (some of which are
+ -p0, -p1 or even -p2 patches) into all -p1 patches:
+
+ tar xjf gcc-4.4.2.tar.bz2
+ patch-rework.sh gcc-4.4.2 \\
+ /path/to/gentoo/gcc/patches \\
+ gcc-4.4.2.patches
+ _EOF_
}
# Sanity checks
@@ -48,8 +48,8 @@ if [ -z "${base}" \
-o ! -d "${src}" \
-o -e "${dst}" -a ! -d "${dst}" \
]; then
- do_help
- exit 1
+ do_help
+ exit 1
fi
mkdir -p "${dst}"
diff --git a/scripts/showSamples.sh b/scripts/showSamples.sh
index b6d81c1..aed3dd1 100755
--- a/scripts/showSamples.sh
+++ b/scripts/showSamples.sh
@@ -69,7 +69,7 @@ dump_single_sample() {
printf " %-*s : %s\n" ${width} "OS" "${CT_KERNEL}${CT_KERNEL_VERSION:+-}${CT_KERNEL_VERSION}"
if [ -n "${CT_GMP}" \
-o -n "${CT_MPFR}" \
- -o -n "${CT_ISL}" \
+ -o -n "${CT_ISL}" \
-o -n "${CT_CLOOG}" \
-o -n "${CT_MPC}" \
-o -n "${CT_LIBELF}" \
@@ -77,7 +77,7 @@ dump_single_sample() {
-o -n "${CT_NCURSES}" \
-o -n "${CT_GMP_TARGET}" \
-o -n "${CT_MPFR_TARGET}" \
- -o -n "${CT_ISL_TARGET}" \
+ -o -n "${CT_ISL_TARGET}" \
-o -n "${CT_CLOOG_TARGET}" \
-o -n "${CT_MPC_TARGET}" \
-o -n "${CT_LIBELF_TARGET}" \
@@ -89,8 +89,8 @@ dump_single_sample() {
fi
[ -z "${CT_GMP}" -a -z "${CT_GMP_TARGET}" ] || printf " gmp-%s" "${CT_GMP_VERSION}"
[ -z "${CT_MPFR}" -a -z "${CT_MPFR_TARGET}" ] || printf " mpfr-%s" "${CT_MPFR_VERSION}"
- [ -z "${CT_ISL}" -a -z "${CT_ISL_TARGET}" ] || printf " isl-%s" "${CT_ISL_VERSION}"
- [ -z "${CT_CLOOG}" -a -z "${CT_CLOOG_TARGET}" ] || printf " cloog-%s" "${CT_CLOOG_VERSION}"
+ [ -z "${CT_ISL}" -a -z "${CT_ISL_TARGET}" ] || printf " isl-%s" "${CT_ISL_VERSION}"
+ [ -z "${CT_CLOOG}" -a -z "${CT_CLOOG_TARGET}" ] || printf " cloog-%s" "${CT_CLOOG_VERSION}"
[ -z "${CT_MPC}" -a -z "${CT_MPC_TARGET}" ] || printf " mpc-%s" "${CT_MPC_VERSION}"
[ -z "${CT_LIBELF}" -a -z "${CT_LIBELF_TARGET}" ] || printf " libelf-%s" "${CT_LIBELF_VERSION}"
[ -z "${CT_EXPAT}" -a -z "${CT_EXPAT_TARGET}" ] || printf " expat-%s" "${CT_EXPAT_VERSION}"