@@ -384,207 +384,6 @@ need_cmd sed
384384need_cmd file
385385need_cmd make
386386
387- msg " inspecting environment"
388-
389- CFG_OSTYPE=$( uname -s)
390- CFG_CPUTYPE=$( uname -m)
391-
392- if [ $CFG_OSTYPE = Darwin -a $CFG_CPUTYPE = i386 ]
393- then
394- # Darwin's `uname -s` lies and always returns i386. We have to use sysctl
395- # instead.
396- if sysctl hw.optional.x86_64 | grep -q ' : 1'
397- then
398- CFG_CPUTYPE=x86_64
399- fi
400- fi
401-
402- # The goal here is to come up with the same triple as LLVM would,
403- # at least for the subset of platforms we're willing to target.
404-
405- case $CFG_OSTYPE in
406-
407- Linux)
408- CFG_OSTYPE=unknown-linux-gnu
409- ;;
410-
411- FreeBSD)
412- CFG_OSTYPE=unknown-freebsd
413- ;;
414-
415- DragonFly)
416- CFG_OSTYPE=unknown-dragonfly
417- ;;
418-
419- Bitrig)
420- CFG_OSTYPE=unknown-bitrig
421- ;;
422-
423- OpenBSD)
424- CFG_OSTYPE=unknown-openbsd
425- ;;
426-
427- NetBSD)
428- CFG_OSTYPE=unknown-netbsd
429- ;;
430-
431- Darwin)
432- CFG_OSTYPE=apple-darwin
433- ;;
434-
435- SunOS)
436- CFG_OSTYPE=sun-solaris
437- CFG_CPUTYPE=$( isainfo -n)
438- ;;
439-
440- Haiku)
441- CFG_OSTYPE=unknown-haiku
442- ;;
443-
444- MINGW* )
445- # msys' `uname` does not print gcc configuration, but prints msys
446- # configuration. so we cannot believe `uname -m`:
447- # msys1 is always i686 and msys2 is always x86_64.
448- # instead, msys defines $MSYSTEM which is MINGW32 on i686 and
449- # MINGW64 on x86_64.
450- CFG_CPUTYPE=i686
451- CFG_OSTYPE=pc-windows-gnu
452- if [ " $MSYSTEM " = MINGW64 ]
453- then
454- CFG_CPUTYPE=x86_64
455- fi
456- ;;
457-
458- MSYS* )
459- CFG_OSTYPE=pc-windows-gnu
460- ;;
461-
462- # Thad's Cygwin identifiers below
463-
464- # Vista 32 bit
465- CYGWIN_NT-6.0)
466- CFG_OSTYPE=pc-windows-gnu
467- CFG_CPUTYPE=i686
468- ;;
469-
470- # Vista 64 bit
471- CYGWIN_NT-6.0-WOW64)
472- CFG_OSTYPE=pc-windows-gnu
473- CFG_CPUTYPE=x86_64
474- ;;
475-
476- # Win 7 32 bit
477- CYGWIN_NT-6.1)
478- CFG_OSTYPE=pc-windows-gnu
479- CFG_CPUTYPE=i686
480- ;;
481-
482- # Win 7 64 bit
483- CYGWIN_NT-6.1-WOW64)
484- CFG_OSTYPE=pc-windows-gnu
485- CFG_CPUTYPE=x86_64
486- ;;
487-
488- # Win 8 # uname -s on 64-bit cygwin does not contain WOW64, so simply use uname -m to detect arch (works in my install)
489- CYGWIN_NT-6.3)
490- CFG_OSTYPE=pc-windows-gnu
491- ;;
492- # We do not detect other OS such as XP/2003 using 64 bit using uname.
493- # If we want to in the future, we will need to use Cygwin - Chuck's csih helper in /usr/lib/csih/winProductName.exe or alternative.
494- * )
495- err " unknown OS type: $CFG_OSTYPE "
496- ;;
497- esac
498-
499-
500- case $CFG_CPUTYPE in
501-
502- i386 | i486 | i686 | i786 | x86)
503- CFG_CPUTYPE=i686
504- ;;
505-
506- xscale | arm)
507- CFG_CPUTYPE=arm
508- ;;
509-
510- armv6l)
511- CFG_CPUTYPE=arm
512- CFG_OSTYPE=" ${CFG_OSTYPE} eabihf"
513- ;;
514-
515- armv7l | armv8l)
516- CFG_CPUTYPE=armv7
517- CFG_OSTYPE=" ${CFG_OSTYPE} eabihf"
518- ;;
519-
520- aarch64 | arm64)
521- CFG_CPUTYPE=aarch64
522- ;;
523-
524- powerpc | ppc)
525- CFG_CPUTYPE=powerpc
526- ;;
527-
528- powerpc64 | ppc64)
529- CFG_CPUTYPE=powerpc64
530- ;;
531-
532- powerpc64le | ppc64le)
533- CFG_CPUTYPE=powerpc64le
534- ;;
535-
536- s390x)
537- CFG_CPUTYPE=s390x
538- ;;
539-
540- x86_64 | x86-64 | x64 | amd64)
541- CFG_CPUTYPE=x86_64
542- ;;
543-
544- mips | mips64)
545- if [ " $CFG_CPUTYPE " = " mips64" ]; then
546- CFG_OSTYPE=" ${CFG_OSTYPE} abi64"
547- fi
548- ENDIAN=$( printf ' \1' | od -dAn)
549- if [ " $ENDIAN " -eq 1 ]; then
550- CFG_CPUTYPE=" ${CFG_CPUTYPE} el"
551- elif [ " $ENDIAN " -ne 256 ]; then
552- err " unknown endianness: $ENDIAN (expecting 1 for little or 256 for big)"
553- fi
554- ;;
555-
556- BePC)
557- CFG_CPUTYPE=i686
558- ;;
559-
560- * )
561- err " unknown CPU type: $CFG_CPUTYPE "
562- esac
563-
564- # Detect 64 bit linux systems with 32 bit userland and force 32 bit compilation
565- if [ $CFG_OSTYPE = unknown-linux-gnu -a $CFG_CPUTYPE = x86_64 ]
566- then
567- # $SHELL does not exist in standard 'sh', so probably only exists
568- # if configure is running in an interactive bash shell. /usr/bin/env
569- # exists *everywhere*.
570- BIN_TO_PROBE=" $SHELL "
571- if [ ! -r " $BIN_TO_PROBE " ]; then
572- if [ -r " /usr/bin/env" ]; then
573- BIN_TO_PROBE=" /usr/bin/env"
574- else
575- warn " Cannot check if the userland is i686 or x86_64"
576- fi
577- fi
578- file -L " $BIN_TO_PROBE " | grep -q " x86[_-]64"
579- if [ $? != 0 ]; then
580- msg " i686 userland on x86_64 Linux kernel"
581- CFG_CPUTYPE=i686
582- fi
583- fi
584-
585-
586- DEFAULT_BUILD=" ${CFG_CPUTYPE} -${CFG_OSTYPE} "
587-
588387CFG_SRC_DIR=" $( abs_path $( dirname $0 ) ) /"
589388CFG_SRC_DIR_RELATIVE=" $( dirname $0 ) /"
590389CFG_BUILD_DIR=" $( pwd) /"
@@ -673,7 +472,7 @@ valopt infodir "${CFG_PREFIX}/share/info" "install additional info"
673472valopt llvm-root " " " set LLVM root"
674473valopt python " " " set path to python"
675474valopt jemalloc-root " " " set directory where libjemalloc_pic.a is located"
676- valopt build " ${DEFAULT_BUILD} " " GNUs ./configure syntax LLVM build triple"
475+ valopt build " " " GNUs ./configure syntax LLVM build triple"
677476valopt android-cross-path " " " Android NDK standalone path (deprecated)"
678477valopt i686-linux-android-ndk " " " i686-linux-android NDK standalone path"
679478valopt arm-linux-androideabi-ndk " " " arm-linux-androideabi NDK standalone path"
0 commit comments