From 26647ee5644316a0f2d4b2f51ab9bdd102dbb5b0 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Fri, 14 Sep 2007 19:30:56 +0000 Subject: Improve (POSIX-wise) determination of bashh version. diff --git a/configure b/configure index d591dc7..125908e 100755 --- a/configure +++ b/configure @@ -123,8 +123,8 @@ fi # 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 --git a/docs/overview.txt b/docs/overview.txt index 52e73f3..34cb756 100644 --- a/docs/overview.txt +++ b/docs/overview.txt @@ -467,6 +467,42 @@ exported (via NFS or whatever) and have clients with different architectures 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 | --------------* -- cgit v0.10.2-6-g49f6