common/autoconf/build-aux/config.guess

Print this page
rev 997 : 8036767: PPC64: Support for little endian execution model
Contributed-by: asmundak@google.com


  59       ;;
  60   esac
  61 fi
  62 
  63 # Test and fix architecture string on AIX
  64 # On AIX 'config.guess' returns 'powerpc' as architecture but 'powerpc' is
  65 # implicitely handled as 32-bit architecture in 'platform.m4' so we check
  66 # for the kernel mode rewrite it to 'powerpc64' if we'Re running in 64-bit mode.
  67 # The check could also be done with `/usr/sbin/prtconf | grep "Kernel Type" | grep "64-bit"`
  68 echo $OUT | grep powerpc-ibm-aix > /dev/null 2> /dev/null
  69 if test $? = 0; then
  70   if [ -x /bin/getconf ] ; then
  71     KERNEL_BITMODE=`getconf KERNEL_BITMODE`
  72     if  [ "$KERNEL_BITMODE" = "32" ]; then
  73       KERNEL_BITMODE=""
  74     fi
  75   fi
  76   OUT=powerpc$KERNEL_BITMODE`echo $OUT | sed -e 's/[^-]*//'`
  77 fi
  78 










  79 echo $OUT


  59       ;;
  60   esac
  61 fi
  62 
  63 # Test and fix architecture string on AIX
  64 # On AIX 'config.guess' returns 'powerpc' as architecture but 'powerpc' is
  65 # implicitely handled as 32-bit architecture in 'platform.m4' so we check
  66 # for the kernel mode rewrite it to 'powerpc64' if we'Re running in 64-bit mode.
  67 # The check could also be done with `/usr/sbin/prtconf | grep "Kernel Type" | grep "64-bit"`
  68 echo $OUT | grep powerpc-ibm-aix > /dev/null 2> /dev/null
  69 if test $? = 0; then
  70   if [ -x /bin/getconf ] ; then
  71     KERNEL_BITMODE=`getconf KERNEL_BITMODE`
  72     if  [ "$KERNEL_BITMODE" = "32" ]; then
  73       KERNEL_BITMODE=""
  74     fi
  75   fi
  76   OUT=powerpc$KERNEL_BITMODE`echo $OUT | sed -e 's/[^-]*//'`
  77 fi
  78 
  79 # Test and fix little endian PowerPC64.
  80 # TODO: should be handled by autoconf-config.guess. 
  81 if [ "x$OUT" = x ]; then
  82   if [ `uname -m` = ppc64le ]; then
  83     if [ `uname -s` = Linux ]; then
  84       OUT=powerpc64le-unknown-linux-gnu
  85     fi
  86   fi
  87 fi
  88 
  89 echo $OUT