├── .gitignore ├── LICENSE ├── README.md ├── build-swift.sh ├── build.sh ├── config.guess ├── config.sub ├── harfbuzz-1.4.6.tar.bz2 ├── icu-le-hb-1.0.3.tar.gz ├── icu4c-59_1-src.tgz ├── libiconv-1.15.tar.gz ├── patches └── icu_suffix_only_on_libname.patch ├── setCrossEnvironment-arm64-v8a.sh ├── setCrossEnvironment-armeabi-v7a.sh ├── setCrossEnvironment-armeabi.sh ├── setCrossEnvironment-x86.sh └── setCrossEnvironment-x86_64.sh /.gitignore: -------------------------------------------------------------------------------- 1 | armeabi 2 | armeabi-v7a 3 | mips 4 | x86 5 | arm64-v8a 6 | x86_64 7 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | libiconv-libicu-android 2 | ======================= 3 | 4 | Port of libiconv and libicu to Android 5 | 6 | You will need NDK r16, curl, autoconf, automake, libtool, and git installed. 7 | 8 | There are no sources and no patches - everything is done with magical build scripts, 9 | just run build-swift.sh and enjoy. 10 | Don't forget to strip them, because they are huge with debug info included. 11 | 12 | There is no mips architecture, because there are very few devices using this architecture in the wild. 13 | 14 | If you need libintl, you may download it here: 15 | https://github.com/pelya/commandergenius/tree/sdl_android/project/jni/intl 16 | -------------------------------------------------------------------------------- /build-swift.sh: -------------------------------------------------------------------------------- 1 | SKIP_HARFBUZZ=1 SHARED_ICU=1 SKIP_ICONV=1 ARCHS='armeabi-v7a' LIBSUFFIX=swift ./build.sh 2 | -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -x 4 | 5 | export BUILDDIR=`pwd` 6 | 7 | if uname -s | grep -i 'linux' &> /dev/null; then 8 | IS_LINUX=1 9 | fi 10 | 11 | if [ $IS_LINUX ]; then 12 | NCPU=`cat /proc/cpuinfo | grep -c -i processor` 13 | else 14 | NCPU=8 15 | fi 16 | 17 | NDK=`which ndk-build` 18 | NDK=`dirname $NDK` 19 | if [ $IS_LINUX ]; then 20 | NDK=`readlink -f $NDK` 21 | fi 22 | 23 | export CLANG=1 24 | 25 | if [ ! $ARCHS ]; then 26 | ARCHS='armeabi armeabi-v7a arm64-v8a x86 x86_64' 27 | fi 28 | 29 | for ARCH in $ARCHS; do 30 | 31 | cd $BUILDDIR 32 | 33 | GCCPREFIX="`./setCrossEnvironment-$ARCH.sh sh -c 'basename $STRIP | sed s/-strip//'`" 34 | echo "ARCH $ARCH GCCPREFIX $GCCPREFIX" 35 | 36 | mkdir -p $ARCH 37 | cd $BUILDDIR/$ARCH 38 | 39 | # =========== libandroid_support.a =========== 40 | 41 | [ -e libandroid_support.a ] || { 42 | mkdir -p android_support 43 | cd android_support 44 | ln -sf $NDK/sources/android/support jni 45 | 46 | #ndk-build -j$NCPU APP_ABI=$ARCH APP_MODULES=android_support LIBCXX_FORCE_REBUILD=true CLANG=1 || exit 1 47 | #cp -f obj/local/$ARCH/libandroid_support.a ../ 48 | ln -sf $NDK/sources/cxx-stl/llvm-libc++/libs/$ARCH/libandroid_support.a ../ 49 | 50 | } || exit 1 51 | 52 | cd $BUILDDIR/$ARCH 53 | 54 | # =========== libiconv.so =========== 55 | 56 | [ -e libiconv.so ] || [ $SKIP_ICONV ] || { 57 | 58 | rm -rf libiconv-1.15 59 | 60 | tar xvf ../libiconv-1.15.tar.gz 61 | 62 | cd libiconv-1.15 63 | 64 | cp -f $BUILDDIR/config.sub build-aux/ 65 | cp -f $BUILDDIR/config.guess build-aux/ 66 | cp -f $BUILDDIR/config.sub libcharset/build-aux/ 67 | cp -f $BUILDDIR/config.guess libcharset/build-aux/ 68 | 69 | sed -i,tmp 's/MB_CUR_MAX/1/g' lib/loop_wchar.h 70 | 71 | env CFLAGS="-I$NDK/sources/android/support/include -D_IO_getc=getc" \ 72 | LDFLAGS="-L$BUILDDIR/$ARCH -landroid_support" \ 73 | $BUILDDIR/setCrossEnvironment-$ARCH.sh \ 74 | ./configure \ 75 | --host=$GCCPREFIX \ 76 | --prefix=`pwd`/.. \ 77 | --enable-static --enable-shared \ 78 | || exit 1 79 | 80 | env PATH=`pwd`:$PATH \ 81 | $BUILDDIR/setCrossEnvironment-$ARCH.sh \ 82 | make V=1 || echo "Libtool is a miserable pile of shit, linking libcharset.so manually" 83 | 84 | env PATH=`pwd`:$PATH \ 85 | $BUILDDIR/setCrossEnvironment-$ARCH.sh \ 86 | sh -c '$LD $CFLAGS $LDFLAGS -shared libcharset/lib/.libs/*.o -o libcharset/lib/.libs/libcharset.so' || exit 1 87 | 88 | env PATH=`pwd`:$PATH \ 89 | $BUILDDIR/setCrossEnvironment-$ARCH.sh \ 90 | make V=1 || echo "Libtool works worse than cat /dev/urandom | head 10000 > library.so, because this will at least generate a target file, linking libiconv.so manually" 91 | 92 | env PATH=`pwd`:$PATH \ 93 | $BUILDDIR/setCrossEnvironment-$ARCH.sh \ 94 | sh -c '$LD $CFLAGS $LDFLAGS -shared lib/.libs/*.o -o lib/.libs/libiconv.so' || exit 1 95 | 96 | env PATH=`pwd`:$PATH \ 97 | $BUILDDIR/setCrossEnvironment-$ARCH.sh \ 98 | make V=1 || echo "Did you know that libtool contributes to global warming by overheating your CPU?" 99 | 100 | cp -f lib/.libs/libiconv.so preload/preloadable_libiconv.so 101 | 102 | env PATH=`pwd`:$PATH \ 103 | $BUILDDIR/setCrossEnvironment-$ARCH.sh \ 104 | make V=1 || exit 1 105 | 106 | env PATH=`pwd`:$PATH \ 107 | $BUILDDIR/setCrossEnvironment-$ARCH.sh \ 108 | make V=1 install || exit 1 109 | 110 | cd .. 111 | 112 | for f in libiconv libcharset; do 113 | cp -f lib/$f.so ./ 114 | $BUILDDIR/setCrossEnvironment-$ARCH.sh \ 115 | sh -c '$STRIP'" $f.so" 116 | done 117 | 118 | } || exit 1 119 | 120 | # =========== libharfbuzz =========== 121 | 122 | cd $BUILDDIR/$ARCH 123 | 124 | [ -e libharfbuzz.a ] || [ $SKIP_HARFBUZZ ] || { 125 | rm -rf harfbuzz-1.4.6 126 | tar xvf ../harfbuzz-1.4.6.tar.bz2 127 | cd harfbuzz-1.4.6 128 | 129 | cp -f $BUILDDIR/config.sub . 130 | cp -f $BUILDDIR/config.guess . 131 | 132 | sed -i,tmp 's/ld_shlibs=no/ld_shlibs=yes/g' ./configure 133 | 134 | env CFLAGS="-I$NDK/sources/android/support/include -frtti -fexceptions -I$BUILDDIR/$ARCH/include" \ 135 | LDFLAGS="-frtti -fexceptions -L$BUILDDIR/$ARCH/lib" \ 136 | LIBS="-L$BUILDDIR/$ARCH -landroid_support" \ 137 | $BUILDDIR/setCrossEnvironment-$ARCH.sh \ 138 | ./configure \ 139 | --host=$GCCPREFIX \ 140 | --prefix=`pwd`/../ \ 141 | --enable-static --enable-shared \ 142 | --with-glib=no --with-gobject=no \ 143 | --with-cairo=no --with-fontconfig=no \ 144 | --with-icu=no --with-freetype=no \ 145 | || exit 1 146 | 147 | env PATH=`pwd`:$PATH \ 148 | $BUILDDIR/setCrossEnvironment-$ARCH.sh \ 149 | make -j$NCPU V=1 || echo "Crappy libtool cannot link anything" 150 | 151 | env PATH=`pwd`:$PATH \ 152 | $BUILDDIR/setCrossEnvironment-$ARCH.sh \ 153 | sh -c '$LD $CFLAGS $LDFLAGS -shared src/.libs/*.o src/hb-ucdn/.libs/*.o -o src/.libs/libharfbuzz.so' || exit 1 154 | 155 | env PATH=`pwd`:$PATH \ 156 | $BUILDDIR/setCrossEnvironment-$ARCH.sh \ 157 | make -j$NCPU V=1 || exit 1 158 | 159 | env PATH=`pwd`:$PATH \ 160 | $BUILDDIR/setCrossEnvironment-$ARCH.sh \ 161 | make V=1 install || exit 1 162 | 163 | env PATH=`pwd`:$PATH \ 164 | $BUILDDIR/setCrossEnvironment-$ARCH.sh \ 165 | sh -c '$AR rcs ../lib/libharfbuzz.a src/.libs/*.o src/hb-ucdn/.libs/*.o' || exit 1 166 | 167 | cd .. 168 | cp -f lib/libharfbuzz.a ./ 169 | } 170 | 171 | # =========== libicuuc =========== 172 | 173 | cd $BUILDDIR/$ARCH 174 | 175 | [ -e libicuuc$LIBSUFFIX.a ] || [ -e libicuuc$LIBSUFFIX.so ] || [ $SKIP_ICUUC ] || { 176 | 177 | rm -rf icu 178 | 179 | tar xvf ../icu4c-59_1-src.tgz 180 | 181 | # The ENVVAR LIBSUFFIX should add the suffix only to the libname and not to the symbols. 182 | # ToDo: Find the right way in Swift to refer to an alternative library with symbol prefixing or any other method to 183 | # remove this. 184 | if [ $LIBSUFFIX ]; then 185 | patch -p0 < ../patches/icu_suffix_only_on_libname.patch 186 | fi 187 | 188 | cd icu/source 189 | 190 | cp -f $BUILDDIR/config.sub . 191 | cp -f $BUILDDIR/config.guess . 192 | 193 | [ -d cross ] || { 194 | mkdir cross 195 | cd cross 196 | ../configure || exit 1 197 | make -j$NCPU VERBOSE=1 || exit 1 198 | cd .. 199 | } || exit 1 200 | 201 | sed -i,tmp "s@LD_SONAME *=.*@LD_SONAME =@g" config/mh-linux 202 | sed -i,tmp "s%ln -s *%cp -f \$(dir \$@)/%g" config/mh-linux 203 | 204 | if [ $SHARED_ICU ]; then 205 | libtype='--enable-shared --disable-static' 206 | else 207 | libtype='--enable-static --disable-shared' 208 | fi 209 | 210 | env CFLAGS="-I$NDK/sources/android/support/include -frtti -fexceptions" \ 211 | LDFLAGS="-frtti -fexceptions -L$BUILDDIR/$ARCH/lib" \ 212 | LIBS="-L$BUILDDIR/$ARCH -landroid_support `$BUILDDIR/setCrossEnvironment-$ARCH.sh sh -c 'echo $LDFLAGS'`" \ 213 | env ac_cv_func_strtod_l=no \ 214 | $BUILDDIR/setCrossEnvironment-$ARCH.sh \ 215 | ./configure \ 216 | --host=$GCCPREFIX \ 217 | --prefix=`pwd`/../../ \ 218 | --with-library-suffix=$LIBSUFFIX \ 219 | --with-cross-build=`pwd`/cross \ 220 | $libtype \ 221 | --with-data-packaging=archive \ 222 | || exit 1 223 | 224 | # ICULEHB_CFLAGS="-I$BUILDDIR/$ARCH/include" \ 225 | # ICULEHB_LIBS="-licu-le-hb" \ 226 | # --enable-layoutex \ 227 | 228 | sed -i,tmp "s@^prefix *= *.*@prefix = .@" icudefs.mk || exit 1 229 | 230 | env PATH=`pwd`:$PATH \ 231 | $BUILDDIR/setCrossEnvironment-$ARCH.sh \ 232 | make -j$NCPU VERBOSE=1 || exit 1 233 | 234 | sed -i,tmp "s@^prefix *= *.*@prefix = `pwd`/../../@" icudefs.mk || exit 1 235 | 236 | env PATH=`pwd`:$PATH \ 237 | $BUILDDIR/setCrossEnvironment-$ARCH.sh \ 238 | make V=1 install || exit 1 239 | 240 | for f in libicudata$LIBSUFFIX libicutest$LIBSUFFIX libicui18n$LIBSUFFIX libicuio$LIBSUFFIX libicutu$LIBSUFFIX libicuuc$LIBSUFFIX; do 241 | if [ $SHARED_ICU ]; then 242 | cp -f -H ../../lib/$f.so ../../ 243 | else 244 | cp -f ../../lib/$f.a ../../ 245 | fi 246 | #$BUILDDIR/setCrossEnvironment-$ARCH.sh \ 247 | # sh -c '$STRIP'" ../../$f.so" 248 | done 249 | 250 | } || exit 1 251 | 252 | # =========== libicu-le-hb =========== 253 | 254 | cd $BUILDDIR/$ARCH 255 | 256 | [ -e libicu-le-hb.a ] || [ $SKIP_ICUUC ] || [ $SKIP_HARFBUZZ ] || [ $SKIP_ICULEHB ] || { 257 | rm -rf icu-le-hb-1.0.3 258 | tar xvf ../icu-le-hb-1.0.3.tar.gz 259 | cd icu-le-hb-1.0.3 260 | 261 | cp -f $BUILDDIR/config.sub . 262 | cp -f $BUILDDIR/config.guess . 263 | 264 | sed -i,tmp 's/ld_shlibs=no/ld_shlibs=yes/g' ./configure 265 | 266 | env CFLAGS="-I$NDK/sources/android/support/include -frtti -fexceptions" \ 267 | CXXFLAGS="-std=c++11" \ 268 | LDFLAGS="-frtti -fexceptions" \ 269 | LIBS="-L$BUILDDIR/$ARCH -landroid_support" \ 270 | HARFBUZZ_CFLAGS="-I$BUILDDIR/$ARCH/include/harfbuzz" \ 271 | HARFBUZZ_LIBS="-L$BUILDDIR/$ARCH/lib -lharfbuzz" \ 272 | ICU_CFLAGS="-I$BUILDDIR/$ARCH/include" \ 273 | ICU_LIBS="-L$BUILDDIR/$ARCH/lib" \ 274 | $BUILDDIR/setCrossEnvironment-$ARCH.sh \ 275 | ./configure \ 276 | --host=$GCCPREFIX \ 277 | --prefix=`pwd`/../ \ 278 | --enable-static --enable-shared \ 279 | || exit 1 280 | 281 | cmd='$LD $CFLAGS -shared src/.libs/*.o -o src/.libs/libicu-le-hb.so.0.0.0 -L../lib -lharfbuzz $LDFLAGS' 282 | cmd="$cmd -licuuc$LIBSUFFIX" 283 | 284 | env PATH=`pwd`:$PATH \ 285 | $BUILDDIR/setCrossEnvironment-$ARCH.sh \ 286 | make V=1 || \ 287 | env PATH=`pwd`:$PATH \ 288 | $BUILDDIR/setCrossEnvironment-$ARCH.sh \ 289 | sh -c "$cmd" || exit 1 290 | 291 | env PATH=`pwd`:$PATH \ 292 | $BUILDDIR/setCrossEnvironment-$ARCH.sh \ 293 | sh -c '$AR rcs ../lib/libicu-le-hb.a src/.libs/*.o' || exit 1 294 | 295 | cat > src/libicu-le-hb.la <. 19 | # 20 | # As a special exception to the GNU General Public License, if you 21 | # distribute this file as part of a program that contains a 22 | # configuration script generated by Autoconf, you may include it under 23 | # the same distribution terms that you use for the rest of that 24 | # program. This Exception is an additional permission under section 7 25 | # of the GNU General Public License, version 3 ("GPLv3"). 26 | # 27 | # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. 28 | # 29 | # You can get the latest version of this script from: 30 | # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 31 | # 32 | # Please send patches to . 33 | 34 | 35 | me=`echo "$0" | sed -e 's,.*/,,'` 36 | 37 | usage="\ 38 | Usage: $0 [OPTION] 39 | 40 | Output the configuration name of the system \`$me' is run on. 41 | 42 | Operation modes: 43 | -h, --help print this help, then exit 44 | -t, --time-stamp print date of last modification, then exit 45 | -v, --version print version number, then exit 46 | 47 | Report bugs and patches to ." 48 | 49 | version="\ 50 | GNU config.guess ($timestamp) 51 | 52 | Originally written by Per Bothner. 53 | Copyright 1992-2014 Free Software Foundation, Inc. 54 | 55 | This is free software; see the source for copying conditions. There is NO 56 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 57 | 58 | help=" 59 | Try \`$me --help' for more information." 60 | 61 | # Parse command line 62 | while test $# -gt 0 ; do 63 | case $1 in 64 | --time-stamp | --time* | -t ) 65 | echo "$timestamp" ; exit ;; 66 | --version | -v ) 67 | echo "$version" ; exit ;; 68 | --help | --h* | -h ) 69 | echo "$usage"; exit ;; 70 | -- ) # Stop option processing 71 | shift; break ;; 72 | - ) # Use stdin as input. 73 | break ;; 74 | -* ) 75 | echo "$me: invalid option $1$help" >&2 76 | exit 1 ;; 77 | * ) 78 | break ;; 79 | esac 80 | done 81 | 82 | if test $# != 0; then 83 | echo "$me: too many arguments$help" >&2 84 | exit 1 85 | fi 86 | 87 | trap 'exit 1' 1 2 15 88 | 89 | # CC_FOR_BUILD -- compiler used by this script. Note that the use of a 90 | # compiler to aid in system detection is discouraged as it requires 91 | # temporary files to be created and, as you can see below, it is a 92 | # headache to deal with in a portable fashion. 93 | 94 | # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still 95 | # use `HOST_CC' if defined, but it is deprecated. 96 | 97 | # Portable tmp directory creation inspired by the Autoconf team. 98 | 99 | set_cc_for_build=' 100 | trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; 101 | trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; 102 | : ${TMPDIR=/tmp} ; 103 | { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || 104 | { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || 105 | { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || 106 | { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; 107 | dummy=$tmp/dummy ; 108 | tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; 109 | case $CC_FOR_BUILD,$HOST_CC,$CC in 110 | ,,) echo "int x;" > $dummy.c ; 111 | for c in cc gcc c89 c99 ; do 112 | if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then 113 | CC_FOR_BUILD="$c"; break ; 114 | fi ; 115 | done ; 116 | if test x"$CC_FOR_BUILD" = x ; then 117 | CC_FOR_BUILD=no_compiler_found ; 118 | fi 119 | ;; 120 | ,,*) CC_FOR_BUILD=$CC ;; 121 | ,*,*) CC_FOR_BUILD=$HOST_CC ;; 122 | esac ; set_cc_for_build= ;' 123 | 124 | # This is needed to find uname on a Pyramid OSx when run in the BSD universe. 125 | # (ghazi@noc.rutgers.edu 1994-08-24) 126 | if (test -f /.attbin/uname) >/dev/null 2>&1 ; then 127 | PATH=$PATH:/.attbin ; export PATH 128 | fi 129 | 130 | UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown 131 | UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown 132 | UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 133 | UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 134 | 135 | case "${UNAME_SYSTEM}" in 136 | Linux|GNU|GNU/*) 137 | # If the system lacks a compiler, then just pick glibc. 138 | # We could probably try harder. 139 | LIBC=gnu 140 | 141 | eval $set_cc_for_build 142 | cat <<-EOF > $dummy.c 143 | #include 144 | #if defined(__UCLIBC__) 145 | LIBC=uclibc 146 | #elif defined(__dietlibc__) 147 | LIBC=dietlibc 148 | #else 149 | LIBC=gnu 150 | #endif 151 | EOF 152 | eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` 153 | ;; 154 | esac 155 | 156 | # Note: order is significant - the case branches are not exclusive. 157 | 158 | case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 159 | *:NetBSD:*:*) 160 | # NetBSD (nbsd) targets should (where applicable) match one or 161 | # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, 162 | # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently 163 | # switched to ELF, *-*-netbsd* would select the old 164 | # object file format. This provides both forward 165 | # compatibility and a consistent mechanism for selecting the 166 | # object file format. 167 | # 168 | # Note: NetBSD doesn't particularly care about the vendor 169 | # portion of the name. We always set it to "unknown". 170 | sysctl="sysctl -n hw.machine_arch" 171 | UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ 172 | /usr/sbin/$sysctl 2>/dev/null || echo unknown)` 173 | case "${UNAME_MACHINE_ARCH}" in 174 | armeb) machine=armeb-unknown ;; 175 | arm*) machine=arm-unknown ;; 176 | sh3el) machine=shl-unknown ;; 177 | sh3eb) machine=sh-unknown ;; 178 | sh5el) machine=sh5le-unknown ;; 179 | *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 180 | esac 181 | # The Operating System including object format, if it has switched 182 | # to ELF recently, or will in the future. 183 | case "${UNAME_MACHINE_ARCH}" in 184 | arm*|i386|m68k|ns32k|sh3*|sparc|vax) 185 | eval $set_cc_for_build 186 | if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 187 | | grep -q __ELF__ 188 | then 189 | # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). 190 | # Return netbsd for either. FIX? 191 | os=netbsd 192 | else 193 | os=netbsdelf 194 | fi 195 | ;; 196 | *) 197 | os=netbsd 198 | ;; 199 | esac 200 | # The OS release 201 | # Debian GNU/NetBSD machines have a different userland, and 202 | # thus, need a distinct triplet. However, they do not need 203 | # kernel version information, so it can be replaced with a 204 | # suitable tag, in the style of linux-gnu. 205 | case "${UNAME_VERSION}" in 206 | Debian*) 207 | release='-gnu' 208 | ;; 209 | *) 210 | release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 211 | ;; 212 | esac 213 | # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 214 | # contains redundant information, the shorter form: 215 | # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 216 | echo "${machine}-${os}${release}" 217 | exit ;; 218 | *:Bitrig:*:*) 219 | UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` 220 | echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} 221 | exit ;; 222 | *:OpenBSD:*:*) 223 | UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` 224 | echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} 225 | exit ;; 226 | *:ekkoBSD:*:*) 227 | echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} 228 | exit ;; 229 | *:SolidBSD:*:*) 230 | echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} 231 | exit ;; 232 | macppc:MirBSD:*:*) 233 | echo powerpc-unknown-mirbsd${UNAME_RELEASE} 234 | exit ;; 235 | *:MirBSD:*:*) 236 | echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} 237 | exit ;; 238 | alpha:OSF1:*:*) 239 | case $UNAME_RELEASE in 240 | *4.0) 241 | UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 242 | ;; 243 | *5.*) 244 | UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` 245 | ;; 246 | esac 247 | # According to Compaq, /usr/sbin/psrinfo has been available on 248 | # OSF/1 and Tru64 systems produced since 1995. I hope that 249 | # covers most systems running today. This code pipes the CPU 250 | # types through head -n 1, so we only detect the type of CPU 0. 251 | ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` 252 | case "$ALPHA_CPU_TYPE" in 253 | "EV4 (21064)") 254 | UNAME_MACHINE="alpha" ;; 255 | "EV4.5 (21064)") 256 | UNAME_MACHINE="alpha" ;; 257 | "LCA4 (21066/21068)") 258 | UNAME_MACHINE="alpha" ;; 259 | "EV5 (21164)") 260 | UNAME_MACHINE="alphaev5" ;; 261 | "EV5.6 (21164A)") 262 | UNAME_MACHINE="alphaev56" ;; 263 | "EV5.6 (21164PC)") 264 | UNAME_MACHINE="alphapca56" ;; 265 | "EV5.7 (21164PC)") 266 | UNAME_MACHINE="alphapca57" ;; 267 | "EV6 (21264)") 268 | UNAME_MACHINE="alphaev6" ;; 269 | "EV6.7 (21264A)") 270 | UNAME_MACHINE="alphaev67" ;; 271 | "EV6.8CB (21264C)") 272 | UNAME_MACHINE="alphaev68" ;; 273 | "EV6.8AL (21264B)") 274 | UNAME_MACHINE="alphaev68" ;; 275 | "EV6.8CX (21264D)") 276 | UNAME_MACHINE="alphaev68" ;; 277 | "EV6.9A (21264/EV69A)") 278 | UNAME_MACHINE="alphaev69" ;; 279 | "EV7 (21364)") 280 | UNAME_MACHINE="alphaev7" ;; 281 | "EV7.9 (21364A)") 282 | UNAME_MACHINE="alphaev79" ;; 283 | esac 284 | # A Pn.n version is a patched version. 285 | # A Vn.n version is a released version. 286 | # A Tn.n version is a released field test version. 287 | # A Xn.n version is an unreleased experimental baselevel. 288 | # 1.2 uses "1.2" for uname -r. 289 | echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 290 | # Reset EXIT trap before exiting to avoid spurious non-zero exit code. 291 | exitcode=$? 292 | trap '' 0 293 | exit $exitcode ;; 294 | Alpha\ *:Windows_NT*:*) 295 | # How do we know it's Interix rather than the generic POSIX subsystem? 296 | # Should we change UNAME_MACHINE based on the output of uname instead 297 | # of the specific Alpha model? 298 | echo alpha-pc-interix 299 | exit ;; 300 | 21064:Windows_NT:50:3) 301 | echo alpha-dec-winnt3.5 302 | exit ;; 303 | Amiga*:UNIX_System_V:4.0:*) 304 | echo m68k-unknown-sysv4 305 | exit ;; 306 | *:[Aa]miga[Oo][Ss]:*:*) 307 | echo ${UNAME_MACHINE}-unknown-amigaos 308 | exit ;; 309 | *:[Mm]orph[Oo][Ss]:*:*) 310 | echo ${UNAME_MACHINE}-unknown-morphos 311 | exit ;; 312 | *:OS/390:*:*) 313 | echo i370-ibm-openedition 314 | exit ;; 315 | *:z/VM:*:*) 316 | echo s390-ibm-zvmoe 317 | exit ;; 318 | *:OS400:*:*) 319 | echo powerpc-ibm-os400 320 | exit ;; 321 | arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 322 | echo arm-acorn-riscix${UNAME_RELEASE} 323 | exit ;; 324 | arm*:riscos:*:*|arm*:RISCOS:*:*) 325 | echo arm-unknown-riscos 326 | exit ;; 327 | SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 328 | echo hppa1.1-hitachi-hiuxmpp 329 | exit ;; 330 | Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) 331 | # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. 332 | if test "`(/bin/universe) 2>/dev/null`" = att ; then 333 | echo pyramid-pyramid-sysv3 334 | else 335 | echo pyramid-pyramid-bsd 336 | fi 337 | exit ;; 338 | NILE*:*:*:dcosx) 339 | echo pyramid-pyramid-svr4 340 | exit ;; 341 | DRS?6000:unix:4.0:6*) 342 | echo sparc-icl-nx6 343 | exit ;; 344 | DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) 345 | case `/usr/bin/uname -p` in 346 | sparc) echo sparc-icl-nx7; exit ;; 347 | esac ;; 348 | s390x:SunOS:*:*) 349 | echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 350 | exit ;; 351 | sun4H:SunOS:5.*:*) 352 | echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 353 | exit ;; 354 | sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 355 | echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 356 | exit ;; 357 | i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) 358 | echo i386-pc-auroraux${UNAME_RELEASE} 359 | exit ;; 360 | i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) 361 | eval $set_cc_for_build 362 | SUN_ARCH="i386" 363 | # If there is a compiler, see if it is configured for 64-bit objects. 364 | # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. 365 | # This test works for both compilers. 366 | if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 367 | if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ 368 | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 369 | grep IS_64BIT_ARCH >/dev/null 370 | then 371 | SUN_ARCH="x86_64" 372 | fi 373 | fi 374 | echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 375 | exit ;; 376 | sun4*:SunOS:6*:*) 377 | # According to config.sub, this is the proper way to canonicalize 378 | # SunOS6. Hard to guess exactly what SunOS6 will be like, but 379 | # it's likely to be more like Solaris than SunOS4. 380 | echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 381 | exit ;; 382 | sun4*:SunOS:*:*) 383 | case "`/usr/bin/arch -k`" in 384 | Series*|S4*) 385 | UNAME_RELEASE=`uname -v` 386 | ;; 387 | esac 388 | # Japanese Language versions have a version number like `4.1.3-JL'. 389 | echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` 390 | exit ;; 391 | sun3*:SunOS:*:*) 392 | echo m68k-sun-sunos${UNAME_RELEASE} 393 | exit ;; 394 | sun*:*:4.2BSD:*) 395 | UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 396 | test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 397 | case "`/bin/arch`" in 398 | sun3) 399 | echo m68k-sun-sunos${UNAME_RELEASE} 400 | ;; 401 | sun4) 402 | echo sparc-sun-sunos${UNAME_RELEASE} 403 | ;; 404 | esac 405 | exit ;; 406 | aushp:SunOS:*:*) 407 | echo sparc-auspex-sunos${UNAME_RELEASE} 408 | exit ;; 409 | # The situation for MiNT is a little confusing. The machine name 410 | # can be virtually everything (everything which is not 411 | # "atarist" or "atariste" at least should have a processor 412 | # > m68000). The system name ranges from "MiNT" over "FreeMiNT" 413 | # to the lowercase version "mint" (or "freemint"). Finally 414 | # the system name "TOS" denotes a system which is actually not 415 | # MiNT. But MiNT is downward compatible to TOS, so this should 416 | # be no problem. 417 | atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 418 | echo m68k-atari-mint${UNAME_RELEASE} 419 | exit ;; 420 | atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 421 | echo m68k-atari-mint${UNAME_RELEASE} 422 | exit ;; 423 | *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 424 | echo m68k-atari-mint${UNAME_RELEASE} 425 | exit ;; 426 | milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 427 | echo m68k-milan-mint${UNAME_RELEASE} 428 | exit ;; 429 | hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 430 | echo m68k-hades-mint${UNAME_RELEASE} 431 | exit ;; 432 | *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 433 | echo m68k-unknown-mint${UNAME_RELEASE} 434 | exit ;; 435 | m68k:machten:*:*) 436 | echo m68k-apple-machten${UNAME_RELEASE} 437 | exit ;; 438 | powerpc:machten:*:*) 439 | echo powerpc-apple-machten${UNAME_RELEASE} 440 | exit ;; 441 | RISC*:Mach:*:*) 442 | echo mips-dec-mach_bsd4.3 443 | exit ;; 444 | RISC*:ULTRIX:*:*) 445 | echo mips-dec-ultrix${UNAME_RELEASE} 446 | exit ;; 447 | VAX*:ULTRIX*:*:*) 448 | echo vax-dec-ultrix${UNAME_RELEASE} 449 | exit ;; 450 | 2020:CLIX:*:* | 2430:CLIX:*:*) 451 | echo clipper-intergraph-clix${UNAME_RELEASE} 452 | exit ;; 453 | mips:*:*:UMIPS | mips:*:*:RISCos) 454 | eval $set_cc_for_build 455 | sed 's/^ //' << EOF >$dummy.c 456 | #ifdef __cplusplus 457 | #include /* for printf() prototype */ 458 | int main (int argc, char *argv[]) { 459 | #else 460 | int main (argc, argv) int argc; char *argv[]; { 461 | #endif 462 | #if defined (host_mips) && defined (MIPSEB) 463 | #if defined (SYSTYPE_SYSV) 464 | printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); 465 | #endif 466 | #if defined (SYSTYPE_SVR4) 467 | printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); 468 | #endif 469 | #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) 470 | printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); 471 | #endif 472 | #endif 473 | exit (-1); 474 | } 475 | EOF 476 | $CC_FOR_BUILD -o $dummy $dummy.c && 477 | dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && 478 | SYSTEM_NAME=`$dummy $dummyarg` && 479 | { echo "$SYSTEM_NAME"; exit; } 480 | echo mips-mips-riscos${UNAME_RELEASE} 481 | exit ;; 482 | Motorola:PowerMAX_OS:*:*) 483 | echo powerpc-motorola-powermax 484 | exit ;; 485 | Motorola:*:4.3:PL8-*) 486 | echo powerpc-harris-powermax 487 | exit ;; 488 | Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) 489 | echo powerpc-harris-powermax 490 | exit ;; 491 | Night_Hawk:Power_UNIX:*:*) 492 | echo powerpc-harris-powerunix 493 | exit ;; 494 | m88k:CX/UX:7*:*) 495 | echo m88k-harris-cxux7 496 | exit ;; 497 | m88k:*:4*:R4*) 498 | echo m88k-motorola-sysv4 499 | exit ;; 500 | m88k:*:3*:R3*) 501 | echo m88k-motorola-sysv3 502 | exit ;; 503 | AViiON:dgux:*:*) 504 | # DG/UX returns AViiON for all architectures 505 | UNAME_PROCESSOR=`/usr/bin/uname -p` 506 | if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] 507 | then 508 | if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ 509 | [ ${TARGET_BINARY_INTERFACE}x = x ] 510 | then 511 | echo m88k-dg-dgux${UNAME_RELEASE} 512 | else 513 | echo m88k-dg-dguxbcs${UNAME_RELEASE} 514 | fi 515 | else 516 | echo i586-dg-dgux${UNAME_RELEASE} 517 | fi 518 | exit ;; 519 | M88*:DolphinOS:*:*) # DolphinOS (SVR3) 520 | echo m88k-dolphin-sysv3 521 | exit ;; 522 | M88*:*:R3*:*) 523 | # Delta 88k system running SVR3 524 | echo m88k-motorola-sysv3 525 | exit ;; 526 | XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) 527 | echo m88k-tektronix-sysv3 528 | exit ;; 529 | Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) 530 | echo m68k-tektronix-bsd 531 | exit ;; 532 | *:IRIX*:*:*) 533 | echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` 534 | exit ;; 535 | ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. 536 | echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id 537 | exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' 538 | i*86:AIX:*:*) 539 | echo i386-ibm-aix 540 | exit ;; 541 | ia64:AIX:*:*) 542 | if [ -x /usr/bin/oslevel ] ; then 543 | IBM_REV=`/usr/bin/oslevel` 544 | else 545 | IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 546 | fi 547 | echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} 548 | exit ;; 549 | *:AIX:2:3) 550 | if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 551 | eval $set_cc_for_build 552 | sed 's/^ //' << EOF >$dummy.c 553 | #include 554 | 555 | main() 556 | { 557 | if (!__power_pc()) 558 | exit(1); 559 | puts("powerpc-ibm-aix3.2.5"); 560 | exit(0); 561 | } 562 | EOF 563 | if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` 564 | then 565 | echo "$SYSTEM_NAME" 566 | else 567 | echo rs6000-ibm-aix3.2.5 568 | fi 569 | elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 570 | echo rs6000-ibm-aix3.2.4 571 | else 572 | echo rs6000-ibm-aix3.2 573 | fi 574 | exit ;; 575 | *:AIX:*:[4567]) 576 | IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 577 | if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 578 | IBM_ARCH=rs6000 579 | else 580 | IBM_ARCH=powerpc 581 | fi 582 | if [ -x /usr/bin/lslpp ] ; then 583 | IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | 584 | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` 585 | else 586 | IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 587 | fi 588 | echo ${IBM_ARCH}-ibm-aix${IBM_REV} 589 | exit ;; 590 | *:AIX:*:*) 591 | echo rs6000-ibm-aix 592 | exit ;; 593 | ibmrt:4.4BSD:*|romp-ibm:BSD:*) 594 | echo romp-ibm-bsd4.4 595 | exit ;; 596 | ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and 597 | echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to 598 | exit ;; # report: romp-ibm BSD 4.3 599 | *:BOSX:*:*) 600 | echo rs6000-bull-bosx 601 | exit ;; 602 | DPX/2?00:B.O.S.:*:*) 603 | echo m68k-bull-sysv3 604 | exit ;; 605 | 9000/[34]??:4.3bsd:1.*:*) 606 | echo m68k-hp-bsd 607 | exit ;; 608 | hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) 609 | echo m68k-hp-bsd4.4 610 | exit ;; 611 | 9000/[34678]??:HP-UX:*:*) 612 | HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 613 | case "${UNAME_MACHINE}" in 614 | 9000/31? ) HP_ARCH=m68000 ;; 615 | 9000/[34]?? ) HP_ARCH=m68k ;; 616 | 9000/[678][0-9][0-9]) 617 | if [ -x /usr/bin/getconf ]; then 618 | sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 619 | sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 620 | case "${sc_cpu_version}" in 621 | 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 622 | 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 623 | 532) # CPU_PA_RISC2_0 624 | case "${sc_kernel_bits}" in 625 | 32) HP_ARCH="hppa2.0n" ;; 626 | 64) HP_ARCH="hppa2.0w" ;; 627 | '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 628 | esac ;; 629 | esac 630 | fi 631 | if [ "${HP_ARCH}" = "" ]; then 632 | eval $set_cc_for_build 633 | sed 's/^ //' << EOF >$dummy.c 634 | 635 | #define _HPUX_SOURCE 636 | #include 637 | #include 638 | 639 | int main () 640 | { 641 | #if defined(_SC_KERNEL_BITS) 642 | long bits = sysconf(_SC_KERNEL_BITS); 643 | #endif 644 | long cpu = sysconf (_SC_CPU_VERSION); 645 | 646 | switch (cpu) 647 | { 648 | case CPU_PA_RISC1_0: puts ("hppa1.0"); break; 649 | case CPU_PA_RISC1_1: puts ("hppa1.1"); break; 650 | case CPU_PA_RISC2_0: 651 | #if defined(_SC_KERNEL_BITS) 652 | switch (bits) 653 | { 654 | case 64: puts ("hppa2.0w"); break; 655 | case 32: puts ("hppa2.0n"); break; 656 | default: puts ("hppa2.0"); break; 657 | } break; 658 | #else /* !defined(_SC_KERNEL_BITS) */ 659 | puts ("hppa2.0"); break; 660 | #endif 661 | default: puts ("hppa1.0"); break; 662 | } 663 | exit (0); 664 | } 665 | EOF 666 | (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` 667 | test -z "$HP_ARCH" && HP_ARCH=hppa 668 | fi ;; 669 | esac 670 | if [ ${HP_ARCH} = "hppa2.0w" ] 671 | then 672 | eval $set_cc_for_build 673 | 674 | # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating 675 | # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler 676 | # generating 64-bit code. GNU and HP use different nomenclature: 677 | # 678 | # $ CC_FOR_BUILD=cc ./config.guess 679 | # => hppa2.0w-hp-hpux11.23 680 | # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess 681 | # => hppa64-hp-hpux11.23 682 | 683 | if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | 684 | grep -q __LP64__ 685 | then 686 | HP_ARCH="hppa2.0w" 687 | else 688 | HP_ARCH="hppa64" 689 | fi 690 | fi 691 | echo ${HP_ARCH}-hp-hpux${HPUX_REV} 692 | exit ;; 693 | ia64:HP-UX:*:*) 694 | HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 695 | echo ia64-hp-hpux${HPUX_REV} 696 | exit ;; 697 | 3050*:HI-UX:*:*) 698 | eval $set_cc_for_build 699 | sed 's/^ //' << EOF >$dummy.c 700 | #include 701 | int 702 | main () 703 | { 704 | long cpu = sysconf (_SC_CPU_VERSION); 705 | /* The order matters, because CPU_IS_HP_MC68K erroneously returns 706 | true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct 707 | results, however. */ 708 | if (CPU_IS_PA_RISC (cpu)) 709 | { 710 | switch (cpu) 711 | { 712 | case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; 713 | case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; 714 | case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; 715 | default: puts ("hppa-hitachi-hiuxwe2"); break; 716 | } 717 | } 718 | else if (CPU_IS_HP_MC68K (cpu)) 719 | puts ("m68k-hitachi-hiuxwe2"); 720 | else puts ("unknown-hitachi-hiuxwe2"); 721 | exit (0); 722 | } 723 | EOF 724 | $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && 725 | { echo "$SYSTEM_NAME"; exit; } 726 | echo unknown-hitachi-hiuxwe2 727 | exit ;; 728 | 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) 729 | echo hppa1.1-hp-bsd 730 | exit ;; 731 | 9000/8??:4.3bsd:*:*) 732 | echo hppa1.0-hp-bsd 733 | exit ;; 734 | *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) 735 | echo hppa1.0-hp-mpeix 736 | exit ;; 737 | hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) 738 | echo hppa1.1-hp-osf 739 | exit ;; 740 | hp8??:OSF1:*:*) 741 | echo hppa1.0-hp-osf 742 | exit ;; 743 | i*86:OSF1:*:*) 744 | if [ -x /usr/sbin/sysversion ] ; then 745 | echo ${UNAME_MACHINE}-unknown-osf1mk 746 | else 747 | echo ${UNAME_MACHINE}-unknown-osf1 748 | fi 749 | exit ;; 750 | parisc*:Lites*:*:*) 751 | echo hppa1.1-hp-lites 752 | exit ;; 753 | C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 754 | echo c1-convex-bsd 755 | exit ;; 756 | C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 757 | if getsysinfo -f scalar_acc 758 | then echo c32-convex-bsd 759 | else echo c2-convex-bsd 760 | fi 761 | exit ;; 762 | C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 763 | echo c34-convex-bsd 764 | exit ;; 765 | C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 766 | echo c38-convex-bsd 767 | exit ;; 768 | C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 769 | echo c4-convex-bsd 770 | exit ;; 771 | CRAY*Y-MP:*:*:*) 772 | echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 773 | exit ;; 774 | CRAY*[A-Z]90:*:*:*) 775 | echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 776 | | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ 777 | -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ 778 | -e 's/\.[^.]*$/.X/' 779 | exit ;; 780 | CRAY*TS:*:*:*) 781 | echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 782 | exit ;; 783 | CRAY*T3E:*:*:*) 784 | echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 785 | exit ;; 786 | CRAY*SV1:*:*:*) 787 | echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 788 | exit ;; 789 | *:UNICOS/mp:*:*) 790 | echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 791 | exit ;; 792 | F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 793 | FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 794 | FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 795 | FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 796 | echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 797 | exit ;; 798 | 5000:UNIX_System_V:4.*:*) 799 | FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 800 | FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` 801 | echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 802 | exit ;; 803 | i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 804 | echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 805 | exit ;; 806 | sparc*:BSD/OS:*:*) 807 | echo sparc-unknown-bsdi${UNAME_RELEASE} 808 | exit ;; 809 | *:BSD/OS:*:*) 810 | echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 811 | exit ;; 812 | *:FreeBSD:*:*) 813 | UNAME_PROCESSOR=`/usr/bin/uname -p` 814 | case ${UNAME_PROCESSOR} in 815 | amd64) 816 | echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 817 | *) 818 | echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 819 | esac 820 | exit ;; 821 | i*:CYGWIN*:*) 822 | echo ${UNAME_MACHINE}-pc-cygwin 823 | exit ;; 824 | *:MINGW64*:*) 825 | echo ${UNAME_MACHINE}-pc-mingw64 826 | exit ;; 827 | *:MINGW*:*) 828 | echo ${UNAME_MACHINE}-pc-mingw32 829 | exit ;; 830 | *:MSYS*:*) 831 | echo ${UNAME_MACHINE}-pc-msys 832 | exit ;; 833 | i*:windows32*:*) 834 | # uname -m includes "-pc" on this system. 835 | echo ${UNAME_MACHINE}-mingw32 836 | exit ;; 837 | i*:PW*:*) 838 | echo ${UNAME_MACHINE}-pc-pw32 839 | exit ;; 840 | *:Interix*:*) 841 | case ${UNAME_MACHINE} in 842 | x86) 843 | echo i586-pc-interix${UNAME_RELEASE} 844 | exit ;; 845 | authenticamd | genuineintel | EM64T) 846 | echo x86_64-unknown-interix${UNAME_RELEASE} 847 | exit ;; 848 | IA64) 849 | echo ia64-unknown-interix${UNAME_RELEASE} 850 | exit ;; 851 | esac ;; 852 | [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) 853 | echo i${UNAME_MACHINE}-pc-mks 854 | exit ;; 855 | 8664:Windows_NT:*) 856 | echo x86_64-pc-mks 857 | exit ;; 858 | i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 859 | # How do we know it's Interix rather than the generic POSIX subsystem? 860 | # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 861 | # UNAME_MACHINE based on the output of uname instead of i386? 862 | echo i586-pc-interix 863 | exit ;; 864 | i*:UWIN*:*) 865 | echo ${UNAME_MACHINE}-pc-uwin 866 | exit ;; 867 | amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) 868 | echo x86_64-unknown-cygwin 869 | exit ;; 870 | p*:CYGWIN*:*) 871 | echo powerpcle-unknown-cygwin 872 | exit ;; 873 | prep*:SunOS:5.*:*) 874 | echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 875 | exit ;; 876 | *:GNU:*:*) 877 | # the GNU system 878 | echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 879 | exit ;; 880 | *:GNU/*:*:*) 881 | # other systems with GNU libc and userland 882 | echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} 883 | exit ;; 884 | i*86:Minix:*:*) 885 | echo ${UNAME_MACHINE}-pc-minix 886 | exit ;; 887 | aarch64:Linux:*:*) 888 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 889 | exit ;; 890 | aarch64_be:Linux:*:*) 891 | UNAME_MACHINE=aarch64_be 892 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 893 | exit ;; 894 | alpha:Linux:*:*) 895 | case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 896 | EV5) UNAME_MACHINE=alphaev5 ;; 897 | EV56) UNAME_MACHINE=alphaev56 ;; 898 | PCA56) UNAME_MACHINE=alphapca56 ;; 899 | PCA57) UNAME_MACHINE=alphapca56 ;; 900 | EV6) UNAME_MACHINE=alphaev6 ;; 901 | EV67) UNAME_MACHINE=alphaev67 ;; 902 | EV68*) UNAME_MACHINE=alphaev68 ;; 903 | esac 904 | objdump --private-headers /bin/sh | grep -q ld.so.1 905 | if test "$?" = 0 ; then LIBC="gnulibc1" ; fi 906 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 907 | exit ;; 908 | arc:Linux:*:* | arceb:Linux:*:*) 909 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 910 | exit ;; 911 | arm*:Linux:*:*) 912 | eval $set_cc_for_build 913 | if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ 914 | | grep -q __ARM_EABI__ 915 | then 916 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 917 | else 918 | if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ 919 | | grep -q __ARM_PCS_VFP 920 | then 921 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi 922 | else 923 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf 924 | fi 925 | fi 926 | exit ;; 927 | avr32*:Linux:*:*) 928 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 929 | exit ;; 930 | cris:Linux:*:*) 931 | echo ${UNAME_MACHINE}-axis-linux-${LIBC} 932 | exit ;; 933 | crisv32:Linux:*:*) 934 | echo ${UNAME_MACHINE}-axis-linux-${LIBC} 935 | exit ;; 936 | frv:Linux:*:*) 937 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 938 | exit ;; 939 | hexagon:Linux:*:*) 940 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 941 | exit ;; 942 | i*86:Linux:*:*) 943 | echo ${UNAME_MACHINE}-pc-linux-${LIBC} 944 | exit ;; 945 | ia64:Linux:*:*) 946 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 947 | exit ;; 948 | m32r*:Linux:*:*) 949 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 950 | exit ;; 951 | m68*:Linux:*:*) 952 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 953 | exit ;; 954 | mips:Linux:*:* | mips64:Linux:*:*) 955 | eval $set_cc_for_build 956 | sed 's/^ //' << EOF >$dummy.c 957 | #undef CPU 958 | #undef ${UNAME_MACHINE} 959 | #undef ${UNAME_MACHINE}el 960 | #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 961 | CPU=${UNAME_MACHINE}el 962 | #else 963 | #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 964 | CPU=${UNAME_MACHINE} 965 | #else 966 | CPU= 967 | #endif 968 | #endif 969 | EOF 970 | eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` 971 | test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } 972 | ;; 973 | openrisc*:Linux:*:*) 974 | echo or1k-unknown-linux-${LIBC} 975 | exit ;; 976 | or32:Linux:*:* | or1k*:Linux:*:*) 977 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 978 | exit ;; 979 | padre:Linux:*:*) 980 | echo sparc-unknown-linux-${LIBC} 981 | exit ;; 982 | parisc64:Linux:*:* | hppa64:Linux:*:*) 983 | echo hppa64-unknown-linux-${LIBC} 984 | exit ;; 985 | parisc:Linux:*:* | hppa:Linux:*:*) 986 | # Look for CPU level 987 | case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 988 | PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; 989 | PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; 990 | *) echo hppa-unknown-linux-${LIBC} ;; 991 | esac 992 | exit ;; 993 | ppc64:Linux:*:*) 994 | echo powerpc64-unknown-linux-${LIBC} 995 | exit ;; 996 | ppc:Linux:*:*) 997 | echo powerpc-unknown-linux-${LIBC} 998 | exit ;; 999 | ppc64le:Linux:*:*) 1000 | echo powerpc64le-unknown-linux-${LIBC} 1001 | exit ;; 1002 | ppcle:Linux:*:*) 1003 | echo powerpcle-unknown-linux-${LIBC} 1004 | exit ;; 1005 | s390:Linux:*:* | s390x:Linux:*:*) 1006 | echo ${UNAME_MACHINE}-ibm-linux-${LIBC} 1007 | exit ;; 1008 | sh64*:Linux:*:*) 1009 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1010 | exit ;; 1011 | sh*:Linux:*:*) 1012 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1013 | exit ;; 1014 | sparc:Linux:*:* | sparc64:Linux:*:*) 1015 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1016 | exit ;; 1017 | tile*:Linux:*:*) 1018 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1019 | exit ;; 1020 | vax:Linux:*:*) 1021 | echo ${UNAME_MACHINE}-dec-linux-${LIBC} 1022 | exit ;; 1023 | x86_64:Linux:*:*) 1024 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1025 | exit ;; 1026 | xtensa*:Linux:*:*) 1027 | echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1028 | exit ;; 1029 | i*86:DYNIX/ptx:4*:*) 1030 | # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 1031 | # earlier versions are messed up and put the nodename in both 1032 | # sysname and nodename. 1033 | echo i386-sequent-sysv4 1034 | exit ;; 1035 | i*86:UNIX_SV:4.2MP:2.*) 1036 | # Unixware is an offshoot of SVR4, but it has its own version 1037 | # number series starting with 2... 1038 | # I am not positive that other SVR4 systems won't match this, 1039 | # I just have to hope. -- rms. 1040 | # Use sysv4.2uw... so that sysv4* matches it. 1041 | echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 1042 | exit ;; 1043 | i*86:OS/2:*:*) 1044 | # If we were able to find `uname', then EMX Unix compatibility 1045 | # is probably installed. 1046 | echo ${UNAME_MACHINE}-pc-os2-emx 1047 | exit ;; 1048 | i*86:XTS-300:*:STOP) 1049 | echo ${UNAME_MACHINE}-unknown-stop 1050 | exit ;; 1051 | i*86:atheos:*:*) 1052 | echo ${UNAME_MACHINE}-unknown-atheos 1053 | exit ;; 1054 | i*86:syllable:*:*) 1055 | echo ${UNAME_MACHINE}-pc-syllable 1056 | exit ;; 1057 | i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) 1058 | echo i386-unknown-lynxos${UNAME_RELEASE} 1059 | exit ;; 1060 | i*86:*DOS:*:*) 1061 | echo ${UNAME_MACHINE}-pc-msdosdjgpp 1062 | exit ;; 1063 | i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) 1064 | UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` 1065 | if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then 1066 | echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} 1067 | else 1068 | echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 1069 | fi 1070 | exit ;; 1071 | i*86:*:5:[678]*) 1072 | # UnixWare 7.x, OpenUNIX and OpenServer 6. 1073 | case `/bin/uname -X | grep "^Machine"` in 1074 | *486*) UNAME_MACHINE=i486 ;; 1075 | *Pentium) UNAME_MACHINE=i586 ;; 1076 | *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 1077 | esac 1078 | echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} 1079 | exit ;; 1080 | i*86:*:3.2:*) 1081 | if test -f /usr/options/cb.name; then 1082 | UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then 1085 | UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` 1086 | (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 1087 | (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ 1088 | && UNAME_MACHINE=i586 1089 | (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ 1090 | && UNAME_MACHINE=i686 1091 | (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ 1092 | && UNAME_MACHINE=i686 1093 | echo ${UNAME_MACHINE}-pc-sco$UNAME_REL 1094 | else 1095 | echo ${UNAME_MACHINE}-pc-sysv32 1096 | fi 1097 | exit ;; 1098 | pc:*:*:*) 1099 | # Left here for compatibility: 1100 | # uname -m prints for DJGPP always 'pc', but it prints nothing about 1101 | # the processor, so we play safe by assuming i586. 1102 | # Note: whatever this is, it MUST be the same as what config.sub 1103 | # prints for the "djgpp" host, or else GDB configury will decide that 1104 | # this is a cross-build. 1105 | echo i586-pc-msdosdjgpp 1106 | exit ;; 1107 | Intel:Mach:3*:*) 1108 | echo i386-pc-mach3 1109 | exit ;; 1110 | paragon:*:*:*) 1111 | echo i860-intel-osf1 1112 | exit ;; 1113 | i860:*:4.*:*) # i860-SVR4 1114 | if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then 1115 | echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 1116 | else # Add other i860-SVR4 vendors below as they are discovered. 1117 | echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 1118 | fi 1119 | exit ;; 1120 | mini*:CTIX:SYS*5:*) 1121 | # "miniframe" 1122 | echo m68010-convergent-sysv 1123 | exit ;; 1124 | mc68k:UNIX:SYSTEM5:3.51m) 1125 | echo m68k-convergent-sysv 1126 | exit ;; 1127 | M680?0:D-NIX:5.3:*) 1128 | echo m68k-diab-dnix 1129 | exit ;; 1130 | M68*:*:R3V[5678]*:*) 1131 | test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 1132 | 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) 1133 | OS_REL='' 1134 | test -r /etc/.relid \ 1135 | && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 1136 | /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1137 | && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 1138 | /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 1139 | && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 1140 | 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 1141 | /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1142 | && { echo i486-ncr-sysv4; exit; } ;; 1143 | NCR*:*:4.2:* | MPRAS*:*:4.2:*) 1144 | OS_REL='.3' 1145 | test -r /etc/.relid \ 1146 | && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 1147 | /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1148 | && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 1149 | /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 1150 | && { echo i586-ncr-sysv4.3${OS_REL}; exit; } 1151 | /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ 1152 | && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 1153 | m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 1154 | echo m68k-unknown-lynxos${UNAME_RELEASE} 1155 | exit ;; 1156 | mc68030:UNIX_System_V:4.*:*) 1157 | echo m68k-atari-sysv4 1158 | exit ;; 1159 | TSUNAMI:LynxOS:2.*:*) 1160 | echo sparc-unknown-lynxos${UNAME_RELEASE} 1161 | exit ;; 1162 | rs6000:LynxOS:2.*:*) 1163 | echo rs6000-unknown-lynxos${UNAME_RELEASE} 1164 | exit ;; 1165 | PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) 1166 | echo powerpc-unknown-lynxos${UNAME_RELEASE} 1167 | exit ;; 1168 | SM[BE]S:UNIX_SV:*:*) 1169 | echo mips-dde-sysv${UNAME_RELEASE} 1170 | exit ;; 1171 | RM*:ReliantUNIX-*:*:*) 1172 | echo mips-sni-sysv4 1173 | exit ;; 1174 | RM*:SINIX-*:*:*) 1175 | echo mips-sni-sysv4 1176 | exit ;; 1177 | *:SINIX-*:*:*) 1178 | if uname -p 2>/dev/null >/dev/null ; then 1179 | UNAME_MACHINE=`(uname -p) 2>/dev/null` 1180 | echo ${UNAME_MACHINE}-sni-sysv4 1181 | else 1182 | echo ns32k-sni-sysv 1183 | fi 1184 | exit ;; 1185 | PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 1186 | # says 1187 | echo i586-unisys-sysv4 1188 | exit ;; 1189 | *:UNIX_System_V:4*:FTX*) 1190 | # From Gerald Hewes . 1191 | # How about differentiating between stratus architectures? -djm 1192 | echo hppa1.1-stratus-sysv4 1193 | exit ;; 1194 | *:*:*:FTX*) 1195 | # From seanf@swdc.stratus.com. 1196 | echo i860-stratus-sysv4 1197 | exit ;; 1198 | i*86:VOS:*:*) 1199 | # From Paul.Green@stratus.com. 1200 | echo ${UNAME_MACHINE}-stratus-vos 1201 | exit ;; 1202 | *:VOS:*:*) 1203 | # From Paul.Green@stratus.com. 1204 | echo hppa1.1-stratus-vos 1205 | exit ;; 1206 | mc68*:A/UX:*:*) 1207 | echo m68k-apple-aux${UNAME_RELEASE} 1208 | exit ;; 1209 | news*:NEWS-OS:6*:*) 1210 | echo mips-sony-newsos6 1211 | exit ;; 1212 | R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 1213 | if [ -d /usr/nec ]; then 1214 | echo mips-nec-sysv${UNAME_RELEASE} 1215 | else 1216 | echo mips-unknown-sysv${UNAME_RELEASE} 1217 | fi 1218 | exit ;; 1219 | BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. 1220 | echo powerpc-be-beos 1221 | exit ;; 1222 | BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. 1223 | echo powerpc-apple-beos 1224 | exit ;; 1225 | BePC:BeOS:*:*) # BeOS running on Intel PC compatible. 1226 | echo i586-pc-beos 1227 | exit ;; 1228 | BePC:Haiku:*:*) # Haiku running on Intel PC compatible. 1229 | echo i586-pc-haiku 1230 | exit ;; 1231 | x86_64:Haiku:*:*) 1232 | echo x86_64-unknown-haiku 1233 | exit ;; 1234 | SX-4:SUPER-UX:*:*) 1235 | echo sx4-nec-superux${UNAME_RELEASE} 1236 | exit ;; 1237 | SX-5:SUPER-UX:*:*) 1238 | echo sx5-nec-superux${UNAME_RELEASE} 1239 | exit ;; 1240 | SX-6:SUPER-UX:*:*) 1241 | echo sx6-nec-superux${UNAME_RELEASE} 1242 | exit ;; 1243 | SX-7:SUPER-UX:*:*) 1244 | echo sx7-nec-superux${UNAME_RELEASE} 1245 | exit ;; 1246 | SX-8:SUPER-UX:*:*) 1247 | echo sx8-nec-superux${UNAME_RELEASE} 1248 | exit ;; 1249 | SX-8R:SUPER-UX:*:*) 1250 | echo sx8r-nec-superux${UNAME_RELEASE} 1251 | exit ;; 1252 | Power*:Rhapsody:*:*) 1253 | echo powerpc-apple-rhapsody${UNAME_RELEASE} 1254 | exit ;; 1255 | *:Rhapsody:*:*) 1256 | echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 1257 | exit ;; 1258 | *:Darwin:*:*) 1259 | UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 1260 | eval $set_cc_for_build 1261 | if test "$UNAME_PROCESSOR" = unknown ; then 1262 | UNAME_PROCESSOR=powerpc 1263 | fi 1264 | if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then 1265 | if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 1266 | if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ 1267 | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 1268 | grep IS_64BIT_ARCH >/dev/null 1269 | then 1270 | case $UNAME_PROCESSOR in 1271 | i386) UNAME_PROCESSOR=x86_64 ;; 1272 | powerpc) UNAME_PROCESSOR=powerpc64 ;; 1273 | esac 1274 | fi 1275 | fi 1276 | elif test "$UNAME_PROCESSOR" = i386 ; then 1277 | # Avoid executing cc on OS X 10.9, as it ships with a stub 1278 | # that puts up a graphical alert prompting to install 1279 | # developer tools. Any system running Mac OS X 10.7 or 1280 | # later (Darwin 11 and later) is required to have a 64-bit 1281 | # processor. This is not true of the ARM version of Darwin 1282 | # that Apple uses in portable devices. 1283 | UNAME_PROCESSOR=x86_64 1284 | fi 1285 | echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 1286 | exit ;; 1287 | *:procnto*:*:* | *:QNX:[0123456789]*:*) 1288 | UNAME_PROCESSOR=`uname -p` 1289 | if test "$UNAME_PROCESSOR" = "x86"; then 1290 | UNAME_PROCESSOR=i386 1291 | UNAME_MACHINE=pc 1292 | fi 1293 | echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} 1294 | exit ;; 1295 | *:QNX:*:4*) 1296 | echo i386-pc-qnx 1297 | exit ;; 1298 | NEO-?:NONSTOP_KERNEL:*:*) 1299 | echo neo-tandem-nsk${UNAME_RELEASE} 1300 | exit ;; 1301 | NSE-*:NONSTOP_KERNEL:*:*) 1302 | echo nse-tandem-nsk${UNAME_RELEASE} 1303 | exit ;; 1304 | NSR-?:NONSTOP_KERNEL:*:*) 1305 | echo nsr-tandem-nsk${UNAME_RELEASE} 1306 | exit ;; 1307 | *:NonStop-UX:*:*) 1308 | echo mips-compaq-nonstopux 1309 | exit ;; 1310 | BS2000:POSIX*:*:*) 1311 | echo bs2000-siemens-sysv 1312 | exit ;; 1313 | DS/*:UNIX_System_V:*:*) 1314 | echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} 1315 | exit ;; 1316 | *:Plan9:*:*) 1317 | # "uname -m" is not consistent, so use $cputype instead. 386 1318 | # is converted to i386 for consistency with other x86 1319 | # operating systems. 1320 | if test "$cputype" = "386"; then 1321 | UNAME_MACHINE=i386 1322 | else 1323 | UNAME_MACHINE="$cputype" 1324 | fi 1325 | echo ${UNAME_MACHINE}-unknown-plan9 1326 | exit ;; 1327 | *:TOPS-10:*:*) 1328 | echo pdp10-unknown-tops10 1329 | exit ;; 1330 | *:TENEX:*:*) 1331 | echo pdp10-unknown-tenex 1332 | exit ;; 1333 | KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) 1334 | echo pdp10-dec-tops20 1335 | exit ;; 1336 | XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) 1337 | echo pdp10-xkl-tops20 1338 | exit ;; 1339 | *:TOPS-20:*:*) 1340 | echo pdp10-unknown-tops20 1341 | exit ;; 1342 | *:ITS:*:*) 1343 | echo pdp10-unknown-its 1344 | exit ;; 1345 | SEI:*:*:SEIUX) 1346 | echo mips-sei-seiux${UNAME_RELEASE} 1347 | exit ;; 1348 | *:DragonFly:*:*) 1349 | echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 1350 | exit ;; 1351 | *:*VMS:*:*) 1352 | UNAME_MACHINE=`(uname -p) 2>/dev/null` 1353 | case "${UNAME_MACHINE}" in 1354 | A*) echo alpha-dec-vms ; exit ;; 1355 | I*) echo ia64-dec-vms ; exit ;; 1356 | V*) echo vax-dec-vms ; exit ;; 1357 | esac ;; 1358 | *:XENIX:*:SysV) 1359 | echo i386-pc-xenix 1360 | exit ;; 1361 | i*86:skyos:*:*) 1362 | echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' 1363 | exit ;; 1364 | i*86:rdos:*:*) 1365 | echo ${UNAME_MACHINE}-pc-rdos 1366 | exit ;; 1367 | i*86:AROS:*:*) 1368 | echo ${UNAME_MACHINE}-pc-aros 1369 | exit ;; 1370 | x86_64:VMkernel:*:*) 1371 | echo ${UNAME_MACHINE}-unknown-esx 1372 | exit ;; 1373 | esac 1374 | 1375 | cat >&2 < in order to provide the needed 1389 | information to handle your system. 1390 | 1391 | config.guess timestamp = $timestamp 1392 | 1393 | uname -m = `(uname -m) 2>/dev/null || echo unknown` 1394 | uname -r = `(uname -r) 2>/dev/null || echo unknown` 1395 | uname -s = `(uname -s) 2>/dev/null || echo unknown` 1396 | uname -v = `(uname -v) 2>/dev/null || echo unknown` 1397 | 1398 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` 1399 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null` 1400 | 1401 | hostinfo = `(hostinfo) 2>/dev/null` 1402 | /bin/universe = `(/bin/universe) 2>/dev/null` 1403 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` 1404 | /bin/arch = `(/bin/arch) 2>/dev/null` 1405 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` 1406 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` 1407 | 1408 | UNAME_MACHINE = ${UNAME_MACHINE} 1409 | UNAME_RELEASE = ${UNAME_RELEASE} 1410 | UNAME_SYSTEM = ${UNAME_SYSTEM} 1411 | UNAME_VERSION = ${UNAME_VERSION} 1412 | EOF 1413 | 1414 | exit 1 1415 | 1416 | # Local variables: 1417 | # eval: (add-hook 'write-file-hooks 'time-stamp) 1418 | # time-stamp-start: "timestamp='" 1419 | # time-stamp-format: "%:y-%02m-%02d" 1420 | # time-stamp-end: "'" 1421 | # End: 1422 | -------------------------------------------------------------------------------- /config.sub: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Configuration validation subroutine script. 3 | # Copyright 1992-2014 Free Software Foundation, Inc. 4 | 5 | timestamp='2014-12-03' 6 | 7 | # This file is free software; you can redistribute it and/or modify it 8 | # under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation; either version 3 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, but 13 | # WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | # General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program; if not, see . 19 | # 20 | # As a special exception to the GNU General Public License, if you 21 | # distribute this file as part of a program that contains a 22 | # configuration script generated by Autoconf, you may include it under 23 | # the same distribution terms that you use for the rest of that 24 | # program. This Exception is an additional permission under section 7 25 | # of the GNU General Public License, version 3 ("GPLv3"). 26 | 27 | 28 | # Please send patches to . 29 | # 30 | # Configuration subroutine to validate and canonicalize a configuration type. 31 | # Supply the specified configuration type as an argument. 32 | # If it is invalid, we print an error message on stderr and exit with code 1. 33 | # Otherwise, we print the canonical config type on stdout and succeed. 34 | 35 | # You can get the latest version of this script from: 36 | # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD 37 | 38 | # This file is supposed to be the same for all GNU packages 39 | # and recognize all the CPU types, system types and aliases 40 | # that are meaningful with *any* GNU software. 41 | # Each package is responsible for reporting which valid configurations 42 | # it does not support. The user should be able to distinguish 43 | # a failure to support a valid configuration from a meaningless 44 | # configuration. 45 | 46 | # The goal of this file is to map all the various variations of a given 47 | # machine specification into a single specification in the form: 48 | # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM 49 | # or in some cases, the newer four-part form: 50 | # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM 51 | # It is wrong to echo any other type of specification. 52 | 53 | me=`echo "$0" | sed -e 's,.*/,,'` 54 | 55 | usage="\ 56 | Usage: $0 [OPTION] CPU-MFR-OPSYS 57 | $0 [OPTION] ALIAS 58 | 59 | Canonicalize a configuration name. 60 | 61 | Operation modes: 62 | -h, --help print this help, then exit 63 | -t, --time-stamp print date of last modification, then exit 64 | -v, --version print version number, then exit 65 | 66 | Report bugs and patches to ." 67 | 68 | version="\ 69 | GNU config.sub ($timestamp) 70 | 71 | Copyright 1992-2014 Free Software Foundation, Inc. 72 | 73 | This is free software; see the source for copying conditions. There is NO 74 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 75 | 76 | help=" 77 | Try \`$me --help' for more information." 78 | 79 | # Parse command line 80 | while test $# -gt 0 ; do 81 | case $1 in 82 | --time-stamp | --time* | -t ) 83 | echo "$timestamp" ; exit ;; 84 | --version | -v ) 85 | echo "$version" ; exit ;; 86 | --help | --h* | -h ) 87 | echo "$usage"; exit ;; 88 | -- ) # Stop option processing 89 | shift; break ;; 90 | - ) # Use stdin as input. 91 | break ;; 92 | -* ) 93 | echo "$me: invalid option $1$help" 94 | exit 1 ;; 95 | 96 | *local*) 97 | # First pass through any local machine types. 98 | echo $1 99 | exit ;; 100 | 101 | * ) 102 | break ;; 103 | esac 104 | done 105 | 106 | case $# in 107 | 0) echo "$me: missing argument$help" >&2 108 | exit 1;; 109 | 1) ;; 110 | *) echo "$me: too many arguments$help" >&2 111 | exit 1;; 112 | esac 113 | 114 | # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). 115 | # Here we must recognize all the valid KERNEL-OS combinations. 116 | maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` 117 | case $maybe_os in 118 | nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ 119 | linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ 120 | knetbsd*-gnu* | netbsd*-gnu* | \ 121 | kopensolaris*-gnu* | \ 122 | storm-chaos* | os2-emx* | rtmk-nova*) 123 | os=-$maybe_os 124 | basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` 125 | ;; 126 | android-linux) 127 | os=-linux-android 128 | basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown 129 | ;; 130 | *) 131 | basic_machine=`echo $1 | sed 's/-[^-]*$//'` 132 | if [ $basic_machine != $1 ] 133 | then os=`echo $1 | sed 's/.*-/-/'` 134 | else os=; fi 135 | ;; 136 | esac 137 | 138 | ### Let's recognize common machines as not being operating systems so 139 | ### that things like config.sub decstation-3100 work. We also 140 | ### recognize some manufacturers as not being operating systems, so we 141 | ### can provide default operating systems below. 142 | case $os in 143 | -sun*os*) 144 | # Prevent following clause from handling this invalid input. 145 | ;; 146 | -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ 147 | -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ 148 | -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ 149 | -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ 150 | -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ 151 | -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ 152 | -apple | -axis | -knuth | -cray | -microblaze*) 153 | os= 154 | basic_machine=$1 155 | ;; 156 | -bluegene*) 157 | os=-cnk 158 | ;; 159 | -sim | -cisco | -oki | -wec | -winbond) 160 | os= 161 | basic_machine=$1 162 | ;; 163 | -scout) 164 | ;; 165 | -wrs) 166 | os=-vxworks 167 | basic_machine=$1 168 | ;; 169 | -chorusos*) 170 | os=-chorusos 171 | basic_machine=$1 172 | ;; 173 | -chorusrdb) 174 | os=-chorusrdb 175 | basic_machine=$1 176 | ;; 177 | -hiux*) 178 | os=-hiuxwe2 179 | ;; 180 | -sco6) 181 | os=-sco5v6 182 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 183 | ;; 184 | -sco5) 185 | os=-sco3.2v5 186 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 187 | ;; 188 | -sco4) 189 | os=-sco3.2v4 190 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 191 | ;; 192 | -sco3.2.[4-9]*) 193 | os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` 194 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 195 | ;; 196 | -sco3.2v[4-9]*) 197 | # Don't forget version if it is 3.2v4 or newer. 198 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 199 | ;; 200 | -sco5v6*) 201 | # Don't forget version if it is 3.2v4 or newer. 202 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 203 | ;; 204 | -sco*) 205 | os=-sco3.2v2 206 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 207 | ;; 208 | -udk*) 209 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 210 | ;; 211 | -isc) 212 | os=-isc2.2 213 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 214 | ;; 215 | -clix*) 216 | basic_machine=clipper-intergraph 217 | ;; 218 | -isc*) 219 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 220 | ;; 221 | -lynx*178) 222 | os=-lynxos178 223 | ;; 224 | -lynx*5) 225 | os=-lynxos5 226 | ;; 227 | -lynx*) 228 | os=-lynxos 229 | ;; 230 | -ptx*) 231 | basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` 232 | ;; 233 | -windowsnt*) 234 | os=`echo $os | sed -e 's/windowsnt/winnt/'` 235 | ;; 236 | -psos*) 237 | os=-psos 238 | ;; 239 | -mint | -mint[0-9]*) 240 | basic_machine=m68k-atari 241 | os=-mint 242 | ;; 243 | esac 244 | 245 | # Decode aliases for certain CPU-COMPANY combinations. 246 | case $basic_machine in 247 | # Recognize the basic CPU types without company name. 248 | # Some are omitted here because they have special meanings below. 249 | 1750a | 580 \ 250 | | a29k \ 251 | | aarch64 | aarch64_be \ 252 | | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ 253 | | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ 254 | | am33_2.0 \ 255 | | arc | arceb \ 256 | | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ 257 | | avr | avr32 \ 258 | | be32 | be64 \ 259 | | bfin \ 260 | | c4x | c8051 | clipper \ 261 | | d10v | d30v | dlx | dsp16xx \ 262 | | epiphany \ 263 | | fido | fr30 | frv \ 264 | | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ 265 | | hexagon \ 266 | | i370 | i860 | i960 | ia64 \ 267 | | ip2k | iq2000 \ 268 | | k1om \ 269 | | le32 | le64 \ 270 | | lm32 \ 271 | | m32c | m32r | m32rle | m68000 | m68k | m88k \ 272 | | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ 273 | | mips | mipsbe | mipseb | mipsel | mipsle \ 274 | | mips16 \ 275 | | mips64 | mips64el \ 276 | | mips64octeon | mips64octeonel \ 277 | | mips64orion | mips64orionel \ 278 | | mips64r5900 | mips64r5900el \ 279 | | mips64vr | mips64vrel \ 280 | | mips64vr4100 | mips64vr4100el \ 281 | | mips64vr4300 | mips64vr4300el \ 282 | | mips64vr5000 | mips64vr5000el \ 283 | | mips64vr5900 | mips64vr5900el \ 284 | | mipsisa32 | mipsisa32el \ 285 | | mipsisa32r2 | mipsisa32r2el \ 286 | | mipsisa32r6 | mipsisa32r6el \ 287 | | mipsisa64 | mipsisa64el \ 288 | | mipsisa64r2 | mipsisa64r2el \ 289 | | mipsisa64r6 | mipsisa64r6el \ 290 | | mipsisa64sb1 | mipsisa64sb1el \ 291 | | mipsisa64sr71k | mipsisa64sr71kel \ 292 | | mipsr5900 | mipsr5900el \ 293 | | mipstx39 | mipstx39el \ 294 | | mn10200 | mn10300 \ 295 | | moxie \ 296 | | mt \ 297 | | msp430 \ 298 | | nds32 | nds32le | nds32be \ 299 | | nios | nios2 | nios2eb | nios2el \ 300 | | ns16k | ns32k \ 301 | | open8 | or1k | or1knd | or32 \ 302 | | pdp10 | pdp11 | pj | pjl \ 303 | | powerpc | powerpc64 | powerpc64le | powerpcle \ 304 | | pyramid \ 305 | | riscv32 | riscv64 \ 306 | | rl78 | rx \ 307 | | score \ 308 | | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ 309 | | sh64 | sh64le \ 310 | | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ 311 | | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ 312 | | spu \ 313 | | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ 314 | | ubicom32 \ 315 | | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ 316 | | visium \ 317 | | we32k \ 318 | | x86 | xc16x | xstormy16 | xtensa \ 319 | | z8k | z80) 320 | basic_machine=$basic_machine-unknown 321 | ;; 322 | c54x) 323 | basic_machine=tic54x-unknown 324 | ;; 325 | c55x) 326 | basic_machine=tic55x-unknown 327 | ;; 328 | c6x) 329 | basic_machine=tic6x-unknown 330 | ;; 331 | leon|leon[3-9]) 332 | basic_machine=sparc-$basic_machine 333 | ;; 334 | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) 335 | basic_machine=$basic_machine-unknown 336 | os=-none 337 | ;; 338 | m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) 339 | ;; 340 | ms1) 341 | basic_machine=mt-unknown 342 | ;; 343 | 344 | strongarm | thumb | xscale) 345 | basic_machine=arm-unknown 346 | ;; 347 | xgate) 348 | basic_machine=$basic_machine-unknown 349 | os=-none 350 | ;; 351 | xscaleeb) 352 | basic_machine=armeb-unknown 353 | ;; 354 | 355 | xscaleel) 356 | basic_machine=armel-unknown 357 | ;; 358 | 359 | # We use `pc' rather than `unknown' 360 | # because (1) that's what they normally are, and 361 | # (2) the word "unknown" tends to confuse beginning users. 362 | i*86 | x86_64) 363 | basic_machine=$basic_machine-pc 364 | ;; 365 | # Object if more than one company name word. 366 | *-*-*) 367 | echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 368 | exit 1 369 | ;; 370 | # Recognize the basic CPU types with company name. 371 | 580-* \ 372 | | a29k-* \ 373 | | aarch64-* | aarch64_be-* \ 374 | | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ 375 | | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ 376 | | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ 377 | | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ 378 | | avr-* | avr32-* \ 379 | | be32-* | be64-* \ 380 | | bfin-* | bs2000-* \ 381 | | c[123]* | c30-* | [cjt]90-* | c4x-* \ 382 | | c8051-* | clipper-* | craynv-* | cydra-* \ 383 | | d10v-* | d30v-* | dlx-* \ 384 | | elxsi-* \ 385 | | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ 386 | | h8300-* | h8500-* \ 387 | | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ 388 | | hexagon-* \ 389 | | i*86-* | i860-* | i960-* | ia64-* \ 390 | | ip2k-* | iq2000-* \ 391 | | k1om-* \ 392 | | le32-* | le64-* \ 393 | | lm32-* \ 394 | | m32c-* | m32r-* | m32rle-* \ 395 | | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ 396 | | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ 397 | | microblaze-* | microblazeel-* \ 398 | | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ 399 | | mips16-* \ 400 | | mips64-* | mips64el-* \ 401 | | mips64octeon-* | mips64octeonel-* \ 402 | | mips64orion-* | mips64orionel-* \ 403 | | mips64r5900-* | mips64r5900el-* \ 404 | | mips64vr-* | mips64vrel-* \ 405 | | mips64vr4100-* | mips64vr4100el-* \ 406 | | mips64vr4300-* | mips64vr4300el-* \ 407 | | mips64vr5000-* | mips64vr5000el-* \ 408 | | mips64vr5900-* | mips64vr5900el-* \ 409 | | mipsisa32-* | mipsisa32el-* \ 410 | | mipsisa32r2-* | mipsisa32r2el-* \ 411 | | mipsisa32r6-* | mipsisa32r6el-* \ 412 | | mipsisa64-* | mipsisa64el-* \ 413 | | mipsisa64r2-* | mipsisa64r2el-* \ 414 | | mipsisa64r6-* | mipsisa64r6el-* \ 415 | | mipsisa64sb1-* | mipsisa64sb1el-* \ 416 | | mipsisa64sr71k-* | mipsisa64sr71kel-* \ 417 | | mipsr5900-* | mipsr5900el-* \ 418 | | mipstx39-* | mipstx39el-* \ 419 | | mmix-* \ 420 | | mt-* \ 421 | | msp430-* \ 422 | | nds32-* | nds32le-* | nds32be-* \ 423 | | nios-* | nios2-* | nios2eb-* | nios2el-* \ 424 | | none-* | np1-* | ns16k-* | ns32k-* \ 425 | | open8-* \ 426 | | or1k*-* \ 427 | | orion-* \ 428 | | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ 429 | | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ 430 | | pyramid-* \ 431 | | rl78-* | romp-* | rs6000-* | rx-* \ 432 | | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ 433 | | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ 434 | | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ 435 | | sparclite-* \ 436 | | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ 437 | | tahoe-* \ 438 | | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ 439 | | tile*-* \ 440 | | tron-* \ 441 | | ubicom32-* \ 442 | | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ 443 | | vax-* \ 444 | | visium-* \ 445 | | we32k-* \ 446 | | x86-* | x86_64-* | xc16x-* | xps100-* \ 447 | | xstormy16-* | xtensa*-* \ 448 | | ymp-* \ 449 | | z8k-* | z80-*) 450 | ;; 451 | # Recognize the basic CPU types without company name, with glob match. 452 | xtensa*) 453 | basic_machine=$basic_machine-unknown 454 | ;; 455 | # Recognize the various machine names and aliases which stand 456 | # for a CPU type and a company and sometimes even an OS. 457 | 386bsd) 458 | basic_machine=i386-unknown 459 | os=-bsd 460 | ;; 461 | 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) 462 | basic_machine=m68000-att 463 | ;; 464 | 3b*) 465 | basic_machine=we32k-att 466 | ;; 467 | a29khif) 468 | basic_machine=a29k-amd 469 | os=-udi 470 | ;; 471 | abacus) 472 | basic_machine=abacus-unknown 473 | ;; 474 | adobe68k) 475 | basic_machine=m68010-adobe 476 | os=-scout 477 | ;; 478 | alliant | fx80) 479 | basic_machine=fx80-alliant 480 | ;; 481 | altos | altos3068) 482 | basic_machine=m68k-altos 483 | ;; 484 | am29k) 485 | basic_machine=a29k-none 486 | os=-bsd 487 | ;; 488 | amd64) 489 | basic_machine=x86_64-pc 490 | ;; 491 | amd64-*) 492 | basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` 493 | ;; 494 | amdahl) 495 | basic_machine=580-amdahl 496 | os=-sysv 497 | ;; 498 | amiga | amiga-*) 499 | basic_machine=m68k-unknown 500 | ;; 501 | amigaos | amigados) 502 | basic_machine=m68k-unknown 503 | os=-amigaos 504 | ;; 505 | amigaunix | amix) 506 | basic_machine=m68k-unknown 507 | os=-sysv4 508 | ;; 509 | apollo68) 510 | basic_machine=m68k-apollo 511 | os=-sysv 512 | ;; 513 | apollo68bsd) 514 | basic_machine=m68k-apollo 515 | os=-bsd 516 | ;; 517 | aros) 518 | basic_machine=i386-pc 519 | os=-aros 520 | ;; 521 | aux) 522 | basic_machine=m68k-apple 523 | os=-aux 524 | ;; 525 | balance) 526 | basic_machine=ns32k-sequent 527 | os=-dynix 528 | ;; 529 | blackfin) 530 | basic_machine=bfin-unknown 531 | os=-linux 532 | ;; 533 | blackfin-*) 534 | basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` 535 | os=-linux 536 | ;; 537 | bluegene*) 538 | basic_machine=powerpc-ibm 539 | os=-cnk 540 | ;; 541 | c54x-*) 542 | basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` 543 | ;; 544 | c55x-*) 545 | basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` 546 | ;; 547 | c6x-*) 548 | basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` 549 | ;; 550 | c90) 551 | basic_machine=c90-cray 552 | os=-unicos 553 | ;; 554 | cegcc) 555 | basic_machine=arm-unknown 556 | os=-cegcc 557 | ;; 558 | convex-c1) 559 | basic_machine=c1-convex 560 | os=-bsd 561 | ;; 562 | convex-c2) 563 | basic_machine=c2-convex 564 | os=-bsd 565 | ;; 566 | convex-c32) 567 | basic_machine=c32-convex 568 | os=-bsd 569 | ;; 570 | convex-c34) 571 | basic_machine=c34-convex 572 | os=-bsd 573 | ;; 574 | convex-c38) 575 | basic_machine=c38-convex 576 | os=-bsd 577 | ;; 578 | cray | j90) 579 | basic_machine=j90-cray 580 | os=-unicos 581 | ;; 582 | craynv) 583 | basic_machine=craynv-cray 584 | os=-unicosmp 585 | ;; 586 | cr16 | cr16-*) 587 | basic_machine=cr16-unknown 588 | os=-elf 589 | ;; 590 | crds | unos) 591 | basic_machine=m68k-crds 592 | ;; 593 | crisv32 | crisv32-* | etraxfs*) 594 | basic_machine=crisv32-axis 595 | ;; 596 | cris | cris-* | etrax*) 597 | basic_machine=cris-axis 598 | ;; 599 | crx) 600 | basic_machine=crx-unknown 601 | os=-elf 602 | ;; 603 | da30 | da30-*) 604 | basic_machine=m68k-da30 605 | ;; 606 | decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) 607 | basic_machine=mips-dec 608 | ;; 609 | decsystem10* | dec10*) 610 | basic_machine=pdp10-dec 611 | os=-tops10 612 | ;; 613 | decsystem20* | dec20*) 614 | basic_machine=pdp10-dec 615 | os=-tops20 616 | ;; 617 | delta | 3300 | motorola-3300 | motorola-delta \ 618 | | 3300-motorola | delta-motorola) 619 | basic_machine=m68k-motorola 620 | ;; 621 | delta88) 622 | basic_machine=m88k-motorola 623 | os=-sysv3 624 | ;; 625 | dicos) 626 | basic_machine=i686-pc 627 | os=-dicos 628 | ;; 629 | djgpp) 630 | basic_machine=i586-pc 631 | os=-msdosdjgpp 632 | ;; 633 | dpx20 | dpx20-*) 634 | basic_machine=rs6000-bull 635 | os=-bosx 636 | ;; 637 | dpx2* | dpx2*-bull) 638 | basic_machine=m68k-bull 639 | os=-sysv3 640 | ;; 641 | ebmon29k) 642 | basic_machine=a29k-amd 643 | os=-ebmon 644 | ;; 645 | elxsi) 646 | basic_machine=elxsi-elxsi 647 | os=-bsd 648 | ;; 649 | encore | umax | mmax) 650 | basic_machine=ns32k-encore 651 | ;; 652 | es1800 | OSE68k | ose68k | ose | OSE) 653 | basic_machine=m68k-ericsson 654 | os=-ose 655 | ;; 656 | fx2800) 657 | basic_machine=i860-alliant 658 | ;; 659 | genix) 660 | basic_machine=ns32k-ns 661 | ;; 662 | gmicro) 663 | basic_machine=tron-gmicro 664 | os=-sysv 665 | ;; 666 | go32) 667 | basic_machine=i386-pc 668 | os=-go32 669 | ;; 670 | h3050r* | hiux*) 671 | basic_machine=hppa1.1-hitachi 672 | os=-hiuxwe2 673 | ;; 674 | h8300hms) 675 | basic_machine=h8300-hitachi 676 | os=-hms 677 | ;; 678 | h8300xray) 679 | basic_machine=h8300-hitachi 680 | os=-xray 681 | ;; 682 | h8500hms) 683 | basic_machine=h8500-hitachi 684 | os=-hms 685 | ;; 686 | harris) 687 | basic_machine=m88k-harris 688 | os=-sysv3 689 | ;; 690 | hp300-*) 691 | basic_machine=m68k-hp 692 | ;; 693 | hp300bsd) 694 | basic_machine=m68k-hp 695 | os=-bsd 696 | ;; 697 | hp300hpux) 698 | basic_machine=m68k-hp 699 | os=-hpux 700 | ;; 701 | hp3k9[0-9][0-9] | hp9[0-9][0-9]) 702 | basic_machine=hppa1.0-hp 703 | ;; 704 | hp9k2[0-9][0-9] | hp9k31[0-9]) 705 | basic_machine=m68000-hp 706 | ;; 707 | hp9k3[2-9][0-9]) 708 | basic_machine=m68k-hp 709 | ;; 710 | hp9k6[0-9][0-9] | hp6[0-9][0-9]) 711 | basic_machine=hppa1.0-hp 712 | ;; 713 | hp9k7[0-79][0-9] | hp7[0-79][0-9]) 714 | basic_machine=hppa1.1-hp 715 | ;; 716 | hp9k78[0-9] | hp78[0-9]) 717 | # FIXME: really hppa2.0-hp 718 | basic_machine=hppa1.1-hp 719 | ;; 720 | hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) 721 | # FIXME: really hppa2.0-hp 722 | basic_machine=hppa1.1-hp 723 | ;; 724 | hp9k8[0-9][13679] | hp8[0-9][13679]) 725 | basic_machine=hppa1.1-hp 726 | ;; 727 | hp9k8[0-9][0-9] | hp8[0-9][0-9]) 728 | basic_machine=hppa1.0-hp 729 | ;; 730 | hppa-next) 731 | os=-nextstep3 732 | ;; 733 | hppaosf) 734 | basic_machine=hppa1.1-hp 735 | os=-osf 736 | ;; 737 | hppro) 738 | basic_machine=hppa1.1-hp 739 | os=-proelf 740 | ;; 741 | i370-ibm* | ibm*) 742 | basic_machine=i370-ibm 743 | ;; 744 | i*86v32) 745 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 746 | os=-sysv32 747 | ;; 748 | i*86v4*) 749 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 750 | os=-sysv4 751 | ;; 752 | i*86v) 753 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 754 | os=-sysv 755 | ;; 756 | i*86sol2) 757 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 758 | os=-solaris2 759 | ;; 760 | i386mach) 761 | basic_machine=i386-mach 762 | os=-mach 763 | ;; 764 | i386-vsta | vsta) 765 | basic_machine=i386-unknown 766 | os=-vsta 767 | ;; 768 | iris | iris4d) 769 | basic_machine=mips-sgi 770 | case $os in 771 | -irix*) 772 | ;; 773 | *) 774 | os=-irix4 775 | ;; 776 | esac 777 | ;; 778 | isi68 | isi) 779 | basic_machine=m68k-isi 780 | os=-sysv 781 | ;; 782 | leon-*|leon[3-9]-*) 783 | basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` 784 | ;; 785 | m68knommu) 786 | basic_machine=m68k-unknown 787 | os=-linux 788 | ;; 789 | m68knommu-*) 790 | basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` 791 | os=-linux 792 | ;; 793 | m88k-omron*) 794 | basic_machine=m88k-omron 795 | ;; 796 | magnum | m3230) 797 | basic_machine=mips-mips 798 | os=-sysv 799 | ;; 800 | merlin) 801 | basic_machine=ns32k-utek 802 | os=-sysv 803 | ;; 804 | microblaze*) 805 | basic_machine=microblaze-xilinx 806 | ;; 807 | mingw64) 808 | basic_machine=x86_64-pc 809 | os=-mingw64 810 | ;; 811 | mingw32) 812 | basic_machine=i686-pc 813 | os=-mingw32 814 | ;; 815 | mingw32ce) 816 | basic_machine=arm-unknown 817 | os=-mingw32ce 818 | ;; 819 | miniframe) 820 | basic_machine=m68000-convergent 821 | ;; 822 | *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) 823 | basic_machine=m68k-atari 824 | os=-mint 825 | ;; 826 | mips3*-*) 827 | basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` 828 | ;; 829 | mips3*) 830 | basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown 831 | ;; 832 | monitor) 833 | basic_machine=m68k-rom68k 834 | os=-coff 835 | ;; 836 | morphos) 837 | basic_machine=powerpc-unknown 838 | os=-morphos 839 | ;; 840 | moxiebox) 841 | basic_machine=moxie-unknown 842 | os=-moxiebox 843 | ;; 844 | msdos) 845 | basic_machine=i386-pc 846 | os=-msdos 847 | ;; 848 | ms1-*) 849 | basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` 850 | ;; 851 | msys) 852 | basic_machine=i686-pc 853 | os=-msys 854 | ;; 855 | mvs) 856 | basic_machine=i370-ibm 857 | os=-mvs 858 | ;; 859 | nacl) 860 | basic_machine=le32-unknown 861 | os=-nacl 862 | ;; 863 | ncr3000) 864 | basic_machine=i486-ncr 865 | os=-sysv4 866 | ;; 867 | netbsd386) 868 | basic_machine=i386-unknown 869 | os=-netbsd 870 | ;; 871 | netwinder) 872 | basic_machine=armv4l-rebel 873 | os=-linux 874 | ;; 875 | news | news700 | news800 | news900) 876 | basic_machine=m68k-sony 877 | os=-newsos 878 | ;; 879 | news1000) 880 | basic_machine=m68030-sony 881 | os=-newsos 882 | ;; 883 | news-3600 | risc-news) 884 | basic_machine=mips-sony 885 | os=-newsos 886 | ;; 887 | necv70) 888 | basic_machine=v70-nec 889 | os=-sysv 890 | ;; 891 | next | m*-next ) 892 | basic_machine=m68k-next 893 | case $os in 894 | -nextstep* ) 895 | ;; 896 | -ns2*) 897 | os=-nextstep2 898 | ;; 899 | *) 900 | os=-nextstep3 901 | ;; 902 | esac 903 | ;; 904 | nh3000) 905 | basic_machine=m68k-harris 906 | os=-cxux 907 | ;; 908 | nh[45]000) 909 | basic_machine=m88k-harris 910 | os=-cxux 911 | ;; 912 | nindy960) 913 | basic_machine=i960-intel 914 | os=-nindy 915 | ;; 916 | mon960) 917 | basic_machine=i960-intel 918 | os=-mon960 919 | ;; 920 | nonstopux) 921 | basic_machine=mips-compaq 922 | os=-nonstopux 923 | ;; 924 | np1) 925 | basic_machine=np1-gould 926 | ;; 927 | neo-tandem) 928 | basic_machine=neo-tandem 929 | ;; 930 | nse-tandem) 931 | basic_machine=nse-tandem 932 | ;; 933 | nsr-tandem) 934 | basic_machine=nsr-tandem 935 | ;; 936 | op50n-* | op60c-*) 937 | basic_machine=hppa1.1-oki 938 | os=-proelf 939 | ;; 940 | openrisc | openrisc-*) 941 | basic_machine=or32-unknown 942 | ;; 943 | os400) 944 | basic_machine=powerpc-ibm 945 | os=-os400 946 | ;; 947 | OSE68000 | ose68000) 948 | basic_machine=m68000-ericsson 949 | os=-ose 950 | ;; 951 | os68k) 952 | basic_machine=m68k-none 953 | os=-os68k 954 | ;; 955 | pa-hitachi) 956 | basic_machine=hppa1.1-hitachi 957 | os=-hiuxwe2 958 | ;; 959 | paragon) 960 | basic_machine=i860-intel 961 | os=-osf 962 | ;; 963 | parisc) 964 | basic_machine=hppa-unknown 965 | os=-linux 966 | ;; 967 | parisc-*) 968 | basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` 969 | os=-linux 970 | ;; 971 | pbd) 972 | basic_machine=sparc-tti 973 | ;; 974 | pbb) 975 | basic_machine=m68k-tti 976 | ;; 977 | pc532 | pc532-*) 978 | basic_machine=ns32k-pc532 979 | ;; 980 | pc98) 981 | basic_machine=i386-pc 982 | ;; 983 | pc98-*) 984 | basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` 985 | ;; 986 | pentium | p5 | k5 | k6 | nexgen | viac3) 987 | basic_machine=i586-pc 988 | ;; 989 | pentiumpro | p6 | 6x86 | athlon | athlon_*) 990 | basic_machine=i686-pc 991 | ;; 992 | pentiumii | pentium2 | pentiumiii | pentium3) 993 | basic_machine=i686-pc 994 | ;; 995 | pentium4) 996 | basic_machine=i786-pc 997 | ;; 998 | pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) 999 | basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` 1000 | ;; 1001 | pentiumpro-* | p6-* | 6x86-* | athlon-*) 1002 | basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 1003 | ;; 1004 | pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) 1005 | basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 1006 | ;; 1007 | pentium4-*) 1008 | basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` 1009 | ;; 1010 | pn) 1011 | basic_machine=pn-gould 1012 | ;; 1013 | power) basic_machine=power-ibm 1014 | ;; 1015 | ppc | ppcbe) basic_machine=powerpc-unknown 1016 | ;; 1017 | ppc-* | ppcbe-*) 1018 | basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` 1019 | ;; 1020 | ppcle | powerpclittle | ppc-le | powerpc-little) 1021 | basic_machine=powerpcle-unknown 1022 | ;; 1023 | ppcle-* | powerpclittle-*) 1024 | basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` 1025 | ;; 1026 | ppc64) basic_machine=powerpc64-unknown 1027 | ;; 1028 | ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` 1029 | ;; 1030 | ppc64le | powerpc64little | ppc64-le | powerpc64-little) 1031 | basic_machine=powerpc64le-unknown 1032 | ;; 1033 | ppc64le-* | powerpc64little-*) 1034 | basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` 1035 | ;; 1036 | ps2) 1037 | basic_machine=i386-ibm 1038 | ;; 1039 | pw32) 1040 | basic_machine=i586-unknown 1041 | os=-pw32 1042 | ;; 1043 | rdos | rdos64) 1044 | basic_machine=x86_64-pc 1045 | os=-rdos 1046 | ;; 1047 | rdos32) 1048 | basic_machine=i386-pc 1049 | os=-rdos 1050 | ;; 1051 | rom68k) 1052 | basic_machine=m68k-rom68k 1053 | os=-coff 1054 | ;; 1055 | rm[46]00) 1056 | basic_machine=mips-siemens 1057 | ;; 1058 | rtpc | rtpc-*) 1059 | basic_machine=romp-ibm 1060 | ;; 1061 | s390 | s390-*) 1062 | basic_machine=s390-ibm 1063 | ;; 1064 | s390x | s390x-*) 1065 | basic_machine=s390x-ibm 1066 | ;; 1067 | sa29200) 1068 | basic_machine=a29k-amd 1069 | os=-udi 1070 | ;; 1071 | sb1) 1072 | basic_machine=mipsisa64sb1-unknown 1073 | ;; 1074 | sb1el) 1075 | basic_machine=mipsisa64sb1el-unknown 1076 | ;; 1077 | sde) 1078 | basic_machine=mipsisa32-sde 1079 | os=-elf 1080 | ;; 1081 | sei) 1082 | basic_machine=mips-sei 1083 | os=-seiux 1084 | ;; 1085 | sequent) 1086 | basic_machine=i386-sequent 1087 | ;; 1088 | sh) 1089 | basic_machine=sh-hitachi 1090 | os=-hms 1091 | ;; 1092 | sh5el) 1093 | basic_machine=sh5le-unknown 1094 | ;; 1095 | sh64) 1096 | basic_machine=sh64-unknown 1097 | ;; 1098 | sparclite-wrs | simso-wrs) 1099 | basic_machine=sparclite-wrs 1100 | os=-vxworks 1101 | ;; 1102 | sps7) 1103 | basic_machine=m68k-bull 1104 | os=-sysv2 1105 | ;; 1106 | spur) 1107 | basic_machine=spur-unknown 1108 | ;; 1109 | st2000) 1110 | basic_machine=m68k-tandem 1111 | ;; 1112 | stratus) 1113 | basic_machine=i860-stratus 1114 | os=-sysv4 1115 | ;; 1116 | strongarm-* | thumb-*) 1117 | basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` 1118 | ;; 1119 | sun2) 1120 | basic_machine=m68000-sun 1121 | ;; 1122 | sun2os3) 1123 | basic_machine=m68000-sun 1124 | os=-sunos3 1125 | ;; 1126 | sun2os4) 1127 | basic_machine=m68000-sun 1128 | os=-sunos4 1129 | ;; 1130 | sun3os3) 1131 | basic_machine=m68k-sun 1132 | os=-sunos3 1133 | ;; 1134 | sun3os4) 1135 | basic_machine=m68k-sun 1136 | os=-sunos4 1137 | ;; 1138 | sun4os3) 1139 | basic_machine=sparc-sun 1140 | os=-sunos3 1141 | ;; 1142 | sun4os4) 1143 | basic_machine=sparc-sun 1144 | os=-sunos4 1145 | ;; 1146 | sun4sol2) 1147 | basic_machine=sparc-sun 1148 | os=-solaris2 1149 | ;; 1150 | sun3 | sun3-*) 1151 | basic_machine=m68k-sun 1152 | ;; 1153 | sun4) 1154 | basic_machine=sparc-sun 1155 | ;; 1156 | sun386 | sun386i | roadrunner) 1157 | basic_machine=i386-sun 1158 | ;; 1159 | sv1) 1160 | basic_machine=sv1-cray 1161 | os=-unicos 1162 | ;; 1163 | symmetry) 1164 | basic_machine=i386-sequent 1165 | os=-dynix 1166 | ;; 1167 | t3e) 1168 | basic_machine=alphaev5-cray 1169 | os=-unicos 1170 | ;; 1171 | t90) 1172 | basic_machine=t90-cray 1173 | os=-unicos 1174 | ;; 1175 | tile*) 1176 | basic_machine=$basic_machine-unknown 1177 | os=-linux-gnu 1178 | ;; 1179 | tx39) 1180 | basic_machine=mipstx39-unknown 1181 | ;; 1182 | tx39el) 1183 | basic_machine=mipstx39el-unknown 1184 | ;; 1185 | toad1) 1186 | basic_machine=pdp10-xkl 1187 | os=-tops20 1188 | ;; 1189 | tower | tower-32) 1190 | basic_machine=m68k-ncr 1191 | ;; 1192 | tpf) 1193 | basic_machine=s390x-ibm 1194 | os=-tpf 1195 | ;; 1196 | udi29k) 1197 | basic_machine=a29k-amd 1198 | os=-udi 1199 | ;; 1200 | ultra3) 1201 | basic_machine=a29k-nyu 1202 | os=-sym1 1203 | ;; 1204 | v810 | necv810) 1205 | basic_machine=v810-nec 1206 | os=-none 1207 | ;; 1208 | vaxv) 1209 | basic_machine=vax-dec 1210 | os=-sysv 1211 | ;; 1212 | vms) 1213 | basic_machine=vax-dec 1214 | os=-vms 1215 | ;; 1216 | vpp*|vx|vx-*) 1217 | basic_machine=f301-fujitsu 1218 | ;; 1219 | vxworks960) 1220 | basic_machine=i960-wrs 1221 | os=-vxworks 1222 | ;; 1223 | vxworks68) 1224 | basic_machine=m68k-wrs 1225 | os=-vxworks 1226 | ;; 1227 | vxworks29k) 1228 | basic_machine=a29k-wrs 1229 | os=-vxworks 1230 | ;; 1231 | w65*) 1232 | basic_machine=w65-wdc 1233 | os=-none 1234 | ;; 1235 | w89k-*) 1236 | basic_machine=hppa1.1-winbond 1237 | os=-proelf 1238 | ;; 1239 | xbox) 1240 | basic_machine=i686-pc 1241 | os=-mingw32 1242 | ;; 1243 | xps | xps100) 1244 | basic_machine=xps100-honeywell 1245 | ;; 1246 | xscale-* | xscalee[bl]-*) 1247 | basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` 1248 | ;; 1249 | ymp) 1250 | basic_machine=ymp-cray 1251 | os=-unicos 1252 | ;; 1253 | z8k-*-coff) 1254 | basic_machine=z8k-unknown 1255 | os=-sim 1256 | ;; 1257 | z80-*-coff) 1258 | basic_machine=z80-unknown 1259 | os=-sim 1260 | ;; 1261 | none) 1262 | basic_machine=none-none 1263 | os=-none 1264 | ;; 1265 | 1266 | # Here we handle the default manufacturer of certain CPU types. It is in 1267 | # some cases the only manufacturer, in others, it is the most popular. 1268 | w89k) 1269 | basic_machine=hppa1.1-winbond 1270 | ;; 1271 | op50n) 1272 | basic_machine=hppa1.1-oki 1273 | ;; 1274 | op60c) 1275 | basic_machine=hppa1.1-oki 1276 | ;; 1277 | romp) 1278 | basic_machine=romp-ibm 1279 | ;; 1280 | mmix) 1281 | basic_machine=mmix-knuth 1282 | ;; 1283 | rs6000) 1284 | basic_machine=rs6000-ibm 1285 | ;; 1286 | vax) 1287 | basic_machine=vax-dec 1288 | ;; 1289 | pdp10) 1290 | # there are many clones, so DEC is not a safe bet 1291 | basic_machine=pdp10-unknown 1292 | ;; 1293 | pdp11) 1294 | basic_machine=pdp11-dec 1295 | ;; 1296 | we32k) 1297 | basic_machine=we32k-att 1298 | ;; 1299 | sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) 1300 | basic_machine=sh-unknown 1301 | ;; 1302 | sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) 1303 | basic_machine=sparc-sun 1304 | ;; 1305 | cydra) 1306 | basic_machine=cydra-cydrome 1307 | ;; 1308 | orion) 1309 | basic_machine=orion-highlevel 1310 | ;; 1311 | orion105) 1312 | basic_machine=clipper-highlevel 1313 | ;; 1314 | mac | mpw | mac-mpw) 1315 | basic_machine=m68k-apple 1316 | ;; 1317 | pmac | pmac-mpw) 1318 | basic_machine=powerpc-apple 1319 | ;; 1320 | *-unknown) 1321 | # Make sure to match an already-canonicalized machine name. 1322 | ;; 1323 | *) 1324 | echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 1325 | exit 1 1326 | ;; 1327 | esac 1328 | 1329 | # Here we canonicalize certain aliases for manufacturers. 1330 | case $basic_machine in 1331 | *-digital*) 1332 | basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` 1333 | ;; 1334 | *-commodore*) 1335 | basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` 1336 | ;; 1337 | *) 1338 | ;; 1339 | esac 1340 | 1341 | # Decode manufacturer-specific aliases for certain operating systems. 1342 | 1343 | if [ x"$os" != x"" ] 1344 | then 1345 | case $os in 1346 | # First match some system type aliases 1347 | # that might get confused with valid system types. 1348 | # -solaris* is a basic system type, with this one exception. 1349 | -auroraux) 1350 | os=-auroraux 1351 | ;; 1352 | -solaris1 | -solaris1.*) 1353 | os=`echo $os | sed -e 's|solaris1|sunos4|'` 1354 | ;; 1355 | -solaris) 1356 | os=-solaris2 1357 | ;; 1358 | -svr4*) 1359 | os=-sysv4 1360 | ;; 1361 | -unixware*) 1362 | os=-sysv4.2uw 1363 | ;; 1364 | -gnu/linux*) 1365 | os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` 1366 | ;; 1367 | # First accept the basic system types. 1368 | # The portable systems comes first. 1369 | # Each alternative MUST END IN A *, to match a version number. 1370 | # -sysv* is not here because it comes later, after sysvr4. 1371 | -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ 1372 | | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ 1373 | | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ 1374 | | -sym* | -kopensolaris* | -plan9* \ 1375 | | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ 1376 | | -aos* | -aros* \ 1377 | | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ 1378 | | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ 1379 | | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ 1380 | | -bitrig* | -openbsd* | -solidbsd* \ 1381 | | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ 1382 | | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ 1383 | | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ 1384 | | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ 1385 | | -chorusos* | -chorusrdb* | -cegcc* \ 1386 | | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ 1387 | | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ 1388 | | -linux-newlib* | -linux-musl* | -linux-uclibc* \ 1389 | | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ 1390 | | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ 1391 | | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ 1392 | | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ 1393 | | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ 1394 | | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ 1395 | | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ 1396 | | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) 1397 | # Remember, each alternative MUST END IN *, to match a version number. 1398 | ;; 1399 | -qnx*) 1400 | case $basic_machine in 1401 | x86-* | i*86-*) 1402 | ;; 1403 | *) 1404 | os=-nto$os 1405 | ;; 1406 | esac 1407 | ;; 1408 | -nto-qnx*) 1409 | ;; 1410 | -nto*) 1411 | os=`echo $os | sed -e 's|nto|nto-qnx|'` 1412 | ;; 1413 | -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ 1414 | | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ 1415 | | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) 1416 | ;; 1417 | -mac*) 1418 | os=`echo $os | sed -e 's|mac|macos|'` 1419 | ;; 1420 | -linux-dietlibc) 1421 | os=-linux-dietlibc 1422 | ;; 1423 | -linux*) 1424 | os=`echo $os | sed -e 's|linux|linux-gnu|'` 1425 | ;; 1426 | -sunos5*) 1427 | os=`echo $os | sed -e 's|sunos5|solaris2|'` 1428 | ;; 1429 | -sunos6*) 1430 | os=`echo $os | sed -e 's|sunos6|solaris3|'` 1431 | ;; 1432 | -opened*) 1433 | os=-openedition 1434 | ;; 1435 | -os400*) 1436 | os=-os400 1437 | ;; 1438 | -wince*) 1439 | os=-wince 1440 | ;; 1441 | -osfrose*) 1442 | os=-osfrose 1443 | ;; 1444 | -osf*) 1445 | os=-osf 1446 | ;; 1447 | -utek*) 1448 | os=-bsd 1449 | ;; 1450 | -dynix*) 1451 | os=-bsd 1452 | ;; 1453 | -acis*) 1454 | os=-aos 1455 | ;; 1456 | -atheos*) 1457 | os=-atheos 1458 | ;; 1459 | -syllable*) 1460 | os=-syllable 1461 | ;; 1462 | -386bsd) 1463 | os=-bsd 1464 | ;; 1465 | -ctix* | -uts*) 1466 | os=-sysv 1467 | ;; 1468 | -nova*) 1469 | os=-rtmk-nova 1470 | ;; 1471 | -ns2 ) 1472 | os=-nextstep2 1473 | ;; 1474 | -nsk*) 1475 | os=-nsk 1476 | ;; 1477 | # Preserve the version number of sinix5. 1478 | -sinix5.*) 1479 | os=`echo $os | sed -e 's|sinix|sysv|'` 1480 | ;; 1481 | -sinix*) 1482 | os=-sysv4 1483 | ;; 1484 | -tpf*) 1485 | os=-tpf 1486 | ;; 1487 | -triton*) 1488 | os=-sysv3 1489 | ;; 1490 | -oss*) 1491 | os=-sysv3 1492 | ;; 1493 | -svr4) 1494 | os=-sysv4 1495 | ;; 1496 | -svr3) 1497 | os=-sysv3 1498 | ;; 1499 | -sysvr4) 1500 | os=-sysv4 1501 | ;; 1502 | # This must come after -sysvr4. 1503 | -sysv*) 1504 | ;; 1505 | -ose*) 1506 | os=-ose 1507 | ;; 1508 | -es1800*) 1509 | os=-ose 1510 | ;; 1511 | -xenix) 1512 | os=-xenix 1513 | ;; 1514 | -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 1515 | os=-mint 1516 | ;; 1517 | -aros*) 1518 | os=-aros 1519 | ;; 1520 | -zvmoe) 1521 | os=-zvmoe 1522 | ;; 1523 | -dicos*) 1524 | os=-dicos 1525 | ;; 1526 | -nacl*) 1527 | ;; 1528 | -none) 1529 | ;; 1530 | *) 1531 | # Get rid of the `-' at the beginning of $os. 1532 | os=`echo $os | sed 's/[^-]*-//'` 1533 | echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 1534 | exit 1 1535 | ;; 1536 | esac 1537 | else 1538 | 1539 | # Here we handle the default operating systems that come with various machines. 1540 | # The value should be what the vendor currently ships out the door with their 1541 | # machine or put another way, the most popular os provided with the machine. 1542 | 1543 | # Note that if you're going to try to match "-MANUFACTURER" here (say, 1544 | # "-sun"), then you have to tell the case statement up towards the top 1545 | # that MANUFACTURER isn't an operating system. Otherwise, code above 1546 | # will signal an error saying that MANUFACTURER isn't an operating 1547 | # system, and we'll never get to this point. 1548 | 1549 | case $basic_machine in 1550 | score-*) 1551 | os=-elf 1552 | ;; 1553 | spu-*) 1554 | os=-elf 1555 | ;; 1556 | *-acorn) 1557 | os=-riscix1.2 1558 | ;; 1559 | arm*-rebel) 1560 | os=-linux 1561 | ;; 1562 | arm*-semi) 1563 | os=-aout 1564 | ;; 1565 | c4x-* | tic4x-*) 1566 | os=-coff 1567 | ;; 1568 | c8051-*) 1569 | os=-elf 1570 | ;; 1571 | hexagon-*) 1572 | os=-elf 1573 | ;; 1574 | tic54x-*) 1575 | os=-coff 1576 | ;; 1577 | tic55x-*) 1578 | os=-coff 1579 | ;; 1580 | tic6x-*) 1581 | os=-coff 1582 | ;; 1583 | # This must come before the *-dec entry. 1584 | pdp10-*) 1585 | os=-tops20 1586 | ;; 1587 | pdp11-*) 1588 | os=-none 1589 | ;; 1590 | *-dec | vax-*) 1591 | os=-ultrix4.2 1592 | ;; 1593 | m68*-apollo) 1594 | os=-domain 1595 | ;; 1596 | i386-sun) 1597 | os=-sunos4.0.2 1598 | ;; 1599 | m68000-sun) 1600 | os=-sunos3 1601 | ;; 1602 | m68*-cisco) 1603 | os=-aout 1604 | ;; 1605 | mep-*) 1606 | os=-elf 1607 | ;; 1608 | mips*-cisco) 1609 | os=-elf 1610 | ;; 1611 | mips*-*) 1612 | os=-elf 1613 | ;; 1614 | or32-*) 1615 | os=-coff 1616 | ;; 1617 | *-tti) # must be before sparc entry or we get the wrong os. 1618 | os=-sysv3 1619 | ;; 1620 | sparc-* | *-sun) 1621 | os=-sunos4.1.1 1622 | ;; 1623 | *-be) 1624 | os=-beos 1625 | ;; 1626 | *-haiku) 1627 | os=-haiku 1628 | ;; 1629 | *-ibm) 1630 | os=-aix 1631 | ;; 1632 | *-knuth) 1633 | os=-mmixware 1634 | ;; 1635 | *-wec) 1636 | os=-proelf 1637 | ;; 1638 | *-winbond) 1639 | os=-proelf 1640 | ;; 1641 | *-oki) 1642 | os=-proelf 1643 | ;; 1644 | *-hp) 1645 | os=-hpux 1646 | ;; 1647 | *-hitachi) 1648 | os=-hiux 1649 | ;; 1650 | i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) 1651 | os=-sysv 1652 | ;; 1653 | *-cbm) 1654 | os=-amigaos 1655 | ;; 1656 | *-dg) 1657 | os=-dgux 1658 | ;; 1659 | *-dolphin) 1660 | os=-sysv3 1661 | ;; 1662 | m68k-ccur) 1663 | os=-rtu 1664 | ;; 1665 | m88k-omron*) 1666 | os=-luna 1667 | ;; 1668 | *-next ) 1669 | os=-nextstep 1670 | ;; 1671 | *-sequent) 1672 | os=-ptx 1673 | ;; 1674 | *-crds) 1675 | os=-unos 1676 | ;; 1677 | *-ns) 1678 | os=-genix 1679 | ;; 1680 | i370-*) 1681 | os=-mvs 1682 | ;; 1683 | *-next) 1684 | os=-nextstep3 1685 | ;; 1686 | *-gould) 1687 | os=-sysv 1688 | ;; 1689 | *-highlevel) 1690 | os=-bsd 1691 | ;; 1692 | *-encore) 1693 | os=-bsd 1694 | ;; 1695 | *-sgi) 1696 | os=-irix 1697 | ;; 1698 | *-siemens) 1699 | os=-sysv4 1700 | ;; 1701 | *-masscomp) 1702 | os=-rtu 1703 | ;; 1704 | f30[01]-fujitsu | f700-fujitsu) 1705 | os=-uxpv 1706 | ;; 1707 | *-rom68k) 1708 | os=-coff 1709 | ;; 1710 | *-*bug) 1711 | os=-coff 1712 | ;; 1713 | *-apple) 1714 | os=-macos 1715 | ;; 1716 | *-atari*) 1717 | os=-mint 1718 | ;; 1719 | *) 1720 | os=-none 1721 | ;; 1722 | esac 1723 | fi 1724 | 1725 | # Here we handle the case where we know the os, and the CPU type, but not the 1726 | # manufacturer. We pick the logical manufacturer. 1727 | vendor=unknown 1728 | case $basic_machine in 1729 | *-unknown) 1730 | case $os in 1731 | -riscix*) 1732 | vendor=acorn 1733 | ;; 1734 | -sunos*) 1735 | vendor=sun 1736 | ;; 1737 | -cnk*|-aix*) 1738 | vendor=ibm 1739 | ;; 1740 | -beos*) 1741 | vendor=be 1742 | ;; 1743 | -hpux*) 1744 | vendor=hp 1745 | ;; 1746 | -mpeix*) 1747 | vendor=hp 1748 | ;; 1749 | -hiux*) 1750 | vendor=hitachi 1751 | ;; 1752 | -unos*) 1753 | vendor=crds 1754 | ;; 1755 | -dgux*) 1756 | vendor=dg 1757 | ;; 1758 | -luna*) 1759 | vendor=omron 1760 | ;; 1761 | -genix*) 1762 | vendor=ns 1763 | ;; 1764 | -mvs* | -opened*) 1765 | vendor=ibm 1766 | ;; 1767 | -os400*) 1768 | vendor=ibm 1769 | ;; 1770 | -ptx*) 1771 | vendor=sequent 1772 | ;; 1773 | -tpf*) 1774 | vendor=ibm 1775 | ;; 1776 | -vxsim* | -vxworks* | -windiss*) 1777 | vendor=wrs 1778 | ;; 1779 | -aux*) 1780 | vendor=apple 1781 | ;; 1782 | -hms*) 1783 | vendor=hitachi 1784 | ;; 1785 | -mpw* | -macos*) 1786 | vendor=apple 1787 | ;; 1788 | -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 1789 | vendor=atari 1790 | ;; 1791 | -vos*) 1792 | vendor=stratus 1793 | ;; 1794 | esac 1795 | basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` 1796 | ;; 1797 | esac 1798 | 1799 | echo $basic_machine$os 1800 | exit 1801 | 1802 | # Local variables: 1803 | # eval: (add-hook 'write-file-hooks 'time-stamp) 1804 | # time-stamp-start: "timestamp='" 1805 | # time-stamp-format: "%:y-%02m-%02d" 1806 | # time-stamp-end: "'" 1807 | # End: 1808 | -------------------------------------------------------------------------------- /harfbuzz-1.4.6.tar.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAndroid/libiconv-libicu-android/ee2cf7f334146618dd60994287987ede331e4ea4/harfbuzz-1.4.6.tar.bz2 -------------------------------------------------------------------------------- /icu-le-hb-1.0.3.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAndroid/libiconv-libicu-android/ee2cf7f334146618dd60994287987ede331e4ea4/icu-le-hb-1.0.3.tar.gz -------------------------------------------------------------------------------- /icu4c-59_1-src.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAndroid/libiconv-libicu-android/ee2cf7f334146618dd60994287987ede331e4ea4/icu4c-59_1-src.tgz -------------------------------------------------------------------------------- /libiconv-1.15.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAndroid/libiconv-libicu-android/ee2cf7f334146618dd60994287987ede331e4ea4/libiconv-1.15.tar.gz -------------------------------------------------------------------------------- /patches/icu_suffix_only_on_libname.patch: -------------------------------------------------------------------------------- 1 | --- icu/source/configure 2013-05-23 20:06:32.000000000 +0000 2 | +++ icu/source/configure.patched 2018-02-21 23:35:25.934967613 +0000 3 | @@ -7217,14 +7217,7 @@ 4 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5 5 | $as_echo "$msg" >&6; } 6 | 7 | -if test "$ICULIBSUFFIX" != "" 8 | -then 9 | - U_HAVE_LIB_SUFFIX=1 10 | - ICULIBSUFFIXCNAME=`echo _$ICULIBSUFFIX | sed 's/^A-Za-z0-9_/_/g'` 11 | - UCONFIG_CPPFLAGS="${UCONFIG_CPPFLAGS} -DU_HAVE_LIB_SUFFIX=1 -DU_LIB_SUFFIX_C_NAME=${ICULIBSUFFIXCNAME} " 12 | -else 13 | - U_HAVE_LIB_SUFFIX=0 14 | -fi 15 | +U_HAVE_LIB_SUFFIX=0 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /setCrossEnvironment-arm64-v8a.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | IFS=' 4 | ' 5 | 6 | NDK=`which ndk-build` 7 | NDK=`dirname $NDK` 8 | 9 | if uname -s | grep -i "linux" > /dev/null ; then 10 | MYARCH=linux-$(arch) 11 | NDK=`readlink -f $NDK` 12 | elif uname -s | grep -i "darwin" > /dev/null ; then 13 | MYARCH=darwin-x86_64 14 | elif uname -s | grep -i "windows" > /dev/null ; then 15 | MYARCH=windows-x86_64 16 | fi 17 | 18 | #echo NDK $NDK 19 | GCCPREFIX=aarch64-linux-android 20 | [ -z "$NDK_TOOLCHAIN_VERSION" ] && NDK_TOOLCHAIN_VERSION=4.9 21 | [ -z "$PLATFORMVER" ] && PLATFORMVER=android-21 22 | LOCAL_PATH=`dirname $0` 23 | if which realpath > /dev/null ; then 24 | LOCAL_PATH=`realpath $LOCAL_PATH` 25 | else 26 | LOCAL_PATH=`cd $LOCAL_PATH && pwd` 27 | fi 28 | ARCH=arm64-v8a 29 | 30 | 31 | CFLAGS=" 32 | -fexceptions 33 | -frtti 34 | -ffunction-sections 35 | -funwind-tables 36 | -fstack-protector-strong 37 | -Wno-invalid-command-line-argument 38 | -Wno-unused-command-line-argument 39 | -no-canonical-prefixes 40 | -I$NDK/sources/cxx-stl/llvm-libc++/include 41 | -I$NDK/sources/cxx-stl/llvm-libc++abi/include 42 | -I$NDK/sources/android/support/include 43 | -DANDROID 44 | -Wa,--noexecstack 45 | -Wformat 46 | -Werror=format-security 47 | -DNDEBUG 48 | -O2 49 | -g 50 | -gcc-toolchain 51 | $NDK/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64 52 | -target 53 | aarch64-none-linux-android 54 | -fpic 55 | --sysroot $NDK/platforms/android-21/arch-arm64 56 | -isystem $NDK/sysroot/usr/include 57 | -isystem $NDK/sysroot/usr/include/aarch64-linux-android 58 | -D__ANDROID_API__=21 59 | $CFLAGS" 60 | 61 | CFLAGS="`echo $CFLAGS | tr '\n' ' '`" 62 | 63 | LDFLAGS=" 64 | -shared 65 | --sysroot $NDK/platforms/android-21/arch-arm64 66 | $NDK/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++_static.a 67 | $NDK/sources/cxx-stl/llvm-libc++abi/../llvm-libc++/libs/arm64-v8a/libc++abi.a 68 | $NDK/sources/android/support/../../cxx-stl/llvm-libc++/libs/arm64-v8a/libandroid_support.a 69 | -latomic -Wl,--exclude-libs,libatomic.a 70 | -gcc-toolchain $NDK/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64 71 | -target aarch64-none-linux-android -no-canonical-prefixes 72 | -Wl,--build-id -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--warn-shared-textrel -Wl,--fatal-warnings 73 | -lc -lm -lstdc++ 74 | $LDFLAGS" 75 | 76 | LDFLAGS="`echo $LDFLAGS | tr '\n' ' '`" 77 | 78 | CC="$NDK/toolchains/llvm/prebuilt/$MYARCH/bin/clang" 79 | CXX="$NDK/toolchains/llvm/prebuilt/$MYARCH/bin/clang++" 80 | CPP="$CC -E $CFLAGS" 81 | 82 | env PATH=$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin:$LOCAL_PATH:$PATH \ 83 | CFLAGS="$CFLAGS" \ 84 | CXXFLAGS="$CXXFLAGS $CFLAGS -frtti -fexceptions" \ 85 | LDFLAGS="$LDFLAGS" \ 86 | CC="$CC" \ 87 | CXX="$CXX" \ 88 | RANLIB="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-ranlib" \ 89 | LD="$CC" \ 90 | AR="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-ar" \ 91 | CPP="$CPP" \ 92 | NM="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-nm" \ 93 | AS="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-as" \ 94 | STRIP="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-strip" \ 95 | "$@" 96 | -------------------------------------------------------------------------------- /setCrossEnvironment-armeabi-v7a.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | IFS=' 4 | ' 5 | 6 | NDK=`which ndk-build` 7 | NDK=`dirname $NDK` 8 | 9 | if uname -s | grep -i "linux" > /dev/null ; then 10 | MYARCH=linux-$(arch) 11 | NDK=`readlink -f $NDK` 12 | elif uname -s | grep -i "darwin" > /dev/null ; then 13 | MYARCH=darwin-x86_64 14 | elif uname -s | grep -i "windows" > /dev/null ; then 15 | MYARCH=windows-x86_64 16 | fi 17 | 18 | #echo NDK $NDK 19 | GCCPREFIX=arm-linux-androideabi 20 | [ -z "$NDK_TOOLCHAIN_VERSION" ] && NDK_TOOLCHAIN_VERSION=4.9 21 | [ -z "$PLATFORMVER" ] && PLATFORMVER=android-15 22 | LOCAL_PATH=`dirname $0` 23 | if which realpath > /dev/null ; then 24 | LOCAL_PATH=`realpath $LOCAL_PATH` 25 | else 26 | LOCAL_PATH=`cd $LOCAL_PATH && pwd` 27 | fi 28 | ARCH=armeabi-v7a 29 | 30 | 31 | CFLAGS=" 32 | -fexceptions 33 | -frtti 34 | -ffunction-sections 35 | -funwind-tables 36 | -fstack-protector-strong 37 | -Wno-invalid-command-line-argument 38 | -Wno-unused-command-line-argument 39 | -no-canonical-prefixes 40 | -I$NDK/sources/cxx-stl/llvm-libc++/include 41 | -I$NDK/sources/cxx-stl/llvm-libc++abi/include 42 | -I$NDK/sources/android/support/include 43 | -DANDROID 44 | -Wa,--noexecstack 45 | -Wformat 46 | -Werror=format-security 47 | -DNDEBUG 48 | -O2 49 | -g 50 | -gcc-toolchain 51 | $NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64 52 | -target 53 | armv7-none-linux-androideabi15 54 | -march=armv7-a 55 | -mfloat-abi=softfp 56 | -mfpu=vfpv3-d16 57 | -mthumb 58 | -fpic 59 | -fno-integrated-as 60 | --sysroot $NDK/platforms/android-14/arch-arm 61 | -isystem $NDK/sysroot/usr/include 62 | -isystem $NDK/sysroot/usr/include/arm-linux-androideabi 63 | -D__ANDROID_API__=15 64 | $CFLAGS" 65 | 66 | CFLAGS="`echo $CFLAGS | tr '\n' ' '`" 67 | 68 | LDFLAGS=" 69 | -shared 70 | --sysroot $NDK/platforms/android-14/arch-arm 71 | $NDK/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++_static.a 72 | $NDK/sources/cxx-stl/llvm-libc++abi/../llvm-libc++/libs/armeabi-v7a/libc++abi.a 73 | $NDK/sources/android/support/../../cxx-stl/llvm-libc++/libs/armeabi-v7a/libandroid_support.a 74 | $NDK/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libunwind.a 75 | -latomic -Wl,--exclude-libs,libatomic.a 76 | -gcc-toolchain 77 | $NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64 78 | -no-canonical-prefixes -target armv7-none-linux-androideabi14 79 | -Wl,--fix-cortex-a8 -Wl,--exclude-libs,libunwind.a -Wl,--build-id -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--warn-shared-textrel -Wl,--fatal-warnings 80 | -lc -lm -lstdc++ 81 | $LDFLAGS" 82 | 83 | LDFLAGS="`echo $LDFLAGS | tr '\n' ' '`" 84 | 85 | CC="$NDK/toolchains/llvm/prebuilt/$MYARCH/bin/clang" 86 | CXX="$NDK/toolchains/llvm/prebuilt/$MYARCH/bin/clang++" 87 | CPP="$CC -E $CFLAGS" 88 | 89 | env PATH=$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin:$LOCAL_PATH:$PATH \ 90 | CFLAGS="$CFLAGS" \ 91 | CXXFLAGS="$CXXFLAGS $CFLAGS -frtti -fexceptions" \ 92 | LDFLAGS="$LDFLAGS" \ 93 | CC="$CC" \ 94 | CXX="$CXX" \ 95 | RANLIB="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-ranlib" \ 96 | LD="$CC" \ 97 | AR="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-ar" \ 98 | CPP="$CPP" \ 99 | NM="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-nm" \ 100 | AS="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-as" \ 101 | STRIP="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-strip" \ 102 | "$@" 103 | -------------------------------------------------------------------------------- /setCrossEnvironment-armeabi.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | IFS=' 4 | ' 5 | 6 | NDK=`which ndk-build` 7 | NDK=`dirname $NDK` 8 | 9 | if uname -s | grep -i "linux" > /dev/null ; then 10 | MYARCH=linux-$(arch) 11 | NDK=`readlink -f $NDK` 12 | elif uname -s | grep -i "darwin" > /dev/null ; then 13 | MYARCH=darwin-x86_64 14 | elif uname -s | grep -i "windows" > /dev/null ; then 15 | MYARCH=windows-x86_64 16 | fi 17 | 18 | #echo NDK $NDK 19 | GCCPREFIX=arm-linux-androideabi 20 | [ -z "$NDK_TOOLCHAIN_VERSION" ] && NDK_TOOLCHAIN_VERSION=4.9 21 | [ -z "$PLATFORMVER" ] && PLATFORMVER=android-15 22 | LOCAL_PATH=`dirname $0` 23 | if which realpath > /dev/null ; then 24 | LOCAL_PATH=`realpath $LOCAL_PATH` 25 | else 26 | LOCAL_PATH=`cd $LOCAL_PATH && pwd` 27 | fi 28 | ARCH=armeabi 29 | 30 | 31 | CFLAGS=" 32 | -fexceptions 33 | -frtti 34 | -ffunction-sections 35 | -funwind-tables 36 | -fstack-protector-strong 37 | -Wno-invalid-command-line-argument 38 | -Wno-unused-command-line-argument 39 | -no-canonical-prefixes 40 | -I$NDK/sources/cxx-stl/llvm-libc++/include 41 | -I$NDK/sources/cxx-stl/llvm-libc++abi/include 42 | -I$NDK/sources/android/support/include 43 | -DANDROID 44 | -Wa,--noexecstack 45 | -Wformat 46 | -Werror=format-security 47 | -DNDEBUG 48 | -O2 49 | -g 50 | -gcc-toolchain 51 | $NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64 52 | -target 53 | armv5te-none-linux-androideabi14 54 | -march=armv5te 55 | -mtune=xscale 56 | -msoft-float 57 | -mthumb 58 | -fpic 59 | -fno-integrated-as 60 | --sysroot $NDK/platforms/android-14/arch-arm 61 | -isystem $NDK/sysroot/usr/include 62 | -isystem $NDK/sysroot/usr/include/arm-linux-androideabi 63 | -D__ANDROID_API__=14 64 | $CFLAGS" 65 | 66 | CFLAGS="`echo $CFLAGS | tr '\n' ' '`" 67 | 68 | LDFLAGS=" 69 | -shared 70 | --sysroot $NDK/platforms/android-14/arch-arm 71 | $NDK/sources/cxx-stl/llvm-libc++/libs/armeabi/libc++_static.a 72 | $NDK/sources/cxx-stl/llvm-libc++abi/../llvm-libc++/libs/armeabi/libc++abi.a 73 | $NDK/sources/android/support/../../cxx-stl/llvm-libc++/libs/armeabi/libandroid_support.a 74 | $NDK/sources/cxx-stl/llvm-libc++/libs/armeabi/libunwind.a 75 | -latomic -Wl,--exclude-libs,libatomic.a 76 | -gcc-toolchain 77 | $NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64 78 | -no-canonical-prefixes -target armv5te-none-linux-androideabi14 79 | -Wl,--exclude-libs,libunwind.a 80 | -Wl,--build-id -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--warn-shared-textrel -Wl,--fatal-warnings 81 | -lc -lm -lstdc++ 82 | $LDFLAGS" 83 | 84 | LDFLAGS="`echo $LDFLAGS | tr '\n' ' '`" 85 | 86 | CC="$NDK/toolchains/llvm/prebuilt/$MYARCH/bin/clang" 87 | CXX="$NDK/toolchains/llvm/prebuilt/$MYARCH/bin/clang++" 88 | CPP="$CC -E $CFLAGS" 89 | 90 | env PATH=$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin:$LOCAL_PATH:$PATH \ 91 | CFLAGS="$CFLAGS" \ 92 | CXXFLAGS="$CXXFLAGS $CFLAGS -frtti -fexceptions" \ 93 | LDFLAGS="$LDFLAGS" \ 94 | CC="$CC" \ 95 | CXX="$CXX" \ 96 | RANLIB="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-ranlib" \ 97 | LD="$CC" \ 98 | AR="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-ar" \ 99 | CPP="$CPP" \ 100 | NM="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-nm" \ 101 | AS="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-as" \ 102 | STRIP="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-strip" \ 103 | "$@" 104 | -------------------------------------------------------------------------------- /setCrossEnvironment-x86.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | IFS=' 4 | ' 5 | 6 | NDK=`which ndk-build` 7 | NDK=`dirname $NDK` 8 | 9 | if uname -s | grep -i "linux" > /dev/null ; then 10 | MYARCH=linux-$(arch) 11 | NDK=`readlink -f $NDK` 12 | elif uname -s | grep -i "darwin" > /dev/null ; then 13 | MYARCH=darwin-x86_64 14 | elif uname -s | grep -i "windows" > /dev/null ; then 15 | MYARCH=windows-x86_64 16 | fi 17 | 18 | #echo NDK $NDK 19 | GCCPREFIX=i686-linux-android 20 | [ -z "$NDK_TOOLCHAIN_VERSION" ] && NDK_TOOLCHAIN_VERSION=4.9 21 | [ -z "$PLATFORMVER" ] && PLATFORMVER=android-15 22 | LOCAL_PATH=`dirname $0` 23 | if which realpath > /dev/null ; then 24 | LOCAL_PATH=`realpath $LOCAL_PATH` 25 | else 26 | LOCAL_PATH=`cd $LOCAL_PATH && pwd` 27 | fi 28 | ARCH=x86 29 | 30 | 31 | CFLAGS=" 32 | -fexceptions 33 | -frtti 34 | -ffunction-sections 35 | -funwind-tables 36 | -fstack-protector-strong 37 | -Wno-invalid-command-line-argument 38 | -Wno-unused-command-line-argument 39 | -no-canonical-prefixes 40 | -I$NDK/sources/cxx-stl/llvm-libc++/include 41 | -I$NDK/sources/cxx-stl/llvm-libc++abi/include 42 | -I$NDK/sources/android/support/include 43 | -DANDROID 44 | -Wa,--noexecstack 45 | -Wformat 46 | -Werror=format-security 47 | -DNDEBUG 48 | -O2 49 | -g 50 | -gcc-toolchain 51 | $NDK/toolchains/x86-4.9/prebuilt/linux-x86_64 52 | -target 53 | i686-none-linux-android 54 | -fPIC 55 | -mstackrealign 56 | --sysroot $NDK/platforms/android-14/arch-x86 57 | -isystem $NDK/sysroot/usr/include 58 | -isystem $NDK/sysroot/usr/include/i686-linux-android 59 | -D__ANDROID_API__=15 60 | $CFLAGS" 61 | 62 | CFLAGS="`echo $CFLAGS | tr '\n' ' '`" 63 | 64 | LDFLAGS=" 65 | -shared 66 | --sysroot $NDK/platforms/android-14/arch-x86 67 | $NDK/sources/cxx-stl/llvm-libc++/libs/x86/libc++_static.a 68 | $NDK/sources/cxx-stl/llvm-libc++abi/../llvm-libc++/libs/x86/libc++abi.a 69 | $NDK/sources/android/support/../../cxx-stl/llvm-libc++/libs/x86/libandroid_support.a 70 | -latomic -Wl,--exclude-libs,libatomic.a 71 | -gcc-toolchain 72 | $NDK/toolchains/x86-4.9/prebuilt/linux-x86_64 73 | -target i686-none-linux-android -no-canonical-prefixes 74 | -Wl,--build-id -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--warn-shared-textrel -Wl,--fatal-warnings 75 | -lc -lm -lstdc++ 76 | $LDFLAGS 77 | " 78 | 79 | LDFLAGS="`echo $LDFLAGS | tr '\n' ' '`" 80 | 81 | CC="$NDK/toolchains/llvm/prebuilt/$MYARCH/bin/clang" 82 | CXX="$NDK/toolchains/llvm/prebuilt/$MYARCH/bin/clang++" 83 | CPP="$CC -E $CFLAGS" 84 | 85 | env PATH=$NDK/toolchains/$ARCH-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin:$LOCAL_PATH:$PATH \ 86 | CFLAGS="$CFLAGS" \ 87 | CXXFLAGS="$CXXFLAGS $CFLAGS -frtti -fexceptions" \ 88 | LDFLAGS="$LDFLAGS" \ 89 | CC="$CC" \ 90 | CXX="$CXX" \ 91 | RANLIB="$NDK/toolchains/$ARCH-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-ranlib" \ 92 | LD="$CC" \ 93 | AR="$NDK/toolchains/$ARCH-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-ar" \ 94 | CPP="$CPP" \ 95 | NM="$NDK/toolchains/$ARCH-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-nm" \ 96 | AS="$NDK/toolchains/$ARCH-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-as" \ 97 | STRIP="$NDK/toolchains/$ARCH-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-strip" \ 98 | "$@" 99 | -------------------------------------------------------------------------------- /setCrossEnvironment-x86_64.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | IFS=' 4 | ' 5 | 6 | NDK=`which ndk-build` 7 | NDK=`dirname $NDK` 8 | 9 | if uname -s | grep -i "linux" > /dev/null ; then 10 | MYARCH=linux-$(arch) 11 | NDK=`readlink -f $NDK` 12 | elif uname -s | grep -i "darwin" > /dev/null ; then 13 | MYARCH=darwin-x86_64 14 | elif uname -s | grep -i "windows" > /dev/null ; then 15 | MYARCH=windows-x86_64 16 | fi 17 | 18 | #echo NDK $NDK 19 | GCCPREFIX=x86_64-linux-android 20 | [ -z "$NDK_TOOLCHAIN_VERSION" ] && NDK_TOOLCHAIN_VERSION=4.9 21 | [ -z "$PLATFORMVER" ] && PLATFORMVER=android-21 22 | LOCAL_PATH=`dirname $0` 23 | if which realpath > /dev/null ; then 24 | LOCAL_PATH=`realpath $LOCAL_PATH` 25 | else 26 | LOCAL_PATH=`cd $LOCAL_PATH && pwd` 27 | fi 28 | ARCH=x86_64 29 | 30 | 31 | CFLAGS=" 32 | -fexceptions 33 | -frtti 34 | -ffunction-sections 35 | -funwind-tables 36 | -fstack-protector-strong 37 | -Wno-invalid-command-line-argument 38 | -Wno-unused-command-line-argument 39 | -no-canonical-prefixes 40 | -I$NDK/sources/cxx-stl/llvm-libc++/include 41 | -I$NDK/sources/cxx-stl/llvm-libc++abi/include 42 | -I$NDK/sources/android/support/include 43 | -DANDROID 44 | -Wa,--noexecstack 45 | -Wformat 46 | -Werror=format-security 47 | -DNDEBUG 48 | -O2 49 | -g 50 | -gcc-toolchain 51 | $NDK/toolchains/x86_64-4.9/prebuilt/linux-x86_64 52 | -target 53 | x86_64-none-linux-android 54 | -fPIC 55 | --sysroot $NDK/platforms/android-21/arch-x86_64 56 | -isystem $NDK/sysroot/usr/include 57 | -isystem $NDK/sysroot/usr/include/x86_64-linux-android 58 | -D__ANDROID_API__=21 59 | $CFLAGS" 60 | 61 | CFLAGS="`echo $CFLAGS | tr '\n' ' '`" 62 | 63 | LDFLAGS=" 64 | -shared 65 | --sysroot $NDK/platforms/android-21/arch-x86_64 66 | $NDK/sources/cxx-stl/llvm-libc++/libs/x86_64/libc++_static.a 67 | $NDK/sources/cxx-stl/llvm-libc++abi/../llvm-libc++/libs/x86_64/libc++abi.a 68 | $NDK/sources/android/support/../../cxx-stl/llvm-libc++/libs/x86_64/libandroid_support.a 69 | -latomic -Wl,--exclude-libs,libatomic.a 70 | -gcc-toolchain 71 | $NDK/toolchains/x86_64-4.9/prebuilt/linux-x86_64 72 | -target x86_64-none-linux-android -no-canonical-prefixes 73 | -Wl,--build-id -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--warn-shared-textrel -Wl,--fatal-warnings 74 | -lc -lm -lstdc++ 75 | $LDFLAGS 76 | " 77 | 78 | LDFLAGS="`echo $LDFLAGS | tr '\n' ' '`" 79 | 80 | CC="$NDK/toolchains/llvm/prebuilt/$MYARCH/bin/clang" 81 | CXX="$NDK/toolchains/llvm/prebuilt/$MYARCH/bin/clang++" 82 | CPP="$CC -E $CFLAGS" 83 | 84 | env PATH=$NDK/toolchains/$ARCH-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin:$LOCAL_PATH:$PATH \ 85 | CFLAGS="$CFLAGS" \ 86 | CXXFLAGS="$CXXFLAGS $CFLAGS -frtti -fexceptions" \ 87 | LDFLAGS="$LDFLAGS" \ 88 | CC="$CC" \ 89 | CXX="$CXX" \ 90 | RANLIB="$NDK/toolchains/$ARCH-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-ranlib" \ 91 | LD="$CC" \ 92 | AR="$NDK/toolchains/$ARCH-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-ar" \ 93 | CPP="$CPP" \ 94 | NM="$NDK/toolchains/$ARCH-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-nm" \ 95 | AS="$NDK/toolchains/$ARCH-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-as" \ 96 | STRIP="$NDK/toolchains/$ARCH-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-strip" \ 97 | "$@" 98 | --------------------------------------------------------------------------------