< prev index next >

make/autoconf/build-aux/config.guess

Print this page

  1 #!/bin/sh
  2 #
  3 # Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved.
  4 # Copyright (c) 2021, Azul Systems, Inc. All rights reserved.
  5 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  6 #
  7 # This code is free software; you can redistribute it and/or modify it
  8 # under the terms of the GNU General Public License version 2 only, as
  9 # published by the Free Software Foundation.
 10 #
 11 # This code is distributed in the hope that it will be useful, but WITHOUT
 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 14 # version 2 for more details (a copy is included in the LICENSE file that
 15 # accompanied this code).
 16 #
 17 # You should have received a copy of the GNU General Public License version
 18 # 2 along with this work; if not, write to the Free Software Foundation,
 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 20 #
 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 22 # or visit www.oracle.com if you need additional information or have any
 23 # questions.

 94 # Test and fix little endian MIPS.
 95 if [ "x$OUT" = x ]; then
 96   if [ `uname -s` = Linux ]; then
 97     if [ `uname -m` = mipsel ]; then
 98       OUT=mipsel-unknown-linux-gnu
 99     elif [ `uname -m` = mips64el ]; then
100       OUT=mips64el-unknown-linux-gnu
101     fi
102   fi
103 fi
104 
105 # Test and fix LoongArch64.
106 if [ "x$OUT" = x ]; then
107   if [ `uname -s` = Linux ]; then
108     if [ `uname -m` = loongarch64 ]; then
109       OUT=loongarch64-unknown-linux-gnu
110     fi
111   fi
112 fi
113 









114 # Test and fix cpu on macos-aarch64, uname -p reports arm, buildsys expects aarch64
115 echo $OUT | grep arm-apple-darwin > /dev/null 2> /dev/null
116 if test $? != 0; then
117   # The GNU version of uname may be on the PATH which reports arm64 instead
118   echo $OUT | grep arm64-apple-darwin > /dev/null 2> /dev/null
119 fi
120 if test $? = 0; then
121   if [ `uname -m` = arm64 ]; then
122     OUT=aarch64`echo $OUT | sed -e 's/[^-]*//'`
123   fi
124 fi
125 
126 # Test and fix cpu on Macosx when C preprocessor is not on the path
127 echo $OUT | grep i386-apple-darwin > /dev/null 2> /dev/null
128 if test $? = 0; then
129   REAL_CPU=`uname -m`
130   OUT=$REAL_CPU`echo $OUT | sed -e 's/[^-]*//'`
131 fi
132 
133 echo $OUT

  1 #!/bin/sh
  2 #
  3 # Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved.
  4 # Copyright (c) 2021, Azul Systems, Inc. All rights reserved.
  5 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  6 #
  7 # This code is free software; you can redistribute it and/or modify it
  8 # under the terms of the GNU General Public License version 2 only, as
  9 # published by the Free Software Foundation.
 10 #
 11 # This code is distributed in the hope that it will be useful, but WITHOUT
 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 14 # version 2 for more details (a copy is included in the LICENSE file that
 15 # accompanied this code).
 16 #
 17 # You should have received a copy of the GNU General Public License version
 18 # 2 along with this work; if not, write to the Free Software Foundation,
 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 20 #
 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 22 # or visit www.oracle.com if you need additional information or have any
 23 # questions.

 94 # Test and fix little endian MIPS.
 95 if [ "x$OUT" = x ]; then
 96   if [ `uname -s` = Linux ]; then
 97     if [ `uname -m` = mipsel ]; then
 98       OUT=mipsel-unknown-linux-gnu
 99     elif [ `uname -m` = mips64el ]; then
100       OUT=mips64el-unknown-linux-gnu
101     fi
102   fi
103 fi
104 
105 # Test and fix LoongArch64.
106 if [ "x$OUT" = x ]; then
107   if [ `uname -s` = Linux ]; then
108     if [ `uname -m` = loongarch64 ]; then
109       OUT=loongarch64-unknown-linux-gnu
110     fi
111   fi
112 fi
113 
114 # Test and fix RISC-V.
115 if [ "x$OUT" = x ]; then
116   if [ `uname -s` = Linux ]; then
117     if [ `uname -m` = riscv64 ]; then
118       OUT=riscv64-unknown-linux-gnu
119     fi
120   fi
121 fi
122 
123 # Test and fix cpu on macos-aarch64, uname -p reports arm, buildsys expects aarch64
124 echo $OUT | grep arm-apple-darwin > /dev/null 2> /dev/null
125 if test $? != 0; then
126   # The GNU version of uname may be on the PATH which reports arm64 instead
127   echo $OUT | grep arm64-apple-darwin > /dev/null 2> /dev/null
128 fi
129 if test $? = 0; then
130   if [ `uname -m` = arm64 ]; then
131     OUT=aarch64`echo $OUT | sed -e 's/[^-]*//'`
132   fi
133 fi
134 
135 # Test and fix cpu on Macosx when C preprocessor is not on the path
136 echo $OUT | grep i386-apple-darwin > /dev/null 2> /dev/null
137 if test $? = 0; then
138   REAL_CPU=`uname -m`
139   OUT=$REAL_CPU`echo $OUT | sed -e 's/[^-]*//'`
140 fi
141 
142 echo $OUT
< prev index next >