Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- typevar=my_compiler_type
- versionvar=my_compiler_version
- ac_compiler_type=""
- ac_compiler_version=""
- for i in $my_compiler; do
- case $i in
- gcc-[0-9]*|*-gcc-[0-9]*)
- if test -z "$ac_compiler_type"; then
- ac_compiler_type=gcc
- fi
- if test -z "$ac_compiler_version"; then
- ac_compiler_version=`echo $i | sed -e 's/^.*gcc-\([0-9.]\+\).*$/\1/'`
- fi
- ;;
- *gcc*|*GCC*)
- if test -z "$ac_compiler_type"; then
- ac_compiler_type=gcc
- fi
- ;;
- egcs-*)
- ac_compiler_type=egcs
- if test -z "$ac_compiler_version"; then
- ac_compiler_version=`echo $i | sed -e 's/egcs-\(.\+\)$/\1/'`
- fi
- ;;
- *cc*)
- if test -z "$ac_compiler_type"; then
- ac_compiler_type=cc
- fi
- ;;
- [0-9].[0-9]*)
- if test -z "$ac_compiler_version"; then
- ac_compiler_version="$i"
- fi
- ;;
- esac
- done
- eval $typevar="$ac_compiler_type"
- eval $versionvar="$ac_compiler_version"
- if test -z "$my_compiler_type"; then
- my_compiler_type="gcc"
- fi
- { echo "$as_me:$LINENO: result: Kernel compiler: $kernel_compiler Used compiler: $my_compiler" >&5
- echo "${ECHO_T}Kernel compiler: $kernel_compiler Used compiler: $my_compiler" >&6; };
- if test -z "$kernel_compiler"; then
- echo
- echo "*** NO PREDEFINED KERNEL COMPILER IS DETECTED"
- echo "*** Assuming the same compiler is used with the current system compiler."
- echo
- echo "*** Please make sure that the same compiler version was used for building kernel."
- echo
- else
- if test "$my_compiler_type" != "$kernel_compiler_type"; then
- echo "Fatal error: Compiler type does not match"
- echo "Decoded kernel compiler: type=$kernel_compiler_type version=$kernel_compiler_version"
- echo "Decoded used compiler: type=$my_compiler_type version=$my_compiler_version"
- echo "Please, send ./configure output to <[email protected]>"
- exit 1
- fi
- if test "$my_compiler_type" = "gcc" ; then
- kernel_major=`echo $kernel_compiler_version | cut -d '.' -f 1`
- my_major=`echo $my_compiler_version | cut -d '.' -f 1`
- if test $kernel_major -eq 2 -a $my_major -eq 3 ; then
- echo "Fatal error: Kernel is compiled with GCC 2.x and you are trying to use GCC 3.x."
- echo " These two version of GCC are incompatible for binary code."
- exit 1
- fi
- if test $kernel_major -eq 3 -a $my_major -eq 2 ; then
- echo "Fatal error: Kernel is compiled with GCC 3.x and you are trying to use GCC 2.x."
- echo " These two version of GCC are incompatible for binary code."
- exit 1
- fi
- fi
- fi
Advertisement
Add Comment
Please, Sign In to add comment