Browse Source

Whitespace: We don't use tabs in shell or kconfig files

We indent by multiples of 4.
This change cleans up whitespace in offending files.

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
dev-linux
Bryan Hundven 7 years ago
parent
commit
9f89e082c5
  1. 66
      .travis.sh
  2. 2
      config/arch/microblaze.in
  3. 44
      config/arch/xtensa.in.2
  4. 6
      config/libc/newlib.in.2
  5. 64
      scripts/addToolVersion.sh
  6. 6
      scripts/build/cc.sh
  7. 20
      scripts/build/cc/100-gcc.sh
  8. 20
      scripts/build/companion_libs/130-cloog.sh
  9. 24
      scripts/build/debug/300-gdb.sh
  10. 62
      scripts/patch-rework.sh
  11. 8
      scripts/showSamples.sh

66
.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
}

2
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

44
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.

6
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

64
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=;;

6
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
}

20
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")

20
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"

24
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" \

62
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}"

8
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}"

Loading…
Cancel
Save