diff options
Diffstat (limited to 'meta/files/toolchain-shar-template.sh')
-rw-r--r-- | meta/files/toolchain-shar-template.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/meta/files/toolchain-shar-template.sh b/meta/files/toolchain-shar-template.sh index 4a7fbd50c6..151b973d35 100644 --- a/meta/files/toolchain-shar-template.sh +++ b/meta/files/toolchain-shar-template.sh | |||
@@ -3,6 +3,20 @@ | |||
3 | INST_ARCH=$(uname -m | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/") | 3 | INST_ARCH=$(uname -m | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/") |
4 | SDK_ARCH=$(echo @SDK_ARCH@ | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/") | 4 | SDK_ARCH=$(echo @SDK_ARCH@ | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/") |
5 | 5 | ||
6 | verlte () { | ||
7 | [ "$1" = "`printf "$1\n$2" | sort -V | head -n1`" ] | ||
8 | } | ||
9 | |||
10 | verlt() { | ||
11 | [ "$1" = "$2" ] && return 1 || verlte $1 $2 | ||
12 | } | ||
13 | |||
14 | verlt `uname -r` @OLDEST_KERNEL@ | ||
15 | if [ $? = 0 ]; then | ||
16 | echo "Error: The SDK needs a kernel > @OLDEST_KERNEL@" | ||
17 | exit 1 | ||
18 | fi | ||
19 | |||
6 | if [ "$INST_ARCH" != "$SDK_ARCH" ]; then | 20 | if [ "$INST_ARCH" != "$SDK_ARCH" ]; then |
7 | # Allow for installation of ix86 SDK on x86_64 host | 21 | # Allow for installation of ix86 SDK on x86_64 host |
8 | if [ "$INST_ARCH" != x86_64 -o "$SDK_ARCH" != ix86 ]; then | 22 | if [ "$INST_ARCH" != x86_64 -o "$SDK_ARCH" != ix86 ]; then |