Convert tabs to spaces

Recent changes introduced a mixture of tabs/spaces that result in broken
indentation in multiple places.

Signed-off-by: Alexey Neyman <stilor@att.net>
This commit is contained in:
Alexey Neyman 2022-02-08 17:11:32 -08:00
parent c6ff1eca5b
commit 7b97bdd825
7 changed files with 69 additions and 69 deletions

View File

@ -62,7 +62,7 @@ config LIBC_PICOLIBC_GLOBAL_ATEXIT
prompt "Enable atexit data structure as global variable"
help
Enable atexit data structure as global variable, instead
of being thread-local.
of being thread-local.
config LIBC_PICOLIBC_LITE_EXIT
bool

View File

@ -4,31 +4,31 @@ CT_DoArchTupleValues() {
CT_TARGET_ARCH="sparc${target_bits_64}${CT_ARCH_SUFFIX}"
if [ "${CT_KERNEL}" = "linux" -a -z "${CT_ARCH_CPU}" ]; then
if [ "${CT_ARCH_64}" = "y" ]; then
# By default, sparc64-*-linux is configured with -mcpu=v9. However,
# according to https://sourceware.org/ml/libc-alpha/2005-12/msg00027.html,
# "There is no Linux sparc64 port that runs on non-UltraSPARC-I+ ISA CPUs."
# There is a patch that would change the default to -mcpu=ultrasparc for
# sparc64-*-linux configuration: https://patchwork.ozlabs.org/patch/409424/
# but that patch has not been integrated (yet). One concern raised about
# this patch was that -mcpu=ultrasparc can suboptimally schedule instructions
# for newer SPARC CPUs. So, override to -mcpu=ultrasparc and warn the user.
CT_DoLog WARN "Setting CPU to UltraSPARC-I for sparc64-linux. Set CT_ARCH_CPU if a different CPU is desired."
CT_ARCH_WITH_CPU="--with-cpu=ultrasparc"
if [ -n "${CT_ARCH_SUPPORTS_WITH_32_64}" -a -n "${CT_MULTILIB}" ]; then
CT_ARCH_WITH_CPU_32="--with-cpu-32=ultrasparc"
CT_ARCH_WITH_CPU_64="--with-cpu-64=ultrasparc"
fi
else
# Similarly, sparc-*-linux defaults to v7. GLIBC 2.31 started to reject
# pre-v8 configurations with 2.31, and default v8 fails a subsequent test for
# using atomics (which are presumably, only available on some v8 CPUs).
# Therefore, default to v9.
if [ -z "${CT_GLIBC_SPARC_ALLOW_V7}" ]; then
CT_DoLog WARN "Setting CPU to V9 for sparc-linux. Set CT_ARCH_CPU if a different CPU is desired."
CT_ARCH_WITH_CPU="--with-cpu=v9"
fi
fi
if [ "${CT_ARCH_64}" = "y" ]; then
# By default, sparc64-*-linux is configured with -mcpu=v9. However,
# according to https://sourceware.org/ml/libc-alpha/2005-12/msg00027.html,
# "There is no Linux sparc64 port that runs on non-UltraSPARC-I+ ISA CPUs."
# There is a patch that would change the default to -mcpu=ultrasparc for
# sparc64-*-linux configuration: https://patchwork.ozlabs.org/patch/409424/
# but that patch has not been integrated (yet). One concern raised about
# this patch was that -mcpu=ultrasparc can suboptimally schedule instructions
# for newer SPARC CPUs. So, override to -mcpu=ultrasparc and warn the user.
CT_DoLog WARN "Setting CPU to UltraSPARC-I for sparc64-linux. Set CT_ARCH_CPU if a different CPU is desired."
CT_ARCH_WITH_CPU="--with-cpu=ultrasparc"
if [ -n "${CT_ARCH_SUPPORTS_WITH_32_64}" -a -n "${CT_MULTILIB}" ]; then
CT_ARCH_WITH_CPU_32="--with-cpu-32=ultrasparc"
CT_ARCH_WITH_CPU_64="--with-cpu-64=ultrasparc"
fi
else
# Similarly, sparc-*-linux defaults to v7. GLIBC 2.31 started to reject
# pre-v8 configurations with 2.31, and default v8 fails a subsequent test for
# using atomics (which are presumably, only available on some v8 CPUs).
# Therefore, default to v9.
if [ -z "${CT_GLIBC_SPARC_ALLOW_V7}" ]; then
CT_DoLog WARN "Setting CPU to V9 for sparc-linux. Set CT_ARCH_CPU if a different CPU is desired."
CT_ARCH_WITH_CPU="--with-cpu=v9"
fi
fi
fi
}

View File

@ -337,14 +337,14 @@ do_gcc_core_backend() {
;;
libstdcxx)
CT_DoLog EXTRA "Configuring libstdc++ for ${libstdcxx_name}"
if [ "${header_dir}" = "" ]; then
header_dir="${CT_PREFIX_DIR}/${libstdcxx_name}/include"
fi
if [ "${exec_prefix}" = "" ]; then
exec_prefix="${CT_PREFIX_DIR}/${libstdcxx_name}"
fi
if [ "${header_dir}" = "" ]; then
header_dir="${CT_PREFIX_DIR}/${libstdcxx_name}/include"
fi
if [ "${exec_prefix}" = "" ]; then
exec_prefix="${CT_PREFIX_DIR}/${libstdcxx_name}"
fi
extra_config+=( "${CT_CC_SYSROOT_ARG[@]}" )
extra_config+=( "--with-headers=${header_dir}" )
extra_config+=( "--with-headers=${header_dir}" )
extra_user_config=( "${CT_CC_GCC_EXTRA_CONFIG_ARRAY[@]}" )
log_txt="libstdc++ ${libstdcxx_name} library"
# to inhibit the libiberty and libgcc tricks later on
@ -356,7 +356,7 @@ do_gcc_core_backend() {
esac
if [ "${exec_prefix}" = "" ]; then
exec_prefix="${prefix}"
exec_prefix="${prefix}"
fi
case "${mode}" in
@ -654,7 +654,7 @@ do_gcc_core_backend() {
--host=${host} \
--target=${CT_TARGET} \
--prefix="${prefix}" \
--exec_prefix="${exec_prefix}" \
--exec_prefix="${exec_prefix}" \
--with-local-prefix="${CT_SYSROOT_DIR}" \
"${extra_config[@]}" \
--enable-languages="${lang_list}" \
@ -726,11 +726,11 @@ do_gcc_core_backend() {
core_targets_all=all
core_targets_install=install
;;
libstdcxx)
core_targets=( target-libstdc++-v3 )
core_targets_all="${core_targets[@]/#/all-}"
core_targets_install="${core_targets[@]/#/install-}"
;;
libstdcxx)
core_targets=( target-libstdc++-v3 )
core_targets_all="${core_targets[@]/#/all-}"
core_targets_install="${core_targets[@]/#/install-}"
;;
esac
CT_DoLog EXTRA "Building ${log_txt}"
@ -807,9 +807,9 @@ do_cc_for_build() {
# lack of such a compiler, but better safe than sorry...
build_final_opts+=( "mode=baremetal" )
build_final_opts+=( "build_libgcc=yes" )
if [ "${CT_LIBC_NONE}" != "y" ]; then
if [ "${CT_LIBC_NONE}" != "y" ]; then
build_final_opts+=( "build_libstdcxx=yes" )
fi
fi
build_final_opts+=( "build_libgfortran=yes" )
if [ "${CT_STATIC_TOOLCHAIN}" = "y" ]; then
build_final_opts+=( "build_staticlinked=yes" )
@ -898,9 +898,9 @@ do_cc_for_host() {
if [ "${CT_BARE_METAL}" = "y" ]; then
final_opts+=( "mode=baremetal" )
final_opts+=( "build_libgcc=yes" )
if [ "${CT_LIBC_NONE}" != "y" ]; then
if [ "${CT_LIBC_NONE}" != "y" ]; then
final_opts+=( "build_libstdcxx=yes" )
fi
fi
final_opts+=( "build_libgfortran=yes" )
if [ "${CT_STATIC_TOOLCHAIN}" = "y" ]; then
final_opts+=( "build_staticlinked=yes" )
@ -969,7 +969,7 @@ do_gcc_backend() {
done
if [ "${exec_prefix}" = "" ]; then
exec_prefix="${prefix}"
exec_prefix="${prefix}"
fi
# This function gets called for final gcc and libstdcxx.
@ -1280,7 +1280,7 @@ do_gcc_backend() {
--host=${host} \
--target=${CT_TARGET} \
--prefix="${prefix}" \
--exec_prefix="${exec_prefix}" \
--exec_prefix="${exec_prefix}" \
${CT_CC_SYSROOT_ARG} \
"${extra_config[@]}" \
--with-local-prefix="${CT_SYSROOT_DIR}" \

View File

@ -32,18 +32,18 @@ do_cc_libstdcxx_picolibc()
if [ "${CT_LIBC_PICOLIBC_GCC_LIBSTDCXX}" = "y" ]; then
final_opts+=( "host=${CT_HOST}" )
final_opts+=( "libstdcxx_name=picolibc" )
final_opts+=( "libstdcxx_name=picolibc" )
final_opts+=( "prefix=${CT_PREFIX_DIR}" )
final_opts+=( "complibs=${CT_HOST_COMPLIBS_DIR}" )
final_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" )
final_opts+=( "ldflags=${CT_LDFLAGS_FOR_HOST}" )
final_opts+=( "lang_list=c,c++" )
final_opts+=( "build_step=libstdcxx" )
final_opts+=( "extra_config+=('--enable-stdio=stdio_pure')" )
final_opts+=( "extra_config+=('--disable-wchar_t')" )
if [ "${CT_LIBC_PICOLIBC_ENABLE_TARGET_OPTSPACE}" = "y" ]; then
final_opts+=( "enable_optspace=yes" )
fi
final_opts+=( "extra_config+=('--enable-stdio=stdio_pure')" )
final_opts+=( "extra_config+=('--disable-wchar_t')" )
if [ "${CT_LIBC_PICOLIBC_ENABLE_TARGET_OPTSPACE}" = "y" ]; then
final_opts+=( "enable_optspace=yes" )
fi
if [ "${CT_BARE_METAL}" = "y" ]; then
final_opts+=( "mode=baremetal" )
@ -107,7 +107,7 @@ RETARGETABLE_LOCKING:newlib-retargetable-locking
done
[ "${CT_USE_SYSROOT}" = "y" ] && \
picolibc_opts+=( "-Dsysroot-install=true" )
picolibc_opts+=( "-Dsysroot-install=true" )
[ "${CT_LIBC_PICOLIBC_EXTRA_SECTIONS}" = "y" ] && \
CT_LIBC_PICOLIBC_TARGET_CFLAGS="${CT_LIBC_PICOLIBC_TARGET_CFLAGS} -ffunction-sections -fdata-sections"
@ -122,11 +122,11 @@ RETARGETABLE_LOCKING:newlib-retargetable-locking
# build : not used
# host : the machine building picolibc
# target : the machine picolibc runs on
meson_cflags=""
for cflag in ${cflags_for_target}; do
meson_cflags="${meson_cflags} '${cflag}',"
done
cat << EOF > picolibc-cross.txt
meson_cflags=""
for cflag in ${cflags_for_target}; do
meson_cflags="${meson_cflags} '${cflag}',"
done
cat << EOF > picolibc-cross.txt
[binaries]
c = '${CT_TARGET}-gcc'
ar = '${CT_TARGET}-ar'
@ -149,9 +149,9 @@ EOF
meson \
--cross-file picolibc-cross.txt \
--prefix="${CT_PREFIX_DIR}" \
-Dincludedir=picolibc/include \
-Dlibdir=picolibc/${CT_TARGET}/lib \
-Dspecsdir="${CT_SYSROOT_DIR}"/lib \
-Dincludedir=picolibc/include \
-Dlibdir=picolibc/${CT_TARGET}/lib \
-Dspecsdir="${CT_SYSROOT_DIR}"/lib \
"${CT_SRC_DIR}/picolibc" \
"${picolibc_opts[@]}" \
"${CT_LIBC_PICOLIBC_EXTRA_CONFIG_ARRAY[@]}"

View File

@ -57,16 +57,16 @@ do_cc_libstdcxx_newlib_nano()
if [ "${CT_NEWLIB_NANO_GCC_LIBSTDCXX}" = "y" ]; then
final_opts+=( "host=${CT_HOST}" )
final_opts+=( "libstdcxx_name=newlib-nano" )
final_opts+=( "libstdcxx_name=newlib-nano" )
final_opts+=( "prefix=${CT_PREFIX_DIR}" )
final_opts+=( "complibs=${CT_HOST_COMPLIBS_DIR}" )
final_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" )
final_opts+=( "ldflags=${CT_LDFLAGS_FOR_HOST}" )
final_opts+=( "lang_list=c,c++" )
final_opts+=( "build_step=libstdcxx" )
if [ "${CT_LIBC_NEWLIB_NANO_ENABLE_TARGET_OPTSPACE}" = "y" ]; then
final_opts+=( "enable_optspace=yes" )
fi
if [ "${CT_LIBC_NEWLIB_NANO_ENABLE_TARGET_OPTSPACE}" = "y" ]; then
final_opts+=( "enable_optspace=yes" )
fi
if [ -n "${CT_NEWLIB_NANO_GCC_LIBSTDCXX_TARGET_CXXFLAGS}" ]; then
final_opts+=( "extra_cxxflags_for_target=${CT_NEWLIB_NANO_GCC_LIBSTDCXX_TARGET_CXXFLAGS}" )
fi
@ -185,8 +185,8 @@ ENABLE_TARGET_OPTSPACE:target-optspace
--host=${CT_BUILD} \
--target=${CT_TARGET} \
--prefix=${CT_PREFIX_DIR} \
--exec-prefix=${CT_PREFIX_DIR}/newlib-nano \
--libdir=${CT_PREFIX_DIR}/newlib-nano/${CT_TARGET}/lib \
--exec-prefix=${CT_PREFIX_DIR}/newlib-nano \
--libdir=${CT_PREFIX_DIR}/newlib-nano/${CT_TARGET}/lib \
"${newlib_opts[@]}" \
"${CT_LIBC_NEWLIB_NANO_EXTRA_CONFIG_ARRAY[@]}"

View File

@ -72,7 +72,7 @@ do_make_backend()
"${CT_SRC_DIR}/make/configure" \
--host="${host}" \
--prefix="${prefix}" \
"${extra_config[@]}"
"${extra_config[@]}"
CT_DoLog EXTRA "Building make"
CT_DoExecLog ALL make

View File

@ -56,7 +56,7 @@ do_bison_backend()
"${CT_SRC_DIR}/bison/configure" \
--host="${host}" \
--prefix="${prefix}" \
"${extra_config[@]}"
"${extra_config[@]}"
CT_DoLog EXTRA "Building bison"
CT_DoExecLog ALL make