From 0041a8b1051e06dcb235780773f6b82d6685f428 Mon Sep 17 00:00:00 2001 From: Bryan Hundven Date: Wed, 25 Nov 2015 15:56:38 -0800 Subject: CT_Extract: Move check extracted up If we are using a custom location, and that custom location is a directory that does not have an associated tarball, then we shouldn't warn about not finding a tarball in CT_TARBALLS_DIR if CT_SRC_DIR/..extracted is found. If the extracted file is not found, then we can warn that the tarball was not found then error out that the tarball is missing. Signed-off-by: Bryan Hundven Reviewed-by: "Yann E. MORIN" --- scripts/functions | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'scripts') diff --git a/scripts/functions b/scripts/functions index e2666262..4761c1eb 100644 --- a/scripts/functions +++ b/scripts/functions @@ -938,18 +938,18 @@ CT_Extract() { basename="$1" shift - if ! ext="$(CT_GetFileExtension "${basename}")"; then - CT_DoLog WARN "'${basename}' not found in '${CT_TARBALLS_DIR}'" - return 1 - fi - local full_file="${CT_TARBALLS_DIR}/${basename}${ext}" - # Check if already extracted if [ -e "${CT_SRC_DIR}/.${basename}.extracted" ]; then CT_DoLog DEBUG "Already extracted '${basename}'" return 0 fi + if ! ext="$(CT_GetFileExtension "${basename}")"; then + CT_DoLog WARN "'${basename}' not found in '${CT_TARBALLS_DIR}'" + return 1 + fi + local full_file="${CT_TARBALLS_DIR}/${basename}${ext}" + # Check if previously partially extracted if [ -e "${CT_SRC_DIR}/.${basename}.extracting" ]; then CT_DoLog ERROR "The '${basename}' sources were partially extracted." -- cgit v1.2.3 From 83f8efa61fd94697306788277d6f45944d45494e Mon Sep 17 00:00:00 2001 From: Bryan Hundven Date: Thu, 26 Nov 2015 00:34:29 -0800 Subject: xtensa: Remove support for CT_CUSTOM_LOCATION_ROOT_DIR Since CUSTOM_LOCATION_ROOT_DIR was removed from config/global/paths.in in commit c499ccb, xtensa should depend only on it's ARCH_XTENSA_CUSTOM_OVERLAY_LOCATION. Signed-off-by: Bryan Hundven Reviewed-by: "Yann E. MORIN" --- config/arch/xtensa.in.2 | 3 +-- scripts/build/arch/xtensa.sh | 8 +------- 2 files changed, 2 insertions(+), 9 deletions(-) (limited to 'scripts') diff --git a/config/arch/xtensa.in.2 b/config/arch/xtensa.in.2 index 64ec4e6f..343cd2ce 100644 --- a/config/arch/xtensa.in.2 +++ b/config/arch/xtensa.in.2 @@ -28,5 +28,4 @@ config ARCH_XTENSA_CUSTOM_OVERLAY_LOCATION default "" help Enter the path to the directory for the custom processor - configuration file or leave blank to use the default location: - CT_CUSTOM_LOCATION_ROOT_DIR + configuration file. diff --git a/scripts/build/arch/xtensa.sh b/scripts/build/arch/xtensa.sh index 7e493127..c7bd4320 100644 --- a/scripts/build/arch/xtensa.sh +++ b/scripts/build/arch/xtensa.sh @@ -22,13 +22,7 @@ CT_ConfigureXtensa() { custom_overlay="xtensa-overlay.tar" fi - if [ -n "${CT_CUSTOM_LOCATION_ROOT_DIR}" \ - -a -z "${custom_location}" ]; then - custom_location="${CT_CUSTOM_LOCATION_ROOT_DIR}" - fi - - CT_TestAndAbort "${custom_overlay}: CT_CUSTOM_LOCATION_ROOT_DIR or CT_ARCH_XTENSA_CUSTOM_OVERLAY_LOCATION must be set." \ - -z "${CT_CUSTOM_LOCATION_ROOT_DIR}" -a -z "${custom_location}" + CT_TestAndAbort "${custom_overlay}: CT_ARCH_XTENSA_CUSTOM_OVERLAY_LOCATION must be set." -z "${custom_location}" local full_file="${custom_location}/${custom_overlay}" local basename="${component}-${version}" -- cgit v1.2.3 From 5d967e8b3949db7f4b8dae31e2f0b14efc568de9 Mon Sep 17 00:00:00 2001 From: Bryan Hundven Date: Thu, 26 Nov 2015 03:43:03 -0800 Subject: Linux: Remove obsolete Linux custom headers This option allowed you to use a custom headers directory/tarball to use in your sysroot. Not to be confused with using a custom source, that option is the preferred method. Signed-off-by: Bryan Hundven Reviewed-by: "Yann E. MORIN" --- config/kernel/linux.in | 45 -------------------------------------- config/kernel/linux.in.2 | 4 ---- scripts/build/kernel/linux.sh | 50 +++---------------------------------------- scripts/saveSample.sh.in | 6 ------ 4 files changed, 3 insertions(+), 102 deletions(-) (limited to 'scripts') diff --git a/config/kernel/linux.in b/config/kernel/linux.in index 3d919df3..5b429ecb 100644 --- a/config/kernel/linux.in +++ b/config/kernel/linux.in @@ -5,22 +5,6 @@ ## ## help Build a toolchain targeting systems running Linux as a kernel. -config KERNEL_LINUX_USE_CUSTOM_HEADERS - bool - prompt "Use pre-installed headers tree (OBSOLETE)" - depends on OBSOLETE - help - If you have some pre-installed kernel headers lying around, you can - enter the path to these headers, below, they will be copied from - there, and into the toolchain's sysroot. - - Note: - This will *not* let you use a complete kernel tree! - If you want to use your own full kernel tree, then you want to say 'N' - here, and select KERNEL_LINUX_CUSTOM, in the versions list, below. - -if ! KERNEL_LINUX_USE_CUSTOM_HEADERS - choice bool prompt "Linux kernel version" @@ -99,32 +83,3 @@ config KERNEL_VERSION default "3.2.72" if KERNEL_V_3_2 default "2.6.32.68" if KERNEL_V_2_6_32 default "custom" if KERNEL_LINUX_CUSTOM - -endif # ! KERNEL_LINUX_USE_CUSTOM_HEADERS - -if KERNEL_LINUX_USE_CUSTOM_HEADERS - -config KERNEL_LINUX_CUSTOM_PATH - string - prompt "Path to custom headers directory/tarball" - help - See KERNEL_LINUX_CUSTOM_IS_TARBALL, below. - -config KERNEL_LINUX_CUSTOM_IS_TARBALL - bool - prompt "This is a tarball" - help - If you say 'n' here, the path above is expected to point to a directory - containing readily prepared headers - - If you say 'y' here, then the path above is expected to point to a - tarball of such a directory. - - Eg., if your headers are available in: /foo/bar/buz/my_hdrs/include, - say 'n' here, and enter: /foo/bar/buz/my_hdrs below. - - Now, passing a tarball around is easier than passing a directory, so - if you want to, you can make a tarball of /foo/bar/buz/my_hdrs/include, - say 'y' here, and enter the path to this tarball below. - -endif # KERNEL_LINUX_USE_CUSTOM_HEADERS diff --git a/config/kernel/linux.in.2 b/config/kernel/linux.in.2 index 8e939582..80e13f37 100644 --- a/config/kernel/linux.in.2 +++ b/config/kernel/linux.in.2 @@ -1,7 +1,5 @@ # Linux kernel options -if ! KERNEL_LINUX_USE_CUSTOM_HEADERS - choice bool prompt "Kernel verbosity:" @@ -40,5 +38,3 @@ config KERNEL_LINUX_INSTALL_CHECK help If you are in doubt that installed headers are buggy, say 'Y' here to have an extra check passed onto the headers. - -endif # ! KERNEL_LINUX_USE_CUSTOM_HEADERS diff --git a/scripts/build/kernel/linux.sh b/scripts/build/kernel/linux.sh index 49fe6139..d7da1c48 100644 --- a/scripts/build/kernel/linux.sh +++ b/scripts/build/kernel/linux.sh @@ -23,10 +23,6 @@ do_kernel_get() { local rel_dir local korg_base mirror_base - if [ "${CT_KERNEL_LINUX_USE_CUSTOM_HEADERS}" = "y" ]; then - return 0 - fi - if [ "${CT_KERNEL_LINUX_CUSTOM}" = "y" ]; then CT_GetCustom "linux" "${CT_KERNEL_VERSION}" \ "${CT_KERNEL_LINUX_CUSTOM_LOCATION}" @@ -59,11 +55,6 @@ do_kernel_get() { # Extract kernel do_kernel_extract() { - # If using a custom headers tree, nothing to do - if [ "${CT_KERNEL_LINUX_USE_CUSTOM_HEADERS}" = "y" ]; then - return 0 - fi - # If using a custom directory location, nothing to do if [ "${CT_KERNEL_LINUX_CUSTOM}" = "y" \ -a -d "${CT_SRC_DIR}/linux-${CT_KERNEL_VERSION}" ]; then @@ -81,25 +72,12 @@ do_kernel_extract() { CT_Patch "linux" "${CT_KERNEL_VERSION}" } -# Wrapper to the actual headers install method -do_kernel_headers() { - CT_DoStep INFO "Installing kernel headers" - - if [ "${CT_KERNEL_LINUX_USE_CUSTOM_HEADERS}" = "y" ]; then - do_kernel_custom - else - do_kernel_install - fi - - CT_EndStep -} - # Install kernel headers using headers_install from kernel sources. -do_kernel_install() { +do_kernel_headers() { local kernel_path local kernel_arch - CT_DoLog DEBUG "Using kernel's headers_install" + CT_DoStep INFO "Installing kernel headers" mkdir -p "${CT_BUILD_DIR}/build-kernel-headers" @@ -145,28 +123,6 @@ do_kernel_install() { -o -name '..check.cmd' \ \) \ -exec rm {} \; -} -# Use custom headers (most probably by using make headers_install in a -# modified (read: customised) kernel tree, or using pre-2.6.18 headers, such -# as 2.4). In this case, simply copy the headers in place -do_kernel_custom() { - local tar_opt - - CT_DoLog EXTRA "Installing custom kernel headers" - - mkdir -p "${CT_SYSROOT_DIR}/usr" - cd "${CT_SYSROOT_DIR}/usr" - if [ "${CT_KERNEL_LINUX_CUSTOM_IS_TARBALL}" = "y" ]; then - case "${CT_KERNEL_LINUX_CUSTOM_PATH}" in - *.tar) ;; - *.tgz) tar_opt=--gzip;; - *.tar.gz) tar_opt=--gzip;; - *.tar.bz2) tar_opt=--bzip2;; - *.tar.xz) tar_opt=--xz;; - esac - CT_DoExecLog ALL tar x ${tar_opt} -vf ${CT_KERNEL_LINUX_CUSTOM_PATH} - else - CT_DoExecLog ALL cp -rv "${CT_KERNEL_LINUX_CUSTOM_PATH}/include" . - fi + CT_EndStep } diff --git a/scripts/saveSample.sh.in b/scripts/saveSample.sh.in index 34e65944..a070dc2c 100644 --- a/scripts/saveSample.sh.in +++ b/scripts/saveSample.sh.in @@ -37,12 +37,6 @@ if [ "${CT_CUSTOM_PATCH}" = "y" ]; then echo "You will not be able to (easily) share this sample in this case." read -p "Press Ctrl-C to stop now, or Enter to continue..." fi -if [ "${CT_KERNEL_LINUX_USE_CUSTOM_HEADERS}" = "y" ]; then - exec >&7 - echo "You are using custom Linux headers." - echo "You will not be able to (easily) share this sample in this case." - read -p "Press Ctrl-C to stop now, or Enter to continue..." -fi # Do not use a progress bar unset CT_LOG_PROGRESS_BAR -- cgit v1.2.3 From 1b3131448809f05d47cd50a98ede0d1b78eb85f0 Mon Sep 17 00:00:00 2001 From: Bryan Hundven Date: Thu, 26 Nov 2015 04:58:40 -0800 Subject: CT_GetCustom: Rewrite function to meet expectations The previous version of CT_GetCustom was a bit... funky. It didn't handle custom versions to location very well. This new version is exactly as it appears: CT_GetCustom The name is the beginning of the archive (file or directory). The version is the second half of the archive. The location is where it can be found. This should be made an absolute path, but this version is expecting the path in kconfig to be absolute. A file should extract to a directory: - A directory will be copied to: - This keeps our expectations of what we should get. Signed-off-by: Bryan Hundven Reviewed-by: "Yann E. MORIN" --- scripts/functions | 73 +++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 47 insertions(+), 26 deletions(-) (limited to 'scripts') diff --git a/scripts/functions b/scripts/functions index 4761c1eb..5a64232d 100644 --- a/scripts/functions +++ b/scripts/functions @@ -1,4 +1,6 @@ -# This file contains some usefull common functions -*- sh -*- +# -*- mode: sh; tab-width: 4 -*- +# vi: ts=4:sw=4:sts=4:et +# This file contains some usefull common functions # Copyright 2007 Yann E. MORIN # Licensed under the GPL v2. See COPYING in the root of this package @@ -625,39 +627,58 @@ CT_GetLocal() { } # This function gets the custom source from either a tarball or directory -# Usage: CT_GetCustom +# Usage: CT_GetCustom CT_GetCustom() { - local custom_component="$1" - local custom_version="$2" - local custom_location="$3" - local custom_name="${custom_component}-${custom_version}" - - CT_TestAndAbort "${custom_name}: CT_CUSTOM_LOCATION_ROOT_DIR or ${custom_component}'s CUSTOM_LOCATION must be set." \ - -z "${CT_CUSTOM_LOCATION_ROOT_DIR}" -a -z "${custom_location}" - - if [ -n "${CT_CUSTOM_LOCATION_ROOT_DIR}" \ - -a -z "${custom_location}" ]; then - custom_location="${CT_CUSTOM_LOCATION_ROOT_DIR}/${custom_component}" + local component_name="$1" + local component_version="$2" + local component_location="$3" + + # Some local variables we use to help us figure out what to do + local component_location_type="dir" # str: 'file' or 'dir' + local component_location_filename="" # filename... if it's a file + + CT_TestAndAbort \ + "${component_name}: Custom location setting is empty" \ + -z "${component_location}" + + CT_TestAndAbort \ + "${component_name}: Custom version setting is empty" \ + -z "${component_version}" + + if [ -f "${component_location}" ]; then + component_location_type="file" + component_location_filename="$(basename ${component_location})" + elif [ -d "${component_location}" ]; then + # Yes, it's the default, but it rules out the else case in the `if'. + component_location_type="dir" + # as -d and -f say: it's a and is readable! + else + CT_Abort "${component_name}: Unable to read ${component_location}, make sure the setting is correct and double check the permissions!" fi - CT_DoLog EXTRA "Using '${custom_name}' from custom location" - if [ ! -d "${custom_location}" ]; then + if [ "${component_location_type}" = "file" ]; then + CT_DoLog EXTRA "Got '${component_location}' from custom location" # We need to know the custom tarball extension, # so we can create a properly-named symlink, which # we use later on in 'extract' - case "${custom_location}" in - *.tar.xz) custom_name="${custom_name}.tar.xz";; - *.tar.bz2) custom_name="${custom_name}.tar.bz2";; - *.tar.gz|*.tgz) custom_name="${custom_name}.tar.gz";; - *.tar) custom_name="${custom_name}.tar";; - *) CT_Abort "Unknown extension for custom tarball '${custom_location}'";; + case "${component_location}" in + *.tar.xz|*.tar.bz2|*.tar.lzma|*.tar.gz|*.tgz|*.tar|*.zip) ;; + *) CT_Abort "Unknown extension for custom tarball '${component_location}'" ;; esac - CT_DoExecLog DEBUG ln -sf "${custom_location}" \ - "${CT_TARBALLS_DIR}/${custom_name}" - else - CT_DoExecLog DEBUG ln -snf "${custom_location}" \ - "${CT_SRC_DIR}/${custom_name}" + [ ! -L "${CT_TARBALLS_DIR}/${component_location_filename}" ] && \ + CT_DoExecLog DEBUG ln -sf "${component_location}" \ + "${CT_TARBALLS_DIR}/${component_location_filename}" + elif [ "${component_location_type}" = "dir" ]; then + CT_DoLog EXTRA "Got '${component_location}' from custom location" + [ ! -d "${CT_SRC_DIR}/${component_name}-${component_version}" ] && \ + CT_DoExecLog DEBUG cp -al "${component_location}" \ + "${CT_SRC_DIR}/${component_name}-${component_version}" + + # Don't try to extract from source directory, it's extracted! + touch "${CT_SRC_DIR}/.${component_name}-${component_version}.extracted" fi + # Don't patch a custom source, it's custom! + touch "${CT_SRC_DIR}/.${component_name}-${component_version}.patched" } # This function saves the specified to local storage if possible, -- cgit v1.2.3 From 4e2227e8a5537a8553c503e55d2cb2190f2a0d2f Mon Sep 17 00:00:00 2001 From: Bryan Hundven Date: Thu, 26 Nov 2015 05:06:21 -0800 Subject: scripts: Update usage of CT_GetCustom This commit updates the build scripts to match the new usage of CT_GetCustom from the previous change. Signed-off-by: Bryan Hundven --- scripts/build/binutils/binutils.sh | 23 ++++++++--------------- scripts/build/cc/100-gcc.sh | 9 ++------- scripts/build/debug/300-gdb.sh | 9 ++------- scripts/build/kernel/linux.sh | 7 ++----- scripts/build/libc/avr-libc.sh | 14 ++------------ scripts/build/libc/glibc.sh | 16 +++++----------- scripts/build/libc/musl.sh | 14 ++------------ scripts/build/libc/newlib.sh | 10 ++-------- scripts/build/libc/uClibc.sh | 16 ++++------------ 9 files changed, 29 insertions(+), 89 deletions(-) (limited to 'scripts') diff --git a/scripts/build/binutils/binutils.sh b/scripts/build/binutils/binutils.sh index afb797da..63181637 100644 --- a/scripts/build/binutils/binutils.sh +++ b/scripts/build/binutils/binutils.sh @@ -5,8 +5,8 @@ # Download binutils do_binutils_get() { if [ "${CT_BINUTILS_CUSTOM}" = "y" ]; then - CT_GetCustom "binutils" "${CT_BINUTILS_VERSION}" \ - "${CT_BINUTILS_CUSTOM_LOCATION}" + CT_GetCustom "binutils" "${CT_BINUTILS_CUSTOM_VERSION}" \ + "${CT_BINUTILS_CUSTOM_LOCATION}" else if echo ${CT_BINUTILS_VERSION} |${grep} -q linaro; then YYMM=`echo ${CT_BINUTILS_VERSION} |cut -d- -f3 |${sed} -e 's,^..,,'` @@ -22,8 +22,8 @@ do_binutils_get() { if [ -n "${CT_ARCH_BINFMT_FLAT}" ]; then if [ "${CT_ELF2FLT_CUSTOM}" = "y" ]; then - CT_GetCustom "elf2flt" "${CT_ELF2FLT_VERSION}" \ - "${CT_ELF2FLT_CUSTOM_LOCATION}" + CT_GetCustom "elf2flt" "${CT_ELF2FLT_CUSTOM_VERSION}" \ + "${CT_ELF2FLT_CUSTOM_LOCATION}" else CT_GetGit elf2flt "${CT_ELF2FLT_GIT_CSET}" git://wh0rd.org/elf2flt.git fi @@ -32,19 +32,12 @@ do_binutils_get() { # Extract binutils do_binutils_extract() { - # If using custom directory location, nothing to do - if ! [ "${CT_BINUTILS_CUSTOM}" = "y" \ - -a -d "${CT_SRC_DIR}/binutils-${CT_BINUTILS_VERSION}" ]; then - CT_Extract "binutils-${CT_BINUTILS_VERSION}" - CT_Patch "binutils" "${CT_BINUTILS_VERSION}" - fi + CT_Extract "binutils-${CT_BINUTILS_VERSION}" + CT_Patch "binutils" "${CT_BINUTILS_VERSION}" if [ -n "${CT_ARCH_BINFMT_FLAT}" ]; then - if ! [ "${CT_ELF2FLT_CUSTOM}" = "y" \ - -a -d "${CT_SRC_DIR}/elf2flt-${CT_ELF2FLT_VERSION}" ]; then - CT_Extract "elf2flt-${CT_ELF2FLT_GIT_CSET}" - CT_Patch "elf2flt" "${CT_ELF2FLT_GIT_CSET}" - fi + CT_Extract "elf2flt-${CT_ELF2FLT_GIT_CSET}" + CT_Patch "elf2flt" "${CT_ELF2FLT_GIT_CSET}" fi if [ -n "${CT_ARCH_XTENSA_CUSTOM_NAME}" ]; then diff --git a/scripts/build/cc/100-gcc.sh b/scripts/build/cc/100-gcc.sh index 359bb157..73781875 100644 --- a/scripts/build/cc/100-gcc.sh +++ b/scripts/build/cc/100-gcc.sh @@ -8,7 +8,8 @@ do_gcc_get() { local linaro_series="" if [ "${CT_CC_GCC_CUSTOM}" = "y" ]; then - CT_GetCustom "gcc" "${CT_CC_GCC_VERSION}" "${CT_CC_GCC_CUSTOM_LOCATION}" + CT_GetCustom "gcc" "${CT_CC_GCC_CUSTOM_VERSION}" \ + "${CT_CC_GCC_CUSTOM_LOCATION}" else # Account for the Linaro versioning linaro_version="$( echo "${CT_CC_GCC_VERSION}" \ @@ -48,12 +49,6 @@ do_gcc_get() { # Extract gcc do_gcc_extract() { - # If using custom directory location, nothing to do - if [ "${CT_CC_GCC_CUSTOM}" = "y" \ - -a -d "${CT_SRC_DIR}/gcc-${CT_CC_GCC_VERSION}" ]; then - return 0 - fi - CT_Extract "gcc-${CT_CC_GCC_VERSION}" CT_Patch "gcc" "${CT_CC_GCC_VERSION}" diff --git a/scripts/build/debug/300-gdb.sh b/scripts/build/debug/300-gdb.sh index beef5ff5..7d23666f 100644 --- a/scripts/build/debug/300-gdb.sh +++ b/scripts/build/debug/300-gdb.sh @@ -7,7 +7,8 @@ do_debug_gdb_get() { local linaro_series="" if [ "${CT_GDB_CUSTOM}" = "y" ]; then - CT_GetCustom "gdb" "${CT_GDB_VERSION}" "${CT_GDB_CUSTOM_LOCATION}" + CT_GetCustom "gdb" "${CT_GDB_CUSTOM_VERSION}" \ + "${CT_GDB_CUSTOM_LOCATION}" else # Account for the Linaro versioning linaro_version="$( echo "${CT_GDB_VERSION}" \ @@ -33,12 +34,6 @@ do_debug_gdb_get() { } do_debug_gdb_extract() { - # If using custom directory location, nothing to do - if [ "${CT_GDB_CUSTOM}" = "y" \ - -a -d "${CT_SRC_DIR}/gdb-${CT_GDB_VERSION}" ]; then - return 0 - fi - CT_Extract "gdb-${CT_GDB_VERSION}" CT_Patch "gdb" "${CT_GDB_VERSION}" diff --git a/scripts/build/kernel/linux.sh b/scripts/build/kernel/linux.sh index d7da1c48..f0f2402a 100644 --- a/scripts/build/kernel/linux.sh +++ b/scripts/build/kernel/linux.sh @@ -24,8 +24,8 @@ do_kernel_get() { local korg_base mirror_base if [ "${CT_KERNEL_LINUX_CUSTOM}" = "y" ]; then - CT_GetCustom "linux" "${CT_KERNEL_VERSION}" \ - "${CT_KERNEL_LINUX_CUSTOM_LOCATION}" + CT_GetCustom "linux" "${CT_KERNEL_LINUX_CUSTOM_VERSION}" \ + "${CT_KERNEL_LINUX_CUSTOM_LOCATION}" else # Not a custom tarball case "${CT_KERNEL_VERSION}" in 2.6.*.*|3.*.*|4.*.*) @@ -82,9 +82,6 @@ do_kernel_headers() { mkdir -p "${CT_BUILD_DIR}/build-kernel-headers" kernel_path="${CT_SRC_DIR}/linux-${CT_KERNEL_VERSION}" - if [ "${CT_KERNEL_LINUX_CUSTOM}" = "y" ]; then - kernel_path="${CT_SRC_DIR}/linux-custom" - fi V_OPT="V=${CT_KERNEL_LINUX_VERBOSE_LEVEL}" kernel_arch="${CT_ARCH}" diff --git a/scripts/build/libc/avr-libc.sh b/scripts/build/libc/avr-libc.sh index 103a7951..b73f990b 100644 --- a/scripts/build/libc/avr-libc.sh +++ b/scripts/build/libc/avr-libc.sh @@ -6,24 +6,14 @@ do_libc_get() { libc_src="http://download.savannah.gnu.org/releases/avr-libc" if [ "${CT_LIBC_AVR_LIBC_CUSTOM}" = "y" ]; then - CT_GetCustom "avr-libc" "${CT_LIBC_VERSION}" \ - "${CT_LIBC_AVR_LIBC_CUSTOM_LOCATION}" + CT_GetCustom "avr-libc" "${CT_LIBC_AVR_LIBC_CUSTOM_VERSION}" \ + "${CT_LIBC_AVR_LIBC_CUSTOM_LOCATION}" else # ! custom location CT_GetFile "avr-libc-${CT_LIBC_VERSION}" "${libc_src}" fi # ! custom location } do_libc_extract() { - # If using custom directory location, nothing to do. - if [ "${CT_LIBC_AVR_LIBC_CUSTOM}" = "y" ]; then - # Abort if the custom directory is not found. - if ! [ -d "${CT_SRC_DIR}/avr-libc-${CT_LIBC_VERSION}" ]; then - CT_Abort "Directory not found: ${CT_SRC_DIR}/avr-libc-${CT_LIBC_VERSION}" - fi - - return 0 - fi - CT_Extract "avr-libc-${CT_LIBC_VERSION}" CT_Patch "avr-libc" "${CT_LIBC_VERSION}" } diff --git a/scripts/build/libc/glibc.sh b/scripts/build/libc/glibc.sh index 126e9e0f..d45248a7 100644 --- a/scripts/build/libc/glibc.sh +++ b/scripts/build/libc/glibc.sh @@ -6,16 +6,10 @@ do_libc_extract() { local addon - # Attempt CT_EXTRACT only if NOT custom, or CUSTOM_LOCATION is not a directory - if [ "${CT_LIBC_CUSTOM}" != "y" \ - -o ! -d "${CT_LIBC_CUSTOM_LOCATION}" ]; then - CT_Extract "${CT_LIBC}-${CT_LIBC_VERSION}" - fi + CT_Extract "${CT_LIBC}-${CT_LIBC_VERSION}" CT_Pushd "${CT_SRC_DIR}/${CT_LIBC}-${CT_LIBC_VERSION}" # Attempt CT_PATCH only if NOT custom - if [ "${CT_LIBC_CUSTOM}" != "y" ]; then - CT_Patch nochdir "${CT_LIBC}" "${CT_LIBC_VERSION}" - fi + CT_Patch nochdir "${CT_LIBC}" "${CT_LIBC_VERSION}" # Extract the add-opns if => 2.17 if [ "${CT_LIBC_GLIBC_2_17_or_later}" != "y" ]; then @@ -554,9 +548,9 @@ do_libc_get() { addons_list=($(do_libc_add_ons_list " ")) # Main source - if [ "${CT_LIBC_CUSTOM}" = "y" ]; then - CT_GetCustom "glibc" "${CT_LIBC_VERSION}" "${CT_LIBC_GLIBC_CUSTOM_LOCATION}" - CT_LIBC_CUSTOM_LOCATION="${CT_SRC_DIR}/glibc-${CT_LIBC_VERSION}" + if [ "${CT_LIBC_GLIBC_CUSTOM}" = "y" ]; then + CT_GetCustom "glibc" "${CT_LIBC_GLIBC_CUSTOM_VERSION}" \ + "${CT_LIBC_GLIBC_CUSTOM_LOCATION}" else if echo ${CT_LIBC_VERSION} |${grep} -q linaro; then # Linaro glibc releases come from regular downloads... diff --git a/scripts/build/libc/musl.sh b/scripts/build/libc/musl.sh index f8f135c1..f7dbb97a 100644 --- a/scripts/build/libc/musl.sh +++ b/scripts/build/libc/musl.sh @@ -8,24 +8,14 @@ do_libc_get() { libc_src="http://www.musl-libc.org/releases" if [ "${CT_LIBC_MUSL_CUSTOM}" = "y" ]; then - CT_GetCustom "musl" "${CT_LIBC_VERSION}" \ - "${CT_LIBC_MUSL_CUSTOM_LOCATION}" + CT_GetCustom "musl" "${CT_LIBC_MUSL_CUSTOM_VERSION}" \ + "${CT_LIBC_MUSL_CUSTOM_LOCATION}" else # ! custom location CT_GetFile "musl-${CT_LIBC_VERSION}" "${libc_src}" fi # ! custom location } do_libc_extract() { - # If using custom directory location, nothing to do. - if [ "${CT_LIBC_MUSL_CUSTOM}" = "y" ]; then - # Abort if the custom directory is not found. - if ! [ -d "${CT_SRC_DIR}/musl-${CT_LIBC_VERSION}" ]; then - CT_Abort "Directory not found: ${CT_SRC_DIR}/musl-${CT_LIBC_VERSION}" - fi - - return 0 - fi - CT_Extract "musl-${CT_LIBC_VERSION}" CT_Patch "musl" "${CT_LIBC_VERSION}" } diff --git a/scripts/build/libc/newlib.sh b/scripts/build/libc/newlib.sh index a4fe82e2..ba52268e 100644 --- a/scripts/build/libc/newlib.sh +++ b/scripts/build/libc/newlib.sh @@ -14,8 +14,8 @@ do_libc_get() { ftp://sourceware.org/pub/newlib}" if [ "${CT_LIBC_NEWLIB_CUSTOM}" = "y" ]; then - CT_GetCustom "newlib" "${CT_LIBC_VERSION}" \ - "${CT_LIBC_NEWLIB_CUSTOM_LOCATION}" + CT_GetCustom "newlib" "${CT_LIBC_NEWLIB_CUSTOM_VERSION}" \ + "${CT_LIBC_NEWLIB_CUSTOM_LOCATION}" else # ! custom location if echo ${CT_LIBC_VERSION} |${grep} -q linaro; then YYMM=`echo ${CT_LIBC_VERSION} |cut -d- -f3 |${sed} -e 's,^..,,'` @@ -30,12 +30,6 @@ do_libc_get() { } do_libc_extract() { - # If using custom directory location, nothing to do - if [ "${CT_LIBC_NEWLIB_CUSTOM}" = "y" \ - -a -d "${CT_SRC_DIR}/newlib-${CT_LIBC_VERSION}" ]; then - return 0 - fi - CT_Extract "newlib-${CT_LIBC_VERSION}" CT_Patch "newlib" "${CT_LIBC_VERSION}" diff --git a/scripts/build/libc/uClibc.sh b/scripts/build/libc/uClibc.sh index f5b871c1..422412c9 100644 --- a/scripts/build/libc/uClibc.sh +++ b/scripts/build/libc/uClibc.sh @@ -19,8 +19,8 @@ fi # Download uClibc do_libc_get() { if [ "${CT_LIBC_UCLIBC_CUSTOM}" = "y" ]; then - CT_GetCustom "${uclibc_name}" "${CT_LIBC_VERSION}" \ - "${CT_LIBC_UCLIBC_CUSTOM_LOCATION}" + CT_GetCustom "${uclibc_name}" "${CT_LIBC_UCLIBC_CUSTOM_VERSION}" \ + "${CT_LIBC_UCLIBC_CUSTOM_LOCATION}" else CT_GetFile "${uclibc_name}-${CT_LIBC_VERSION}" ${libc_src} fi @@ -34,16 +34,8 @@ do_libc_get() { # Extract uClibc do_libc_extract() { - # If not using custom directory location, extract and patch - # Note: we do the inverse test we do in other components, - # because here we still need to extract the locales, even for - # custom location directory. Just use negate the whole test, - # to keep it the same as for other components. - if ! [ "${CT_LIBC_UCLIBC_CUSTOM}" = "y" \ - -a -d "${CT_SRC_DIR}/${uclibc_name}-${CT_LIBC_VERSION}" ]; then - CT_Extract "${uclibc_name}-${CT_LIBC_VERSION}" - CT_Patch "${uclibc_name}" "${CT_LIBC_VERSION}" - fi + CT_Extract "${uclibc_name}-${CT_LIBC_VERSION}" + CT_Patch "${uclibc_name}" "${CT_LIBC_VERSION}" # uClibc locales # Extracting pregen locales ourselves is kinda -- cgit v1.2.3 From 9f89e082c5bcb3c49013eeeae0a1ccbac1d91ba9 Mon Sep 17 00:00:00 2001 From: Bryan Hundven Date: Tue, 8 Dec 2015 09:09:49 -0800 Subject: 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 --- .travis.sh | 66 +++++++++++++++---------------- config/arch/microblaze.in | 2 +- config/arch/xtensa.in.2 | 44 +++++++++++---------- config/libc/newlib.in.2 | 6 +-- scripts/addToolVersion.sh | 64 +++++++++++++++--------------- scripts/build/cc.sh | 6 +-- scripts/build/cc/100-gcc.sh | 20 +++++----- scripts/build/companion_libs/130-cloog.sh | 20 +++++----- scripts/build/debug/300-gdb.sh | 24 +++++------ scripts/patch-rework.sh | 62 ++++++++++++++--------------- scripts/showSamples.sh | 8 ++-- 11 files changed, 162 insertions(+), 160 deletions(-) (limited to 'scripts') diff --git a/.travis.sh b/.travis.sh index 90a439b3..7cb6b146 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 c664498a..d2360077 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 343cd2ce..25ece701 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_.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_.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 ef5d0769..b16b23a8 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 bd419f89..0144e4f8 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 3c8aaefc..0db6b9ce 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 73781875..0640452f 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 1b371674..23765701 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 7d23666f..418e85c6 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 28093485..d05d2c18 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##*/} [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##*/} [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 b6d81c15..aed3dd1a 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}" -- cgit v1.2.3