glibc/check-build.sh
Stephan Kulow 488b9a367b Accepting request 102220 from Base:System
Fix checks for AVX (patch glibc-2.16-avx.patch) (forwarded request 102219 from a_jaeger)

OBS-URL: https://build.opensuse.org/request/show/102220
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/glibc?expand=0&rev=103
2012-02-03 09:22:38 +00:00

33 lines
798 B
Bash

#!/bin/bash
# Copyright (c) 2003, 2004, 2011,2012 SUSE Linux Products GmbH, Germany. All rights reserved.
#
# Authors: Thorsten Kukuk <kukuk@suse.de>
#
if [ `nice` -gt '9' ] ; then
echo "Don't modify nice for building glibc!"
exit 1
fi
# get kernel version
OFS="$IFS" ; IFS=".-" ; version=(`uname -r`) ; IFS="$OIFS"
ARCH=(`uname -m`)
if test ${version[0]} -gt 2 ; then
: # okay
elif test ${version[0]} -lt 2 -o ${version[1]} -lt 6 -o ${version[2]} -lt 16 ; then
echo "FATAL: kernel too old, need kernel >= 2.6.16 for this package" 1>&2
exit 1
elif $ARCH -eq 'x86_64' ; then
if test ${version[0]} -lt 2 -o ${version[1]} -lt 6 -o ${version[2]} -lt 32 ; then
echo "FATAL: kernel too old, need kernel >= 2.6.32 for this package" 1>&2
exit 1
fi
fi
exit 0