# HG changeset patch # User "Yann E. MORIN" # Date 1189798256 0 # Node ID 6a0ee764a60a99816a48af51bf9d87778b0e0a54 # Parent 2f7b676c7b2f238dfbcedd028b79d22addbf30e9 Improve (POSIX-wise) determination of bashh version. diff -r 2f7b676c7b2f -r 6a0ee764a60a configure --- a/configure Fri Sep 14 17:43:16 2007 +0000 +++ b/configure Fri Sep 14 19:30:56 2007 +0000 @@ -123,8 +123,8 @@ # Check bash is present, and at least version 3.0 [ -x /bin/bash ] || do_error "bash 3.0 or above was not found in /bin/bash" -bash_version=$(/bin/bash --version |head -n 1 |cut -d ' ' -f 4) -bash_major=$(echo "${bash_version}" |sed -e 's/\..*//g;') +bash_version=$(/bin/bash --version |sed -r -e '2,$d' -e 's/.* version ([[:digit:]]+).*/\1/;') +bash_major=${bash_version%%.*} [ ${bash_major} -ge 3 ] || do_error "bash 3.0 or above is needed (found ${bash_version})" sed -r -e "s,@@BINDIR@@,${BINDIR},g;" \ diff -r 2f7b676c7b2f -r 6a0ee764a60a docs/overview.txt --- a/docs/overview.txt Fri Sep 14 17:43:16 2007 +0000 +++ b/docs/overview.txt Fri Sep 14 19:30:56 2007 +0000 @@ -467,6 +467,42 @@ use the same crosstool-NG installation, and most notably, the same set of patches. +Architecture-specific | +----------------------* + +An architecture is defined by: + + - a human-readable name, in lower case letters, with numbers as appropriate. + The underscore is allowed. Eg.: arm, x86_64 + - a boolean kconfig option named after the architecture (in capital letters + if possible) prefixed with "ARCH_". Eg.: ARCH_ARM, ARCH_x86_64 + - a directory in "arch/" named after the architecture, with the same letters + as above. Eg.: arch/arm, arch/x86_64 + This directory contains: + - a configuration file in kconfig syntax, named "config.in", which may be + empty. Eg.: arch/arm/config.in + - a function script in bash-3.0 syntax, named "functions", which shall + follow the API defined below. Eg.: arch/arm/functions + +The "functions" file API: + > the function "CT_DoBuildTargetTuple" + + parameters: none + + environment: + - all variables from the ".config" file, + - the two variables "target_endian_eb" and "target_endian_el" which are + the endiannes suffixes + + return value: 0 upon success, !0 upon failure + + provides: + - the target tuple stored in the variable CT_TARGET_ARCH + + > the environment variable CT_ARCH_ENDIAN_OPT + + contains: + - the value of the CFLAGS values for selecting the endiannes (eg.: -ml + for a Super-H little endian, -mbig-endian for an ARM big endian). + - empty if the architecture can not set the endianness (eg x86 and + x86_64). + + Build scripts | --------------*