ffi 1.15.5 → 1.17.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +169 -0
- data/Gemfile +15 -3
- data/README.md +5 -3
- data/Rakefile +30 -12
- data/Steepfile +8 -0
- data/ext/ffi_c/AbstractMemory.c +99 -74
- data/ext/ffi_c/AbstractMemory.h +3 -2
- data/ext/ffi_c/ArrayType.c +51 -15
- data/ext/ffi_c/ArrayType.h +1 -0
- data/ext/ffi_c/Buffer.c +90 -33
- data/ext/ffi_c/Call.c +29 -12
- data/ext/ffi_c/Call.h +3 -2
- data/ext/ffi_c/DynamicLibrary.c +90 -27
- data/ext/ffi_c/Function.c +276 -110
- data/ext/ffi_c/Function.h +1 -0
- data/ext/ffi_c/FunctionInfo.c +81 -25
- data/ext/ffi_c/LastError.c +29 -11
- data/ext/ffi_c/MappedType.c +66 -23
- data/ext/ffi_c/MappedType.h +0 -2
- data/ext/ffi_c/MemoryPointer.c +36 -9
- data/ext/ffi_c/MethodHandle.c +7 -3
- data/ext/ffi_c/Pointer.c +82 -40
- data/ext/ffi_c/Pointer.h +1 -0
- data/ext/ffi_c/Struct.c +166 -84
- data/ext/ffi_c/Struct.h +7 -4
- data/ext/ffi_c/StructByValue.c +48 -16
- data/ext/ffi_c/StructLayout.c +259 -73
- data/ext/ffi_c/Type.c +120 -51
- data/ext/ffi_c/Type.h +3 -1
- data/ext/ffi_c/Types.c +8 -2
- data/ext/ffi_c/Types.h +0 -1
- data/ext/ffi_c/Variadic.c +71 -26
- data/ext/ffi_c/compat.h +22 -22
- data/ext/ffi_c/extconf.rb +19 -2
- data/ext/ffi_c/ffi.c +4 -0
- data/ext/ffi_c/libffi/LICENSE +1 -1
- data/ext/ffi_c/libffi/Makefile.am +28 -16
- data/ext/ffi_c/libffi/Makefile.in +138 -84
- data/ext/ffi_c/libffi/README.md +189 -108
- data/ext/ffi_c/libffi/acinclude.m4 +16 -112
- data/ext/ffi_c/libffi/{.travis/compile → compile} +4 -7
- data/ext/ffi_c/libffi/config.guess +695 -570
- data/ext/ffi_c/libffi/config.sub +217 -95
- data/ext/ffi_c/libffi/configure +4642 -3901
- data/ext/ffi_c/libffi/configure.ac +83 -33
- data/ext/ffi_c/libffi/configure.host +31 -12
- data/ext/ffi_c/libffi/doc/Makefile.in +13 -6
- data/ext/ffi_c/libffi/doc/libffi.texi +108 -36
- data/ext/ffi_c/libffi/doc/version.texi +4 -4
- data/ext/ffi_c/libffi/fficonfig.h.in +15 -50
- data/ext/ffi_c/libffi/generate-darwin-source-and-headers.py +144 -60
- data/ext/ffi_c/libffi/include/Makefile.am +1 -1
- data/ext/ffi_c/libffi/include/Makefile.in +14 -9
- data/ext/ffi_c/libffi/include/ffi.h.in +73 -60
- data/ext/ffi_c/libffi/include/ffi_cfi.h +23 -0
- data/ext/ffi_c/libffi/include/ffi_common.h +50 -2
- data/ext/ffi_c/libffi/include/tramp.h +45 -0
- data/ext/ffi_c/libffi/install-sh +92 -69
- data/ext/ffi_c/libffi/libffi.map.in +18 -1
- data/ext/ffi_c/libffi/libtool-version +2 -2
- data/ext/ffi_c/libffi/ltmain.sh +518 -333
- data/ext/ffi_c/libffi/m4/asmcfi.m4 +28 -11
- data/ext/ffi_c/libffi/m4/ax_cc_maxopt.m4 +18 -14
- data/ext/ffi_c/libffi/m4/ax_cflags_warn_all.m4 +108 -72
- data/ext/ffi_c/libffi/m4/ax_check_compile_flag.m4 +13 -3
- data/ext/ffi_c/libffi/m4/ax_compiler_vendor.m4 +76 -45
- data/ext/ffi_c/libffi/m4/ax_prepend_flag.m4 +51 -0
- data/ext/ffi_c/libffi/man/Makefile.in +13 -6
- data/ext/ffi_c/libffi/missing +1 -1
- data/ext/ffi_c/libffi/msvc_build/aarch64/aarch64_include/ffi.h +2 -2
- data/ext/ffi_c/libffi/msvcc.sh +1 -1
- data/ext/ffi_c/libffi/src/aarch64/ffi.c +177 -57
- data/ext/ffi_c/libffi/src/aarch64/ffitarget.h +2 -2
- data/ext/ffi_c/libffi/src/aarch64/internal.h +78 -0
- data/ext/ffi_c/libffi/src/aarch64/sysv.S +347 -93
- data/ext/ffi_c/libffi/src/arc/arcompact.S +169 -94
- data/ext/ffi_c/libffi/src/arc/ffi.c +328 -147
- data/ext/ffi_c/libffi/src/arc/ffitarget.h +14 -0
- data/ext/ffi_c/libffi/src/arm/ffi.c +62 -17
- data/ext/ffi_c/libffi/src/arm/ffitarget.h +3 -3
- data/ext/ffi_c/libffi/src/arm/internal.h +10 -0
- data/ext/ffi_c/libffi/src/arm/sysv.S +114 -43
- data/ext/ffi_c/libffi/src/closures.c +137 -51
- data/ext/ffi_c/libffi/src/debug.c +2 -2
- data/ext/ffi_c/libffi/src/dlmalloc.c +7 -1
- data/ext/ffi_c/libffi/src/ia64/ffi.c +12 -0
- data/ext/ffi_c/libffi/src/ia64/unix.S +20 -2
- data/ext/ffi_c/libffi/src/loongarch64/ffi.c +624 -0
- data/ext/ffi_c/libffi/src/loongarch64/ffitarget.h +82 -0
- data/ext/ffi_c/libffi/src/loongarch64/sysv.S +327 -0
- data/ext/ffi_c/libffi/src/m32r/ffi.c +31 -14
- data/ext/ffi_c/libffi/src/mips/ffi.c +250 -67
- data/ext/ffi_c/libffi/src/mips/ffitarget.h +9 -4
- data/ext/ffi_c/libffi/src/mips/n32.S +197 -33
- data/ext/ffi_c/libffi/src/mips/o32.S +65 -4
- data/ext/ffi_c/libffi/src/moxie/ffi.c +47 -22
- data/ext/ffi_c/libffi/src/or1k/ffi.c +27 -14
- data/ext/ffi_c/libffi/src/pa/ffi.c +32 -33
- data/ext/ffi_c/libffi/src/pa/ffi64.c +614 -0
- data/ext/ffi_c/libffi/src/pa/ffitarget.h +22 -8
- data/ext/ffi_c/libffi/src/pa/hpux32.S +83 -36
- data/ext/ffi_c/libffi/src/pa/hpux64.S +681 -0
- data/ext/ffi_c/libffi/src/pa/linux.S +86 -35
- data/ext/ffi_c/libffi/src/powerpc/ffi.c +19 -0
- data/ext/ffi_c/libffi/src/powerpc/ffi_darwin.c +36 -24
- data/ext/ffi_c/libffi/src/powerpc/ffi_linux64.c +27 -20
- data/ext/ffi_c/libffi/src/powerpc/ffi_sysv.c +26 -16
- data/ext/ffi_c/libffi/src/powerpc/internal.h +10 -0
- data/ext/ffi_c/libffi/src/powerpc/linux64.S +2 -0
- data/ext/ffi_c/libffi/src/powerpc/linux64_closure.S +49 -0
- data/ext/ffi_c/libffi/src/powerpc/ppc_closure.S +24 -0
- data/ext/ffi_c/libffi/src/powerpc/t-aix +5 -0
- data/ext/ffi_c/libffi/src/prep_cif.c +22 -5
- data/ext/ffi_c/libffi/src/riscv/ffi.c +74 -18
- data/ext/ffi_c/libffi/src/riscv/internal.h +7 -0
- data/ext/ffi_c/libffi/src/riscv/sysv.S +24 -0
- data/ext/ffi_c/libffi/src/s390/ffi.c +28 -1
- data/ext/ffi_c/libffi/src/s390/internal.h +11 -0
- data/ext/ffi_c/libffi/src/s390/sysv.S +38 -0
- data/ext/ffi_c/libffi/src/sparc/ffi.c +16 -0
- data/ext/ffi_c/libffi/src/sparc/ffi64.c +23 -1
- data/ext/ffi_c/libffi/src/tramp.c +721 -0
- data/ext/ffi_c/libffi/src/types.c +26 -6
- data/ext/ffi_c/libffi/src/wasm/ffi.c +798 -0
- data/ext/ffi_c/libffi/src/wasm/ffitarget.h +79 -0
- data/ext/ffi_c/libffi/src/x86/ffi.c +102 -37
- data/ext/ffi_c/libffi/src/x86/ffi64.c +71 -13
- data/ext/ffi_c/libffi/src/x86/ffitarget.h +6 -5
- data/ext/ffi_c/libffi/src/x86/ffiw64.c +44 -1
- data/ext/ffi_c/libffi/src/x86/internal.h +14 -0
- data/ext/ffi_c/libffi/src/x86/internal64.h +14 -0
- data/ext/ffi_c/libffi/src/x86/sysv.S +173 -41
- data/ext/ffi_c/libffi/src/x86/sysv_intel.S +92 -91
- data/ext/ffi_c/libffi/src/x86/unix64.S +96 -6
- data/ext/ffi_c/libffi/src/x86/win64.S +20 -7
- data/ext/ffi_c/libffi/src/xtensa/ffi.c +16 -8
- data/ext/ffi_c/libffi/src/xtensa/ffitarget.h +4 -0
- data/ext/ffi_c/libffi/src/xtensa/sysv.S +26 -16
- data/ext/ffi_c/libffi/testsuite/Makefile.in +95 -121
- data/ext/ffi_c/libffi.bsd.mk +2 -2
- data/ext/ffi_c/libffi.darwin.mk +2 -2
- data/ext/ffi_c/libffi.gnu.mk +2 -2
- data/ext/ffi_c/libffi.mk +5 -0
- data/ext/ffi_c/rbffi.h +1 -1
- data/ffi.gemspec +9 -8
- data/lib/ffi/autopointer.rb +14 -31
- data/lib/ffi/compat.rb +54 -0
- data/lib/ffi/data_converter.rb +2 -2
- data/lib/ffi/dynamic_library.rb +118 -0
- data/lib/ffi/enum.rb +18 -12
- data/lib/ffi/ffi.rb +62 -0
- data/lib/ffi/function.rb +94 -0
- data/lib/ffi/io.rb +2 -2
- data/lib/ffi/library.rb +88 -88
- data/lib/ffi/library_path.rb +109 -0
- data/lib/ffi/managedstruct.rb +1 -1
- data/lib/ffi/platform/aarch64-linux/types.conf +74 -3
- data/lib/ffi/platform/aarch64-windows/types.conf +52 -0
- data/lib/ffi/platform/hppa1.1-linux/types.conf +178 -0
- data/lib/ffi/platform/hppa2.0-linux/types.conf +178 -0
- data/lib/ffi/platform/loongarch64-linux/types.conf +141 -0
- data/lib/ffi/platform/sw_64-linux/types.conf +141 -0
- data/lib/ffi/platform.rb +15 -13
- data/lib/ffi/pointer.rb +6 -6
- data/lib/ffi/struct.rb +6 -5
- data/lib/ffi/struct_by_reference.rb +1 -1
- data/lib/ffi/struct_layout.rb +3 -3
- data/lib/ffi/struct_layout_builder.rb +9 -9
- data/lib/ffi/types.rb +65 -37
- data/lib/ffi/variadic.rb +19 -8
- data/lib/ffi/version.rb +1 -1
- data/samples/hello_ractor.rb +19 -0
- data/samples/qsort_ractor.rb +36 -0
- data/sig/ffi/abstract_memory.rbs +165 -0
- data/sig/ffi/auto_pointer.rbs +26 -0
- data/sig/ffi/buffer.rbs +18 -0
- data/sig/ffi/data_converter.rbs +10 -0
- data/sig/ffi/dynamic_library.rbs +9 -0
- data/sig/ffi/enum.rbs +38 -0
- data/sig/ffi/errno.rbs +8 -0
- data/sig/ffi/function.rbs +39 -0
- data/sig/ffi/library.rbs +42 -0
- data/sig/ffi/native_type.rbs +86 -0
- data/sig/ffi/platform.rbs +49 -0
- data/sig/ffi/pointer.rbs +42 -0
- data/sig/ffi/struct.rbs +76 -0
- data/sig/ffi/struct_by_reference.rbs +11 -0
- data/sig/ffi/struct_by_value.rbs +7 -0
- data/sig/ffi/struct_layout.rbs +9 -0
- data/sig/ffi/struct_layout_builder.rbs +5 -0
- data/sig/ffi/type.rbs +39 -0
- data/sig/ffi.rbs +29 -0
- data.tar.gz.sig +0 -0
- metadata +79 -299
- metadata.gz.sig +0 -0
- data/ext/ffi_c/libffi/.appveyor.yml +0 -66
- data/ext/ffi_c/libffi/.gitattributes +0 -4
- data/ext/ffi_c/libffi/.github/issue_template.md +0 -10
- data/ext/ffi_c/libffi/.gitignore +0 -38
- data/ext/ffi_c/libffi/.travis/ar-lib +0 -270
- data/ext/ffi_c/libffi/.travis/bfin-sim.exp +0 -58
- data/ext/ffi_c/libffi/.travis/build-cross-in-container.sh +0 -14
- data/ext/ffi_c/libffi/.travis/build-in-container.sh +0 -12
- data/ext/ffi_c/libffi/.travis/build.sh +0 -142
- data/ext/ffi_c/libffi/.travis/install.sh +0 -71
- data/ext/ffi_c/libffi/.travis/m32r-sim.exp +0 -58
- data/ext/ffi_c/libffi/.travis/moxie-sim.exp +0 -60
- data/ext/ffi_c/libffi/.travis/or1k-sim.exp +0 -58
- data/ext/ffi_c/libffi/.travis/powerpc-eabisim.exp +0 -58
- data/ext/ffi_c/libffi/.travis/site.exp +0 -27
- data/ext/ffi_c/libffi/.travis/wine-sim.exp +0 -55
- data/ext/ffi_c/libffi/.travis.yml +0 -83
- data/ext/ffi_c/libffi/src/nios2/ffi.c +0 -304
- data/ext/ffi_c/libffi/src/nios2/ffitarget.h +0 -52
- data/ext/ffi_c/libffi/src/nios2/sysv.S +0 -136
- data/ext/ffi_c/libffi/testsuite/Makefile.am +0 -122
- data/ext/ffi_c/libffi/testsuite/config/default.exp +0 -1
- data/ext/ffi_c/libffi/testsuite/lib/libffi.exp +0 -660
- data/ext/ffi_c/libffi/testsuite/lib/target-libpath.exp +0 -283
- data/ext/ffi_c/libffi/testsuite/lib/wrapper.exp +0 -45
- data/ext/ffi_c/libffi/testsuite/libffi.bhaible/Makefile +0 -28
- data/ext/ffi_c/libffi/testsuite/libffi.bhaible/README +0 -78
- data/ext/ffi_c/libffi/testsuite/libffi.bhaible/alignof.h +0 -50
- data/ext/ffi_c/libffi/testsuite/libffi.bhaible/bhaible.exp +0 -63
- data/ext/ffi_c/libffi/testsuite/libffi.bhaible/test-call.c +0 -1745
- data/ext/ffi_c/libffi/testsuite/libffi.bhaible/test-callback.c +0 -2885
- data/ext/ffi_c/libffi/testsuite/libffi.bhaible/testcases.c +0 -743
- data/ext/ffi_c/libffi/testsuite/libffi.call/align_mixed.c +0 -46
- data/ext/ffi_c/libffi/testsuite/libffi.call/align_stdcall.c +0 -46
- data/ext/ffi_c/libffi/testsuite/libffi.call/call.exp +0 -54
- data/ext/ffi_c/libffi/testsuite/libffi.call/err_bad_typedef.c +0 -26
- data/ext/ffi_c/libffi/testsuite/libffi.call/ffitest.h +0 -138
- data/ext/ffi_c/libffi/testsuite/libffi.call/float.c +0 -59
- data/ext/ffi_c/libffi/testsuite/libffi.call/float1.c +0 -60
- data/ext/ffi_c/libffi/testsuite/libffi.call/float2.c +0 -61
- data/ext/ffi_c/libffi/testsuite/libffi.call/float3.c +0 -74
- data/ext/ffi_c/libffi/testsuite/libffi.call/float4.c +0 -62
- data/ext/ffi_c/libffi/testsuite/libffi.call/float_va.c +0 -107
- data/ext/ffi_c/libffi/testsuite/libffi.call/many.c +0 -59
- data/ext/ffi_c/libffi/testsuite/libffi.call/many2.c +0 -57
- data/ext/ffi_c/libffi/testsuite/libffi.call/many_double.c +0 -70
- data/ext/ffi_c/libffi/testsuite/libffi.call/many_mixed.c +0 -78
- data/ext/ffi_c/libffi/testsuite/libffi.call/negint.c +0 -52
- data/ext/ffi_c/libffi/testsuite/libffi.call/offsets.c +0 -46
- data/ext/ffi_c/libffi/testsuite/libffi.call/pr1172638.c +0 -127
- data/ext/ffi_c/libffi/testsuite/libffi.call/promotion.c +0 -59
- data/ext/ffi_c/libffi/testsuite/libffi.call/pyobjc-tc.c +0 -114
- data/ext/ffi_c/libffi/testsuite/libffi.call/return_dbl.c +0 -36
- data/ext/ffi_c/libffi/testsuite/libffi.call/return_dbl1.c +0 -43
- data/ext/ffi_c/libffi/testsuite/libffi.call/return_dbl2.c +0 -42
- data/ext/ffi_c/libffi/testsuite/libffi.call/return_fl.c +0 -35
- data/ext/ffi_c/libffi/testsuite/libffi.call/return_fl1.c +0 -36
- data/ext/ffi_c/libffi/testsuite/libffi.call/return_fl2.c +0 -49
- data/ext/ffi_c/libffi/testsuite/libffi.call/return_fl3.c +0 -42
- data/ext/ffi_c/libffi/testsuite/libffi.call/return_ldl.c +0 -34
- data/ext/ffi_c/libffi/testsuite/libffi.call/return_ll.c +0 -41
- data/ext/ffi_c/libffi/testsuite/libffi.call/return_ll1.c +0 -43
- data/ext/ffi_c/libffi/testsuite/libffi.call/return_sc.c +0 -36
- data/ext/ffi_c/libffi/testsuite/libffi.call/return_sl.c +0 -38
- data/ext/ffi_c/libffi/testsuite/libffi.call/return_uc.c +0 -38
- data/ext/ffi_c/libffi/testsuite/libffi.call/return_ul.c +0 -38
- data/ext/ffi_c/libffi/testsuite/libffi.call/strlen.c +0 -44
- data/ext/ffi_c/libffi/testsuite/libffi.call/strlen2.c +0 -49
- data/ext/ffi_c/libffi/testsuite/libffi.call/strlen3.c +0 -49
- data/ext/ffi_c/libffi/testsuite/libffi.call/strlen4.c +0 -55
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct1.c +0 -67
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct10.c +0 -57
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct2.c +0 -67
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct3.c +0 -60
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct4.c +0 -64
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct5.c +0 -66
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct6.c +0 -64
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct7.c +0 -74
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct8.c +0 -81
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct9.c +0 -68
- data/ext/ffi_c/libffi/testsuite/libffi.call/uninitialized.c +0 -61
- data/ext/ffi_c/libffi/testsuite/libffi.call/va_1.c +0 -196
- data/ext/ffi_c/libffi/testsuite/libffi.call/va_struct1.c +0 -121
- data/ext/ffi_c/libffi/testsuite/libffi.call/va_struct2.c +0 -123
- data/ext/ffi_c/libffi/testsuite/libffi.call/va_struct3.c +0 -125
- data/ext/ffi_c/libffi/testsuite/libffi.closures/closure.exp +0 -67
- data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_fn0.c +0 -89
- data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_fn1.c +0 -81
- data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_fn2.c +0 -81
- data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_fn3.c +0 -82
- data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_fn4.c +0 -89
- data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_fn5.c +0 -92
- data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_fn6.c +0 -90
- data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_loc_fn0.c +0 -95
- data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_simple.c +0 -55
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_12byte.c +0 -94
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_16byte.c +0 -95
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_18byte.c +0 -96
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_19byte.c +0 -102
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_1_1byte.c +0 -89
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_20byte.c +0 -91
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_20byte1.c +0 -93
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_24byte.c +0 -113
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_2byte.c +0 -90
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_3_1byte.c +0 -95
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_3byte1.c +0 -90
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_3byte2.c +0 -90
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_3float.c +0 -95
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_4_1byte.c +0 -98
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_4byte.c +0 -90
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_5_1_byte.c +0 -109
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_5byte.c +0 -98
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_64byte.c +0 -124
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_6_1_byte.c +0 -113
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_6byte.c +0 -99
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_7_1_byte.c +0 -117
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_7byte.c +0 -97
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_8byte.c +0 -88
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_9byte1.c +0 -90
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_9byte2.c +0 -91
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_double.c +0 -93
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_float.c +0 -91
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_longdouble.c +0 -92
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_longdouble_split.c +0 -132
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_longdouble_split2.c +0 -115
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_pointer.c +0 -95
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_sint16.c +0 -91
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_sint32.c +0 -91
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_sint64.c +0 -92
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_uint16.c +0 -91
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_uint32.c +0 -91
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_uint64.c +0 -93
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_dbls_struct.c +0 -66
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_double.c +0 -43
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_double_va.c +0 -61
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_float.c +0 -42
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_longdouble.c +0 -105
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_longdouble_va.c +0 -61
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_many_mixed_args.c +0 -70
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_many_mixed_float_double.c +0 -55
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_multi_schar.c +0 -74
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_multi_sshort.c +0 -74
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_multi_sshortchar.c +0 -86
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_multi_uchar.c +0 -91
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_multi_ushort.c +0 -74
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_multi_ushortchar.c +0 -86
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_pointer.c +0 -74
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_pointer_stack.c +0 -142
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_schar.c +0 -44
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_sint.c +0 -42
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_sshort.c +0 -42
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_struct_va1.c +0 -114
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_uchar.c +0 -42
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_uchar_va.c +0 -44
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_uint.c +0 -43
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_uint_va.c +0 -45
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_ulong_va.c +0 -45
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_ulonglong.c +0 -47
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_ushort.c +0 -43
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_ushort_va.c +0 -44
- data/ext/ffi_c/libffi/testsuite/libffi.closures/err_bad_abi.c +0 -36
- data/ext/ffi_c/libffi/testsuite/libffi.closures/ffitest.h +0 -138
- data/ext/ffi_c/libffi/testsuite/libffi.closures/huge_struct.c +0 -343
- data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct.c +0 -152
- data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct1.c +0 -161
- data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct10.c +0 -134
- data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct11.c +0 -121
- data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct2.c +0 -110
- data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct3.c +0 -111
- data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct4.c +0 -111
- data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct5.c +0 -112
- data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct6.c +0 -131
- data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct7.c +0 -111
- data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct8.c +0 -131
- data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct9.c +0 -131
- data/ext/ffi_c/libffi/testsuite/libffi.closures/problem1.c +0 -90
- data/ext/ffi_c/libffi/testsuite/libffi.closures/stret_large.c +0 -145
- data/ext/ffi_c/libffi/testsuite/libffi.closures/stret_large2.c +0 -148
- data/ext/ffi_c/libffi/testsuite/libffi.closures/stret_medium.c +0 -124
- data/ext/ffi_c/libffi/testsuite/libffi.closures/stret_medium2.c +0 -125
- data/ext/ffi_c/libffi/testsuite/libffi.closures/testclosure.c +0 -70
- data/ext/ffi_c/libffi/testsuite/libffi.closures/unwindtest.cc +0 -117
- data/ext/ffi_c/libffi/testsuite/libffi.closures/unwindtest_ffi_call.cc +0 -54
- data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_align_complex.inc +0 -91
- data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_align_complex_double.c +0 -10
- data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_align_complex_float.c +0 -10
- data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_align_complex_longdouble.c +0 -10
- data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex.inc +0 -42
- data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_double.c +0 -10
- data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_float.c +0 -10
- data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_longdouble.c +0 -10
- data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_struct.inc +0 -71
- data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_struct_double.c +0 -10
- data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_struct_float.c +0 -10
- data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_struct_longdouble.c +0 -10
- data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_va.inc +0 -80
- data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_va_double.c +0 -10
- data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_va_float.c +0 -16
- data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_va_longdouble.c +0 -10
- data/ext/ffi_c/libffi/testsuite/libffi.complex/complex.exp +0 -36
- data/ext/ffi_c/libffi/testsuite/libffi.complex/complex.inc +0 -51
- data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_defs_double.inc +0 -7
- data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_defs_float.inc +0 -7
- data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_defs_longdouble.inc +0 -7
- data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_double.c +0 -10
- data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_float.c +0 -10
- data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_int.c +0 -86
- data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_longdouble.c +0 -10
- data/ext/ffi_c/libffi/testsuite/libffi.complex/ffitest.h +0 -1
- data/ext/ffi_c/libffi/testsuite/libffi.complex/many_complex.inc +0 -78
- data/ext/ffi_c/libffi/testsuite/libffi.complex/many_complex_double.c +0 -10
- data/ext/ffi_c/libffi/testsuite/libffi.complex/many_complex_float.c +0 -10
- data/ext/ffi_c/libffi/testsuite/libffi.complex/many_complex_longdouble.c +0 -10
- data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex.inc +0 -37
- data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex1.inc +0 -41
- data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex1_double.c +0 -10
- data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex1_float.c +0 -10
- data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex1_longdouble.c +0 -10
- data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex2.inc +0 -44
- data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex2_double.c +0 -10
- data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex2_float.c +0 -10
- data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex2_longdouble.c +0 -10
- data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex_double.c +0 -10
- data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex_float.c +0 -10
- data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex_longdouble.c +0 -10
- data/ext/ffi_c/libffi/testsuite/libffi.go/aa-direct.c +0 -34
- data/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c +0 -28
- data/ext/ffi_c/libffi/testsuite/libffi.go/ffitest.h +0 -1
- data/ext/ffi_c/libffi/testsuite/libffi.go/go.exp +0 -36
- data/ext/ffi_c/libffi/testsuite/libffi.go/static-chain.h +0 -19
- data/lib/ffi/tools/types_generator.rb +0 -137
- data/rakelib/ffi_gem_helper.rb +0 -65
- /data/lib/ffi/platform/{sparc64-linux → sparcv9-linux}/types.conf +0 -0
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
#! /bin/sh
|
|
2
2
|
# Attempt to guess a canonical system name.
|
|
3
|
-
# Copyright 1992-
|
|
3
|
+
# Copyright 1992-2024 Free Software Foundation, Inc.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
# shellcheck disable=SC2006,SC2268 # see below for rationale
|
|
6
|
+
|
|
7
|
+
timestamp='2024-01-01'
|
|
6
8
|
|
|
7
9
|
# This file is free software; you can redistribute it and/or modify it
|
|
8
10
|
# under the terms of the GNU General Public License as published by
|
|
9
|
-
# the Free Software Foundation
|
|
11
|
+
# the Free Software Foundation, either version 3 of the License, or
|
|
10
12
|
# (at your option) any later version.
|
|
11
13
|
#
|
|
12
14
|
# This program is distributed in the hope that it will be useful, but
|
|
@@ -27,17 +29,25 @@ timestamp='2020-07-12'
|
|
|
27
29
|
# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
|
|
28
30
|
#
|
|
29
31
|
# You can get the latest version of this script from:
|
|
30
|
-
# https://git.savannah.gnu.org/
|
|
32
|
+
# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
|
|
31
33
|
#
|
|
32
34
|
# Please send patches to <config-patches@gnu.org>.
|
|
33
35
|
|
|
34
36
|
|
|
37
|
+
# The "shellcheck disable" line above the timestamp inhibits complaints
|
|
38
|
+
# about features and limitations of the classic Bourne shell that were
|
|
39
|
+
# superseded or lifted in POSIX. However, this script identifies a wide
|
|
40
|
+
# variety of pre-POSIX systems that do not have POSIX shells at all, and
|
|
41
|
+
# even some reasonably current systems (Solaris 10 as case-in-point) still
|
|
42
|
+
# have a pre-POSIX /bin/sh.
|
|
43
|
+
|
|
44
|
+
|
|
35
45
|
me=`echo "$0" | sed -e 's,.*/,,'`
|
|
36
46
|
|
|
37
47
|
usage="\
|
|
38
48
|
Usage: $0 [OPTION]
|
|
39
49
|
|
|
40
|
-
Output the configuration name of the system
|
|
50
|
+
Output the configuration name of the system '$me' is run on.
|
|
41
51
|
|
|
42
52
|
Options:
|
|
43
53
|
-h, --help print this help, then exit
|
|
@@ -50,13 +60,13 @@ version="\
|
|
|
50
60
|
GNU config.guess ($timestamp)
|
|
51
61
|
|
|
52
62
|
Originally written by Per Bothner.
|
|
53
|
-
Copyright 1992-
|
|
63
|
+
Copyright 1992-2024 Free Software Foundation, Inc.
|
|
54
64
|
|
|
55
65
|
This is free software; see the source for copying conditions. There is NO
|
|
56
66
|
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
|
57
67
|
|
|
58
68
|
help="
|
|
59
|
-
Try
|
|
69
|
+
Try '$me --help' for more information."
|
|
60
70
|
|
|
61
71
|
# Parse command line
|
|
62
72
|
while test $# -gt 0 ; do
|
|
@@ -84,13 +94,16 @@ if test $# != 0; then
|
|
|
84
94
|
exit 1
|
|
85
95
|
fi
|
|
86
96
|
|
|
97
|
+
# Just in case it came from the environment.
|
|
98
|
+
GUESS=
|
|
99
|
+
|
|
87
100
|
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
|
|
88
101
|
# compiler to aid in system detection is discouraged as it requires
|
|
89
102
|
# temporary files to be created and, as you can see below, it is a
|
|
90
103
|
# headache to deal with in a portable fashion.
|
|
91
104
|
|
|
92
|
-
# Historically,
|
|
93
|
-
# use
|
|
105
|
+
# Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still
|
|
106
|
+
# use 'HOST_CC' if defined, but it is deprecated.
|
|
94
107
|
|
|
95
108
|
# Portable tmp directory creation inspired by the Autoconf team.
|
|
96
109
|
|
|
@@ -102,7 +115,7 @@ set_cc_for_build() {
|
|
|
102
115
|
# prevent multiple calls if $tmp is already set
|
|
103
116
|
test "$tmp" && return 0
|
|
104
117
|
: "${TMPDIR=/tmp}"
|
|
105
|
-
# shellcheck disable=SC2039
|
|
118
|
+
# shellcheck disable=SC2039,SC3028
|
|
106
119
|
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
|
|
107
120
|
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
|
|
108
121
|
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
|
|
@@ -112,7 +125,7 @@ set_cc_for_build() {
|
|
|
112
125
|
,,) echo "int x;" > "$dummy.c"
|
|
113
126
|
for driver in cc gcc c89 c99 ; do
|
|
114
127
|
if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
|
|
115
|
-
CC_FOR_BUILD
|
|
128
|
+
CC_FOR_BUILD=$driver
|
|
116
129
|
break
|
|
117
130
|
fi
|
|
118
131
|
done
|
|
@@ -133,40 +146,57 @@ fi
|
|
|
133
146
|
|
|
134
147
|
UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
|
|
135
148
|
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
|
|
136
|
-
UNAME_SYSTEM=`(uname -s) 2>/dev/null`
|
|
149
|
+
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
|
|
137
150
|
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
|
|
138
151
|
|
|
139
|
-
case
|
|
152
|
+
case $UNAME_SYSTEM in
|
|
140
153
|
Linux|GNU|GNU/*)
|
|
141
|
-
|
|
142
|
-
# We could probably try harder.
|
|
143
|
-
LIBC=gnu
|
|
154
|
+
LIBC=unknown
|
|
144
155
|
|
|
145
156
|
set_cc_for_build
|
|
146
157
|
cat <<-EOF > "$dummy.c"
|
|
158
|
+
#if defined(__ANDROID__)
|
|
159
|
+
LIBC=android
|
|
160
|
+
#else
|
|
147
161
|
#include <features.h>
|
|
148
162
|
#if defined(__UCLIBC__)
|
|
149
163
|
LIBC=uclibc
|
|
150
164
|
#elif defined(__dietlibc__)
|
|
151
165
|
LIBC=dietlibc
|
|
152
|
-
#
|
|
166
|
+
#elif defined(__GLIBC__)
|
|
153
167
|
LIBC=gnu
|
|
168
|
+
#elif defined(__LLVM_LIBC__)
|
|
169
|
+
LIBC=llvm
|
|
170
|
+
#else
|
|
171
|
+
#include <stdarg.h>
|
|
172
|
+
/* First heuristic to detect musl libc. */
|
|
173
|
+
#ifdef __DEFINED_va_list
|
|
174
|
+
LIBC=musl
|
|
175
|
+
#endif
|
|
176
|
+
#endif
|
|
154
177
|
#endif
|
|
155
178
|
EOF
|
|
156
|
-
|
|
179
|
+
cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
|
|
180
|
+
eval "$cc_set_libc"
|
|
157
181
|
|
|
158
|
-
#
|
|
159
|
-
if
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
182
|
+
# Second heuristic to detect musl libc.
|
|
183
|
+
if [ "$LIBC" = unknown ] &&
|
|
184
|
+
command -v ldd >/dev/null &&
|
|
185
|
+
ldd --version 2>&1 | grep -q ^musl; then
|
|
186
|
+
LIBC=musl
|
|
187
|
+
fi
|
|
188
|
+
|
|
189
|
+
# If the system lacks a compiler, then just pick glibc.
|
|
190
|
+
# We could probably try harder.
|
|
191
|
+
if [ "$LIBC" = unknown ]; then
|
|
192
|
+
LIBC=gnu
|
|
163
193
|
fi
|
|
164
194
|
;;
|
|
165
195
|
esac
|
|
166
196
|
|
|
167
197
|
# Note: order is significant - the case branches are not exclusive.
|
|
168
198
|
|
|
169
|
-
case
|
|
199
|
+
case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
|
|
170
200
|
*:NetBSD:*:*)
|
|
171
201
|
# NetBSD (nbsd) targets should (where applicable) match one or
|
|
172
202
|
# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
|
|
@@ -178,12 +208,12 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
|
|
|
178
208
|
#
|
|
179
209
|
# Note: NetBSD doesn't particularly care about the vendor
|
|
180
210
|
# portion of the name. We always set it to "unknown".
|
|
181
|
-
sysctl="sysctl -n hw.machine_arch"
|
|
182
211
|
UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
|
|
183
|
-
|
|
184
|
-
|
|
212
|
+
/sbin/sysctl -n hw.machine_arch 2>/dev/null || \
|
|
213
|
+
/usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \
|
|
185
214
|
echo unknown)`
|
|
186
|
-
case
|
|
215
|
+
case $UNAME_MACHINE_ARCH in
|
|
216
|
+
aarch64eb) machine=aarch64_be-unknown ;;
|
|
187
217
|
armeb) machine=armeb-unknown ;;
|
|
188
218
|
arm*) machine=arm-unknown ;;
|
|
189
219
|
sh3el) machine=shl-unknown ;;
|
|
@@ -192,13 +222,13 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
|
|
|
192
222
|
earmv*)
|
|
193
223
|
arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
|
|
194
224
|
endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
|
|
195
|
-
machine
|
|
225
|
+
machine=${arch}${endian}-unknown
|
|
196
226
|
;;
|
|
197
|
-
*) machine
|
|
227
|
+
*) machine=$UNAME_MACHINE_ARCH-unknown ;;
|
|
198
228
|
esac
|
|
199
229
|
# The Operating System including object format, if it has switched
|
|
200
230
|
# to ELF recently (or will in the future) and ABI.
|
|
201
|
-
case
|
|
231
|
+
case $UNAME_MACHINE_ARCH in
|
|
202
232
|
earm*)
|
|
203
233
|
os=netbsdelf
|
|
204
234
|
;;
|
|
@@ -219,7 +249,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
|
|
|
219
249
|
;;
|
|
220
250
|
esac
|
|
221
251
|
# Determine ABI tags.
|
|
222
|
-
case
|
|
252
|
+
case $UNAME_MACHINE_ARCH in
|
|
223
253
|
earm*)
|
|
224
254
|
expr='s/^earmv[0-9]/-eabi/;s/eb$//'
|
|
225
255
|
abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
|
|
@@ -230,7 +260,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
|
|
|
230
260
|
# thus, need a distinct triplet. However, they do not need
|
|
231
261
|
# kernel version information, so it can be replaced with a
|
|
232
262
|
# suitable tag, in the style of linux-gnu.
|
|
233
|
-
case
|
|
263
|
+
case $UNAME_VERSION in
|
|
234
264
|
Debian*)
|
|
235
265
|
release='-gnu'
|
|
236
266
|
;;
|
|
@@ -241,51 +271,57 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
|
|
|
241
271
|
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
|
|
242
272
|
# contains redundant information, the shorter form:
|
|
243
273
|
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
|
|
244
|
-
|
|
245
|
-
|
|
274
|
+
GUESS=$machine-${os}${release}${abi-}
|
|
275
|
+
;;
|
|
246
276
|
*:Bitrig:*:*)
|
|
247
277
|
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
|
|
248
|
-
|
|
249
|
-
|
|
278
|
+
GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE
|
|
279
|
+
;;
|
|
250
280
|
*:OpenBSD:*:*)
|
|
251
281
|
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
|
|
252
|
-
|
|
253
|
-
|
|
282
|
+
GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE
|
|
283
|
+
;;
|
|
284
|
+
*:SecBSD:*:*)
|
|
285
|
+
UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'`
|
|
286
|
+
GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE
|
|
287
|
+
;;
|
|
254
288
|
*:LibertyBSD:*:*)
|
|
255
289
|
UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
|
|
256
|
-
|
|
257
|
-
|
|
290
|
+
GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE
|
|
291
|
+
;;
|
|
258
292
|
*:MidnightBSD:*:*)
|
|
259
|
-
|
|
260
|
-
|
|
293
|
+
GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE
|
|
294
|
+
;;
|
|
261
295
|
*:ekkoBSD:*:*)
|
|
262
|
-
|
|
263
|
-
|
|
296
|
+
GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE
|
|
297
|
+
;;
|
|
264
298
|
*:SolidBSD:*:*)
|
|
265
|
-
|
|
266
|
-
|
|
299
|
+
GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE
|
|
300
|
+
;;
|
|
267
301
|
*:OS108:*:*)
|
|
268
|
-
|
|
269
|
-
|
|
302
|
+
GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE
|
|
303
|
+
;;
|
|
270
304
|
macppc:MirBSD:*:*)
|
|
271
|
-
|
|
272
|
-
|
|
305
|
+
GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE
|
|
306
|
+
;;
|
|
273
307
|
*:MirBSD:*:*)
|
|
274
|
-
|
|
275
|
-
|
|
308
|
+
GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE
|
|
309
|
+
;;
|
|
276
310
|
*:Sortix:*:*)
|
|
277
|
-
|
|
278
|
-
|
|
311
|
+
GUESS=$UNAME_MACHINE-unknown-sortix
|
|
312
|
+
;;
|
|
279
313
|
*:Twizzler:*:*)
|
|
280
|
-
|
|
281
|
-
|
|
314
|
+
GUESS=$UNAME_MACHINE-unknown-twizzler
|
|
315
|
+
;;
|
|
282
316
|
*:Redox:*:*)
|
|
283
|
-
|
|
284
|
-
|
|
317
|
+
GUESS=$UNAME_MACHINE-unknown-redox
|
|
318
|
+
;;
|
|
285
319
|
mips:OSF1:*.*)
|
|
286
|
-
|
|
287
|
-
|
|
320
|
+
GUESS=mips-dec-osf1
|
|
321
|
+
;;
|
|
288
322
|
alpha:OSF1:*:*)
|
|
323
|
+
# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
|
|
324
|
+
trap '' 0
|
|
289
325
|
case $UNAME_RELEASE in
|
|
290
326
|
*4.0)
|
|
291
327
|
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
|
|
@@ -299,7 +335,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
|
|
|
299
335
|
# covers most systems running today. This code pipes the CPU
|
|
300
336
|
# types through head -n 1, so we only detect the type of CPU 0.
|
|
301
337
|
ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
|
|
302
|
-
case
|
|
338
|
+
case $ALPHA_CPU_TYPE in
|
|
303
339
|
"EV4 (21064)")
|
|
304
340
|
UNAME_MACHINE=alpha ;;
|
|
305
341
|
"EV4.5 (21064)")
|
|
@@ -336,117 +372,121 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
|
|
|
336
372
|
# A Tn.n version is a released field test version.
|
|
337
373
|
# A Xn.n version is an unreleased experimental baselevel.
|
|
338
374
|
# 1.2 uses "1.2" for uname -r.
|
|
339
|
-
echo "$
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
trap '' 0
|
|
343
|
-
exit $exitcode ;;
|
|
375
|
+
OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
|
|
376
|
+
GUESS=$UNAME_MACHINE-dec-osf$OSF_REL
|
|
377
|
+
;;
|
|
344
378
|
Amiga*:UNIX_System_V:4.0:*)
|
|
345
|
-
|
|
346
|
-
|
|
379
|
+
GUESS=m68k-unknown-sysv4
|
|
380
|
+
;;
|
|
347
381
|
*:[Aa]miga[Oo][Ss]:*:*)
|
|
348
|
-
|
|
349
|
-
|
|
382
|
+
GUESS=$UNAME_MACHINE-unknown-amigaos
|
|
383
|
+
;;
|
|
350
384
|
*:[Mm]orph[Oo][Ss]:*:*)
|
|
351
|
-
|
|
352
|
-
|
|
385
|
+
GUESS=$UNAME_MACHINE-unknown-morphos
|
|
386
|
+
;;
|
|
353
387
|
*:OS/390:*:*)
|
|
354
|
-
|
|
355
|
-
|
|
388
|
+
GUESS=i370-ibm-openedition
|
|
389
|
+
;;
|
|
356
390
|
*:z/VM:*:*)
|
|
357
|
-
|
|
358
|
-
|
|
391
|
+
GUESS=s390-ibm-zvmoe
|
|
392
|
+
;;
|
|
359
393
|
*:OS400:*:*)
|
|
360
|
-
|
|
361
|
-
|
|
394
|
+
GUESS=powerpc-ibm-os400
|
|
395
|
+
;;
|
|
362
396
|
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
|
|
363
|
-
|
|
364
|
-
|
|
397
|
+
GUESS=arm-acorn-riscix$UNAME_RELEASE
|
|
398
|
+
;;
|
|
365
399
|
arm*:riscos:*:*|arm*:RISCOS:*:*)
|
|
366
|
-
|
|
367
|
-
|
|
400
|
+
GUESS=arm-unknown-riscos
|
|
401
|
+
;;
|
|
368
402
|
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
|
|
369
|
-
|
|
370
|
-
|
|
403
|
+
GUESS=hppa1.1-hitachi-hiuxmpp
|
|
404
|
+
;;
|
|
371
405
|
Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
|
|
372
406
|
# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
exit ;;
|
|
407
|
+
case `(/bin/universe) 2>/dev/null` in
|
|
408
|
+
att) GUESS=pyramid-pyramid-sysv3 ;;
|
|
409
|
+
*) GUESS=pyramid-pyramid-bsd ;;
|
|
410
|
+
esac
|
|
411
|
+
;;
|
|
379
412
|
NILE*:*:*:dcosx)
|
|
380
|
-
|
|
381
|
-
|
|
413
|
+
GUESS=pyramid-pyramid-svr4
|
|
414
|
+
;;
|
|
382
415
|
DRS?6000:unix:4.0:6*)
|
|
383
|
-
|
|
384
|
-
|
|
416
|
+
GUESS=sparc-icl-nx6
|
|
417
|
+
;;
|
|
385
418
|
DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
|
|
386
419
|
case `/usr/bin/uname -p` in
|
|
387
|
-
sparc)
|
|
388
|
-
esac
|
|
420
|
+
sparc) GUESS=sparc-icl-nx7 ;;
|
|
421
|
+
esac
|
|
422
|
+
;;
|
|
389
423
|
s390x:SunOS:*:*)
|
|
390
|
-
echo "$
|
|
391
|
-
|
|
424
|
+
SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
|
|
425
|
+
GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL
|
|
426
|
+
;;
|
|
392
427
|
sun4H:SunOS:5.*:*)
|
|
393
|
-
echo
|
|
394
|
-
|
|
428
|
+
SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
|
|
429
|
+
GUESS=sparc-hal-solaris2$SUN_REL
|
|
430
|
+
;;
|
|
395
431
|
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
|
|
396
|
-
echo
|
|
397
|
-
|
|
432
|
+
SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
|
|
433
|
+
GUESS=sparc-sun-solaris2$SUN_REL
|
|
434
|
+
;;
|
|
398
435
|
i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
|
|
399
|
-
|
|
400
|
-
|
|
436
|
+
GUESS=i386-pc-auroraux$UNAME_RELEASE
|
|
437
|
+
;;
|
|
401
438
|
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
|
|
402
439
|
set_cc_for_build
|
|
403
440
|
SUN_ARCH=i386
|
|
404
441
|
# If there is a compiler, see if it is configured for 64-bit objects.
|
|
405
442
|
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
|
|
406
443
|
# This test works for both compilers.
|
|
407
|
-
if
|
|
444
|
+
if test "$CC_FOR_BUILD" != no_compiler_found; then
|
|
408
445
|
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
|
|
409
|
-
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
|
|
446
|
+
(CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \
|
|
410
447
|
grep IS_64BIT_ARCH >/dev/null
|
|
411
448
|
then
|
|
412
449
|
SUN_ARCH=x86_64
|
|
413
450
|
fi
|
|
414
451
|
fi
|
|
415
|
-
echo "$
|
|
416
|
-
|
|
452
|
+
SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
|
|
453
|
+
GUESS=$SUN_ARCH-pc-solaris2$SUN_REL
|
|
454
|
+
;;
|
|
417
455
|
sun4*:SunOS:6*:*)
|
|
418
456
|
# According to config.sub, this is the proper way to canonicalize
|
|
419
457
|
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
|
|
420
458
|
# it's likely to be more like Solaris than SunOS4.
|
|
421
|
-
echo
|
|
422
|
-
|
|
459
|
+
SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
|
|
460
|
+
GUESS=sparc-sun-solaris3$SUN_REL
|
|
461
|
+
;;
|
|
423
462
|
sun4*:SunOS:*:*)
|
|
424
|
-
case
|
|
463
|
+
case `/usr/bin/arch -k` in
|
|
425
464
|
Series*|S4*)
|
|
426
465
|
UNAME_RELEASE=`uname -v`
|
|
427
466
|
;;
|
|
428
467
|
esac
|
|
429
|
-
# Japanese Language versions have a version number like
|
|
430
|
-
echo
|
|
431
|
-
|
|
468
|
+
# Japanese Language versions have a version number like '4.1.3-JL'.
|
|
469
|
+
SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
|
|
470
|
+
GUESS=sparc-sun-sunos$SUN_REL
|
|
471
|
+
;;
|
|
432
472
|
sun3*:SunOS:*:*)
|
|
433
|
-
|
|
434
|
-
|
|
473
|
+
GUESS=m68k-sun-sunos$UNAME_RELEASE
|
|
474
|
+
;;
|
|
435
475
|
sun*:*:4.2BSD:*)
|
|
436
476
|
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
|
|
437
477
|
test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
|
|
438
|
-
case
|
|
478
|
+
case `/bin/arch` in
|
|
439
479
|
sun3)
|
|
440
|
-
|
|
480
|
+
GUESS=m68k-sun-sunos$UNAME_RELEASE
|
|
441
481
|
;;
|
|
442
482
|
sun4)
|
|
443
|
-
|
|
483
|
+
GUESS=sparc-sun-sunos$UNAME_RELEASE
|
|
444
484
|
;;
|
|
445
485
|
esac
|
|
446
|
-
|
|
486
|
+
;;
|
|
447
487
|
aushp:SunOS:*:*)
|
|
448
|
-
|
|
449
|
-
|
|
488
|
+
GUESS=sparc-auspex-sunos$UNAME_RELEASE
|
|
489
|
+
;;
|
|
450
490
|
# The situation for MiNT is a little confusing. The machine name
|
|
451
491
|
# can be virtually everything (everything which is not
|
|
452
492
|
# "atarist" or "atariste" at least should have a processor
|
|
@@ -456,41 +496,41 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
|
|
|
456
496
|
# MiNT. But MiNT is downward compatible to TOS, so this should
|
|
457
497
|
# be no problem.
|
|
458
498
|
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
|
|
459
|
-
|
|
460
|
-
|
|
499
|
+
GUESS=m68k-atari-mint$UNAME_RELEASE
|
|
500
|
+
;;
|
|
461
501
|
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
|
|
462
|
-
|
|
463
|
-
|
|
502
|
+
GUESS=m68k-atari-mint$UNAME_RELEASE
|
|
503
|
+
;;
|
|
464
504
|
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
|
|
465
|
-
|
|
466
|
-
|
|
505
|
+
GUESS=m68k-atari-mint$UNAME_RELEASE
|
|
506
|
+
;;
|
|
467
507
|
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
|
|
468
|
-
|
|
469
|
-
|
|
508
|
+
GUESS=m68k-milan-mint$UNAME_RELEASE
|
|
509
|
+
;;
|
|
470
510
|
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
|
|
471
|
-
|
|
472
|
-
|
|
511
|
+
GUESS=m68k-hades-mint$UNAME_RELEASE
|
|
512
|
+
;;
|
|
473
513
|
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
|
|
474
|
-
|
|
475
|
-
|
|
514
|
+
GUESS=m68k-unknown-mint$UNAME_RELEASE
|
|
515
|
+
;;
|
|
476
516
|
m68k:machten:*:*)
|
|
477
|
-
|
|
478
|
-
|
|
517
|
+
GUESS=m68k-apple-machten$UNAME_RELEASE
|
|
518
|
+
;;
|
|
479
519
|
powerpc:machten:*:*)
|
|
480
|
-
|
|
481
|
-
|
|
520
|
+
GUESS=powerpc-apple-machten$UNAME_RELEASE
|
|
521
|
+
;;
|
|
482
522
|
RISC*:Mach:*:*)
|
|
483
|
-
|
|
484
|
-
|
|
523
|
+
GUESS=mips-dec-mach_bsd4.3
|
|
524
|
+
;;
|
|
485
525
|
RISC*:ULTRIX:*:*)
|
|
486
|
-
|
|
487
|
-
|
|
526
|
+
GUESS=mips-dec-ultrix$UNAME_RELEASE
|
|
527
|
+
;;
|
|
488
528
|
VAX*:ULTRIX*:*:*)
|
|
489
|
-
|
|
490
|
-
|
|
529
|
+
GUESS=vax-dec-ultrix$UNAME_RELEASE
|
|
530
|
+
;;
|
|
491
531
|
2020:CLIX:*:* | 2430:CLIX:*:*)
|
|
492
|
-
|
|
493
|
-
|
|
532
|
+
GUESS=clipper-intergraph-clix$UNAME_RELEASE
|
|
533
|
+
;;
|
|
494
534
|
mips:*:*:UMIPS | mips:*:*:RISCos)
|
|
495
535
|
set_cc_for_build
|
|
496
536
|
sed 's/^ //' << EOF > "$dummy.c"
|
|
@@ -518,75 +558,76 @@ EOF
|
|
|
518
558
|
dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
|
|
519
559
|
SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
|
|
520
560
|
{ echo "$SYSTEM_NAME"; exit; }
|
|
521
|
-
|
|
522
|
-
|
|
561
|
+
GUESS=mips-mips-riscos$UNAME_RELEASE
|
|
562
|
+
;;
|
|
523
563
|
Motorola:PowerMAX_OS:*:*)
|
|
524
|
-
|
|
525
|
-
|
|
564
|
+
GUESS=powerpc-motorola-powermax
|
|
565
|
+
;;
|
|
526
566
|
Motorola:*:4.3:PL8-*)
|
|
527
|
-
|
|
528
|
-
|
|
567
|
+
GUESS=powerpc-harris-powermax
|
|
568
|
+
;;
|
|
529
569
|
Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
|
|
530
|
-
|
|
531
|
-
|
|
570
|
+
GUESS=powerpc-harris-powermax
|
|
571
|
+
;;
|
|
532
572
|
Night_Hawk:Power_UNIX:*:*)
|
|
533
|
-
|
|
534
|
-
|
|
573
|
+
GUESS=powerpc-harris-powerunix
|
|
574
|
+
;;
|
|
535
575
|
m88k:CX/UX:7*:*)
|
|
536
|
-
|
|
537
|
-
|
|
576
|
+
GUESS=m88k-harris-cxux7
|
|
577
|
+
;;
|
|
538
578
|
m88k:*:4*:R4*)
|
|
539
|
-
|
|
540
|
-
|
|
579
|
+
GUESS=m88k-motorola-sysv4
|
|
580
|
+
;;
|
|
541
581
|
m88k:*:3*:R3*)
|
|
542
|
-
|
|
543
|
-
|
|
582
|
+
GUESS=m88k-motorola-sysv3
|
|
583
|
+
;;
|
|
544
584
|
AViiON:dgux:*:*)
|
|
545
585
|
# DG/UX returns AViiON for all architectures
|
|
546
586
|
UNAME_PROCESSOR=`/usr/bin/uname -p`
|
|
547
|
-
if
|
|
587
|
+
if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110
|
|
548
588
|
then
|
|
549
|
-
if
|
|
550
|
-
|
|
589
|
+
if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \
|
|
590
|
+
test "$TARGET_BINARY_INTERFACE"x = x
|
|
551
591
|
then
|
|
552
|
-
|
|
592
|
+
GUESS=m88k-dg-dgux$UNAME_RELEASE
|
|
553
593
|
else
|
|
554
|
-
|
|
594
|
+
GUESS=m88k-dg-dguxbcs$UNAME_RELEASE
|
|
555
595
|
fi
|
|
556
596
|
else
|
|
557
|
-
|
|
597
|
+
GUESS=i586-dg-dgux$UNAME_RELEASE
|
|
558
598
|
fi
|
|
559
|
-
|
|
599
|
+
;;
|
|
560
600
|
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
|
|
561
|
-
|
|
562
|
-
|
|
601
|
+
GUESS=m88k-dolphin-sysv3
|
|
602
|
+
;;
|
|
563
603
|
M88*:*:R3*:*)
|
|
564
604
|
# Delta 88k system running SVR3
|
|
565
|
-
|
|
566
|
-
|
|
605
|
+
GUESS=m88k-motorola-sysv3
|
|
606
|
+
;;
|
|
567
607
|
XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
|
|
568
|
-
|
|
569
|
-
|
|
608
|
+
GUESS=m88k-tektronix-sysv3
|
|
609
|
+
;;
|
|
570
610
|
Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
|
|
571
|
-
|
|
572
|
-
|
|
611
|
+
GUESS=m68k-tektronix-bsd
|
|
612
|
+
;;
|
|
573
613
|
*:IRIX*:*:*)
|
|
574
|
-
echo
|
|
575
|
-
|
|
614
|
+
IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'`
|
|
615
|
+
GUESS=mips-sgi-irix$IRIX_REL
|
|
616
|
+
;;
|
|
576
617
|
????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
|
|
577
|
-
|
|
578
|
-
|
|
618
|
+
GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id
|
|
619
|
+
;; # Note that: echo "'`uname -s`'" gives 'AIX '
|
|
579
620
|
i*86:AIX:*:*)
|
|
580
|
-
|
|
581
|
-
|
|
621
|
+
GUESS=i386-ibm-aix
|
|
622
|
+
;;
|
|
582
623
|
ia64:AIX:*:*)
|
|
583
|
-
if
|
|
624
|
+
if test -x /usr/bin/oslevel ; then
|
|
584
625
|
IBM_REV=`/usr/bin/oslevel`
|
|
585
626
|
else
|
|
586
|
-
IBM_REV
|
|
627
|
+
IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
|
|
587
628
|
fi
|
|
588
|
-
|
|
589
|
-
|
|
629
|
+
GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV
|
|
630
|
+
;;
|
|
590
631
|
*:AIX:2:3)
|
|
591
632
|
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
|
|
592
633
|
set_cc_for_build
|
|
@@ -603,16 +644,16 @@ EOF
|
|
|
603
644
|
EOF
|
|
604
645
|
if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
|
|
605
646
|
then
|
|
606
|
-
|
|
647
|
+
GUESS=$SYSTEM_NAME
|
|
607
648
|
else
|
|
608
|
-
|
|
649
|
+
GUESS=rs6000-ibm-aix3.2.5
|
|
609
650
|
fi
|
|
610
651
|
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
|
|
611
|
-
|
|
652
|
+
GUESS=rs6000-ibm-aix3.2.4
|
|
612
653
|
else
|
|
613
|
-
|
|
654
|
+
GUESS=rs6000-ibm-aix3.2
|
|
614
655
|
fi
|
|
615
|
-
|
|
656
|
+
;;
|
|
616
657
|
*:AIX:*:[4567])
|
|
617
658
|
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
|
|
618
659
|
if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
|
|
@@ -620,56 +661,56 @@ EOF
|
|
|
620
661
|
else
|
|
621
662
|
IBM_ARCH=powerpc
|
|
622
663
|
fi
|
|
623
|
-
if
|
|
624
|
-
IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
|
|
664
|
+
if test -x /usr/bin/lslpp ; then
|
|
665
|
+
IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \
|
|
625
666
|
awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
|
|
626
667
|
else
|
|
627
|
-
IBM_REV
|
|
668
|
+
IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
|
|
628
669
|
fi
|
|
629
|
-
|
|
630
|
-
|
|
670
|
+
GUESS=$IBM_ARCH-ibm-aix$IBM_REV
|
|
671
|
+
;;
|
|
631
672
|
*:AIX:*:*)
|
|
632
|
-
|
|
633
|
-
|
|
673
|
+
GUESS=rs6000-ibm-aix
|
|
674
|
+
;;
|
|
634
675
|
ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
|
|
635
|
-
|
|
636
|
-
|
|
676
|
+
GUESS=romp-ibm-bsd4.4
|
|
677
|
+
;;
|
|
637
678
|
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
|
|
638
|
-
|
|
639
|
-
|
|
679
|
+
GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to
|
|
680
|
+
;; # report: romp-ibm BSD 4.3
|
|
640
681
|
*:BOSX:*:*)
|
|
641
|
-
|
|
642
|
-
|
|
682
|
+
GUESS=rs6000-bull-bosx
|
|
683
|
+
;;
|
|
643
684
|
DPX/2?00:B.O.S.:*:*)
|
|
644
|
-
|
|
645
|
-
|
|
685
|
+
GUESS=m68k-bull-sysv3
|
|
686
|
+
;;
|
|
646
687
|
9000/[34]??:4.3bsd:1.*:*)
|
|
647
|
-
|
|
648
|
-
|
|
688
|
+
GUESS=m68k-hp-bsd
|
|
689
|
+
;;
|
|
649
690
|
hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
|
|
650
|
-
|
|
651
|
-
|
|
691
|
+
GUESS=m68k-hp-bsd4.4
|
|
692
|
+
;;
|
|
652
693
|
9000/[34678]??:HP-UX:*:*)
|
|
653
|
-
HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
|
|
654
|
-
case
|
|
694
|
+
HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
|
|
695
|
+
case $UNAME_MACHINE in
|
|
655
696
|
9000/31?) HP_ARCH=m68000 ;;
|
|
656
697
|
9000/[34]??) HP_ARCH=m68k ;;
|
|
657
698
|
9000/[678][0-9][0-9])
|
|
658
|
-
if
|
|
699
|
+
if test -x /usr/bin/getconf; then
|
|
659
700
|
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
|
|
660
701
|
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
|
|
661
|
-
case
|
|
702
|
+
case $sc_cpu_version in
|
|
662
703
|
523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
|
|
663
704
|
528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
|
|
664
705
|
532) # CPU_PA_RISC2_0
|
|
665
|
-
case
|
|
706
|
+
case $sc_kernel_bits in
|
|
666
707
|
32) HP_ARCH=hppa2.0n ;;
|
|
667
708
|
64) HP_ARCH=hppa2.0w ;;
|
|
668
709
|
'') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
|
|
669
710
|
esac ;;
|
|
670
711
|
esac
|
|
671
712
|
fi
|
|
672
|
-
if
|
|
713
|
+
if test "$HP_ARCH" = ""; then
|
|
673
714
|
set_cc_for_build
|
|
674
715
|
sed 's/^ //' << EOF > "$dummy.c"
|
|
675
716
|
|
|
@@ -708,7 +749,7 @@ EOF
|
|
|
708
749
|
test -z "$HP_ARCH" && HP_ARCH=hppa
|
|
709
750
|
fi ;;
|
|
710
751
|
esac
|
|
711
|
-
if
|
|
752
|
+
if test "$HP_ARCH" = hppa2.0w
|
|
712
753
|
then
|
|
713
754
|
set_cc_for_build
|
|
714
755
|
|
|
@@ -729,12 +770,12 @@ EOF
|
|
|
729
770
|
HP_ARCH=hppa64
|
|
730
771
|
fi
|
|
731
772
|
fi
|
|
732
|
-
|
|
733
|
-
|
|
773
|
+
GUESS=$HP_ARCH-hp-hpux$HPUX_REV
|
|
774
|
+
;;
|
|
734
775
|
ia64:HP-UX:*:*)
|
|
735
|
-
HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
|
|
736
|
-
|
|
737
|
-
|
|
776
|
+
HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
|
|
777
|
+
GUESS=ia64-hp-hpux$HPUX_REV
|
|
778
|
+
;;
|
|
738
779
|
3050*:HI-UX:*:*)
|
|
739
780
|
set_cc_for_build
|
|
740
781
|
sed 's/^ //' << EOF > "$dummy.c"
|
|
@@ -764,36 +805,36 @@ EOF
|
|
|
764
805
|
EOF
|
|
765
806
|
$CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
|
|
766
807
|
{ echo "$SYSTEM_NAME"; exit; }
|
|
767
|
-
|
|
768
|
-
|
|
808
|
+
GUESS=unknown-hitachi-hiuxwe2
|
|
809
|
+
;;
|
|
769
810
|
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
|
|
770
|
-
|
|
771
|
-
|
|
811
|
+
GUESS=hppa1.1-hp-bsd
|
|
812
|
+
;;
|
|
772
813
|
9000/8??:4.3bsd:*:*)
|
|
773
|
-
|
|
774
|
-
|
|
814
|
+
GUESS=hppa1.0-hp-bsd
|
|
815
|
+
;;
|
|
775
816
|
*9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
|
|
776
|
-
|
|
777
|
-
|
|
817
|
+
GUESS=hppa1.0-hp-mpeix
|
|
818
|
+
;;
|
|
778
819
|
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
|
|
779
|
-
|
|
780
|
-
|
|
820
|
+
GUESS=hppa1.1-hp-osf
|
|
821
|
+
;;
|
|
781
822
|
hp8??:OSF1:*:*)
|
|
782
|
-
|
|
783
|
-
|
|
823
|
+
GUESS=hppa1.0-hp-osf
|
|
824
|
+
;;
|
|
784
825
|
i*86:OSF1:*:*)
|
|
785
|
-
if
|
|
786
|
-
|
|
826
|
+
if test -x /usr/sbin/sysversion ; then
|
|
827
|
+
GUESS=$UNAME_MACHINE-unknown-osf1mk
|
|
787
828
|
else
|
|
788
|
-
|
|
829
|
+
GUESS=$UNAME_MACHINE-unknown-osf1
|
|
789
830
|
fi
|
|
790
|
-
|
|
831
|
+
;;
|
|
791
832
|
parisc*:Lites*:*:*)
|
|
792
|
-
|
|
793
|
-
|
|
833
|
+
GUESS=hppa1.1-hp-lites
|
|
834
|
+
;;
|
|
794
835
|
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
|
|
795
|
-
|
|
796
|
-
|
|
836
|
+
GUESS=c1-convex-bsd
|
|
837
|
+
;;
|
|
797
838
|
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
|
|
798
839
|
if getsysinfo -f scalar_acc
|
|
799
840
|
then echo c32-convex-bsd
|
|
@@ -801,17 +842,18 @@ EOF
|
|
|
801
842
|
fi
|
|
802
843
|
exit ;;
|
|
803
844
|
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
|
|
804
|
-
|
|
805
|
-
|
|
845
|
+
GUESS=c34-convex-bsd
|
|
846
|
+
;;
|
|
806
847
|
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
|
|
807
|
-
|
|
808
|
-
|
|
848
|
+
GUESS=c38-convex-bsd
|
|
849
|
+
;;
|
|
809
850
|
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
|
|
810
|
-
|
|
811
|
-
|
|
851
|
+
GUESS=c4-convex-bsd
|
|
852
|
+
;;
|
|
812
853
|
CRAY*Y-MP:*:*:*)
|
|
813
|
-
echo
|
|
814
|
-
|
|
854
|
+
CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
|
|
855
|
+
GUESS=ymp-cray-unicos$CRAY_REL
|
|
856
|
+
;;
|
|
815
857
|
CRAY*[A-Z]90:*:*:*)
|
|
816
858
|
echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
|
|
817
859
|
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
|
|
@@ -819,112 +861,153 @@ EOF
|
|
|
819
861
|
-e 's/\.[^.]*$/.X/'
|
|
820
862
|
exit ;;
|
|
821
863
|
CRAY*TS:*:*:*)
|
|
822
|
-
echo
|
|
823
|
-
|
|
864
|
+
CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
|
|
865
|
+
GUESS=t90-cray-unicos$CRAY_REL
|
|
866
|
+
;;
|
|
824
867
|
CRAY*T3E:*:*:*)
|
|
825
|
-
echo
|
|
826
|
-
|
|
868
|
+
CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
|
|
869
|
+
GUESS=alphaev5-cray-unicosmk$CRAY_REL
|
|
870
|
+
;;
|
|
827
871
|
CRAY*SV1:*:*:*)
|
|
828
|
-
echo
|
|
829
|
-
|
|
872
|
+
CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
|
|
873
|
+
GUESS=sv1-cray-unicos$CRAY_REL
|
|
874
|
+
;;
|
|
830
875
|
*:UNICOS/mp:*:*)
|
|
831
|
-
echo
|
|
832
|
-
|
|
876
|
+
CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
|
|
877
|
+
GUESS=craynv-cray-unicosmp$CRAY_REL
|
|
878
|
+
;;
|
|
833
879
|
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
|
|
834
880
|
FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
|
|
835
881
|
FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
|
|
836
882
|
FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
|
|
837
|
-
|
|
838
|
-
|
|
883
|
+
GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
|
|
884
|
+
;;
|
|
839
885
|
5000:UNIX_System_V:4.*:*)
|
|
840
886
|
FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
|
|
841
887
|
FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
|
|
842
|
-
|
|
843
|
-
|
|
888
|
+
GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
|
|
889
|
+
;;
|
|
844
890
|
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
|
|
845
|
-
|
|
846
|
-
|
|
891
|
+
GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE
|
|
892
|
+
;;
|
|
847
893
|
sparc*:BSD/OS:*:*)
|
|
848
|
-
|
|
849
|
-
|
|
894
|
+
GUESS=sparc-unknown-bsdi$UNAME_RELEASE
|
|
895
|
+
;;
|
|
850
896
|
*:BSD/OS:*:*)
|
|
851
|
-
|
|
852
|
-
|
|
897
|
+
GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE
|
|
898
|
+
;;
|
|
853
899
|
arm:FreeBSD:*:*)
|
|
854
900
|
UNAME_PROCESSOR=`uname -p`
|
|
855
901
|
set_cc_for_build
|
|
856
902
|
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
|
|
857
903
|
| grep -q __ARM_PCS_VFP
|
|
858
904
|
then
|
|
859
|
-
echo "$
|
|
905
|
+
FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
|
|
906
|
+
GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi
|
|
860
907
|
else
|
|
861
|
-
echo "$
|
|
908
|
+
FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
|
|
909
|
+
GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf
|
|
862
910
|
fi
|
|
863
|
-
|
|
911
|
+
;;
|
|
864
912
|
*:FreeBSD:*:*)
|
|
865
|
-
UNAME_PROCESSOR
|
|
866
|
-
case
|
|
913
|
+
UNAME_PROCESSOR=`uname -p`
|
|
914
|
+
case $UNAME_PROCESSOR in
|
|
867
915
|
amd64)
|
|
868
916
|
UNAME_PROCESSOR=x86_64 ;;
|
|
869
917
|
i386)
|
|
870
918
|
UNAME_PROCESSOR=i586 ;;
|
|
871
919
|
esac
|
|
872
|
-
echo "$
|
|
873
|
-
|
|
920
|
+
FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
|
|
921
|
+
GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL
|
|
922
|
+
;;
|
|
874
923
|
i*:CYGWIN*:*)
|
|
875
|
-
|
|
876
|
-
|
|
924
|
+
GUESS=$UNAME_MACHINE-pc-cygwin
|
|
925
|
+
;;
|
|
877
926
|
*:MINGW64*:*)
|
|
878
|
-
|
|
879
|
-
|
|
927
|
+
GUESS=$UNAME_MACHINE-pc-mingw64
|
|
928
|
+
;;
|
|
880
929
|
*:MINGW*:*)
|
|
881
|
-
|
|
882
|
-
|
|
930
|
+
GUESS=$UNAME_MACHINE-pc-mingw32
|
|
931
|
+
;;
|
|
883
932
|
*:MSYS*:*)
|
|
884
|
-
|
|
885
|
-
|
|
933
|
+
GUESS=$UNAME_MACHINE-pc-msys
|
|
934
|
+
;;
|
|
886
935
|
i*:PW*:*)
|
|
887
|
-
|
|
888
|
-
|
|
936
|
+
GUESS=$UNAME_MACHINE-pc-pw32
|
|
937
|
+
;;
|
|
938
|
+
*:SerenityOS:*:*)
|
|
939
|
+
GUESS=$UNAME_MACHINE-pc-serenity
|
|
940
|
+
;;
|
|
889
941
|
*:Interix*:*)
|
|
890
|
-
case
|
|
942
|
+
case $UNAME_MACHINE in
|
|
891
943
|
x86)
|
|
892
|
-
|
|
893
|
-
|
|
944
|
+
GUESS=i586-pc-interix$UNAME_RELEASE
|
|
945
|
+
;;
|
|
894
946
|
authenticamd | genuineintel | EM64T)
|
|
895
|
-
|
|
896
|
-
|
|
947
|
+
GUESS=x86_64-unknown-interix$UNAME_RELEASE
|
|
948
|
+
;;
|
|
897
949
|
IA64)
|
|
898
|
-
|
|
899
|
-
|
|
950
|
+
GUESS=ia64-unknown-interix$UNAME_RELEASE
|
|
951
|
+
;;
|
|
900
952
|
esac ;;
|
|
901
953
|
i*:UWIN*:*)
|
|
902
|
-
|
|
903
|
-
|
|
954
|
+
GUESS=$UNAME_MACHINE-pc-uwin
|
|
955
|
+
;;
|
|
904
956
|
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
|
|
905
|
-
|
|
906
|
-
|
|
957
|
+
GUESS=x86_64-pc-cygwin
|
|
958
|
+
;;
|
|
907
959
|
prep*:SunOS:5.*:*)
|
|
908
|
-
echo
|
|
909
|
-
|
|
960
|
+
SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
|
|
961
|
+
GUESS=powerpcle-unknown-solaris2$SUN_REL
|
|
962
|
+
;;
|
|
910
963
|
*:GNU:*:*)
|
|
911
964
|
# the GNU system
|
|
912
|
-
echo "
|
|
913
|
-
|
|
965
|
+
GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'`
|
|
966
|
+
GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'`
|
|
967
|
+
GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL
|
|
968
|
+
;;
|
|
914
969
|
*:GNU/*:*:*)
|
|
915
970
|
# other systems with GNU libc and userland
|
|
916
|
-
echo "$
|
|
917
|
-
|
|
971
|
+
GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"`
|
|
972
|
+
GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
|
|
973
|
+
GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
|
|
974
|
+
;;
|
|
975
|
+
x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*)
|
|
976
|
+
GUESS="$UNAME_MACHINE-pc-managarm-mlibc"
|
|
977
|
+
;;
|
|
978
|
+
*:[Mm]anagarm:*:*)
|
|
979
|
+
GUESS="$UNAME_MACHINE-unknown-managarm-mlibc"
|
|
980
|
+
;;
|
|
918
981
|
*:Minix:*:*)
|
|
919
|
-
|
|
920
|
-
|
|
982
|
+
GUESS=$UNAME_MACHINE-unknown-minix
|
|
983
|
+
;;
|
|
921
984
|
aarch64:Linux:*:*)
|
|
922
|
-
|
|
923
|
-
|
|
985
|
+
set_cc_for_build
|
|
986
|
+
CPU=$UNAME_MACHINE
|
|
987
|
+
LIBCABI=$LIBC
|
|
988
|
+
if test "$CC_FOR_BUILD" != no_compiler_found; then
|
|
989
|
+
ABI=64
|
|
990
|
+
sed 's/^ //' << EOF > "$dummy.c"
|
|
991
|
+
#ifdef __ARM_EABI__
|
|
992
|
+
#ifdef __ARM_PCS_VFP
|
|
993
|
+
ABI=eabihf
|
|
994
|
+
#else
|
|
995
|
+
ABI=eabi
|
|
996
|
+
#endif
|
|
997
|
+
#endif
|
|
998
|
+
EOF
|
|
999
|
+
cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'`
|
|
1000
|
+
eval "$cc_set_abi"
|
|
1001
|
+
case $ABI in
|
|
1002
|
+
eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;;
|
|
1003
|
+
esac
|
|
1004
|
+
fi
|
|
1005
|
+
GUESS=$CPU-unknown-linux-$LIBCABI
|
|
1006
|
+
;;
|
|
924
1007
|
aarch64_be:Linux:*:*)
|
|
925
1008
|
UNAME_MACHINE=aarch64_be
|
|
926
|
-
|
|
927
|
-
|
|
1009
|
+
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
|
1010
|
+
;;
|
|
928
1011
|
alpha:Linux:*:*)
|
|
929
1012
|
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in
|
|
930
1013
|
EV5) UNAME_MACHINE=alphaev5 ;;
|
|
@@ -937,60 +1020,72 @@ EOF
|
|
|
937
1020
|
esac
|
|
938
1021
|
objdump --private-headers /bin/sh | grep -q ld.so.1
|
|
939
1022
|
if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
arc:Linux:*:* | arceb:Linux:*:*)
|
|
943
|
-
|
|
944
|
-
|
|
1023
|
+
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
|
1024
|
+
;;
|
|
1025
|
+
arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*)
|
|
1026
|
+
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
|
1027
|
+
;;
|
|
945
1028
|
arm*:Linux:*:*)
|
|
946
1029
|
set_cc_for_build
|
|
947
1030
|
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
|
948
1031
|
| grep -q __ARM_EABI__
|
|
949
1032
|
then
|
|
950
|
-
|
|
1033
|
+
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
|
951
1034
|
else
|
|
952
1035
|
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
|
|
953
1036
|
| grep -q __ARM_PCS_VFP
|
|
954
1037
|
then
|
|
955
|
-
|
|
1038
|
+
GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi
|
|
956
1039
|
else
|
|
957
|
-
|
|
1040
|
+
GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf
|
|
958
1041
|
fi
|
|
959
1042
|
fi
|
|
960
|
-
|
|
1043
|
+
;;
|
|
961
1044
|
avr32*:Linux:*:*)
|
|
962
|
-
|
|
963
|
-
|
|
1045
|
+
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
|
1046
|
+
;;
|
|
964
1047
|
cris:Linux:*:*)
|
|
965
|
-
|
|
966
|
-
|
|
1048
|
+
GUESS=$UNAME_MACHINE-axis-linux-$LIBC
|
|
1049
|
+
;;
|
|
967
1050
|
crisv32:Linux:*:*)
|
|
968
|
-
|
|
969
|
-
|
|
1051
|
+
GUESS=$UNAME_MACHINE-axis-linux-$LIBC
|
|
1052
|
+
;;
|
|
970
1053
|
e2k:Linux:*:*)
|
|
971
|
-
|
|
972
|
-
|
|
1054
|
+
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
|
1055
|
+
;;
|
|
973
1056
|
frv:Linux:*:*)
|
|
974
|
-
|
|
975
|
-
|
|
1057
|
+
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
|
1058
|
+
;;
|
|
976
1059
|
hexagon:Linux:*:*)
|
|
977
|
-
|
|
978
|
-
|
|
1060
|
+
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
|
1061
|
+
;;
|
|
979
1062
|
i*86:Linux:*:*)
|
|
980
|
-
|
|
981
|
-
|
|
1063
|
+
GUESS=$UNAME_MACHINE-pc-linux-$LIBC
|
|
1064
|
+
;;
|
|
982
1065
|
ia64:Linux:*:*)
|
|
983
|
-
|
|
984
|
-
|
|
1066
|
+
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
|
1067
|
+
;;
|
|
985
1068
|
k1om:Linux:*:*)
|
|
986
|
-
|
|
987
|
-
|
|
1069
|
+
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
|
1070
|
+
;;
|
|
1071
|
+
kvx:Linux:*:*)
|
|
1072
|
+
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
|
1073
|
+
;;
|
|
1074
|
+
kvx:cos:*:*)
|
|
1075
|
+
GUESS=$UNAME_MACHINE-unknown-cos
|
|
1076
|
+
;;
|
|
1077
|
+
kvx:mbr:*:*)
|
|
1078
|
+
GUESS=$UNAME_MACHINE-unknown-mbr
|
|
1079
|
+
;;
|
|
1080
|
+
loongarch32:Linux:*:* | loongarch64:Linux:*:*)
|
|
1081
|
+
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
|
1082
|
+
;;
|
|
988
1083
|
m32r*:Linux:*:*)
|
|
989
|
-
|
|
990
|
-
|
|
1084
|
+
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
|
1085
|
+
;;
|
|
991
1086
|
m68*:Linux:*:*)
|
|
992
|
-
|
|
993
|
-
|
|
1087
|
+
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
|
1088
|
+
;;
|
|
994
1089
|
mips:Linux:*:* | mips64:Linux:*:*)
|
|
995
1090
|
set_cc_for_build
|
|
996
1091
|
IS_GLIBC=0
|
|
@@ -1035,123 +1130,135 @@ EOF
|
|
|
1035
1130
|
#endif
|
|
1036
1131
|
#endif
|
|
1037
1132
|
EOF
|
|
1038
|
-
|
|
1133
|
+
cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`
|
|
1134
|
+
eval "$cc_set_vars"
|
|
1039
1135
|
test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
|
|
1040
1136
|
;;
|
|
1041
1137
|
mips64el:Linux:*:*)
|
|
1042
|
-
|
|
1043
|
-
|
|
1138
|
+
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
|
1139
|
+
;;
|
|
1044
1140
|
openrisc*:Linux:*:*)
|
|
1045
|
-
|
|
1046
|
-
|
|
1141
|
+
GUESS=or1k-unknown-linux-$LIBC
|
|
1142
|
+
;;
|
|
1047
1143
|
or32:Linux:*:* | or1k*:Linux:*:*)
|
|
1048
|
-
|
|
1049
|
-
|
|
1144
|
+
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
|
1145
|
+
;;
|
|
1050
1146
|
padre:Linux:*:*)
|
|
1051
|
-
|
|
1052
|
-
|
|
1147
|
+
GUESS=sparc-unknown-linux-$LIBC
|
|
1148
|
+
;;
|
|
1053
1149
|
parisc64:Linux:*:* | hppa64:Linux:*:*)
|
|
1054
|
-
|
|
1055
|
-
|
|
1150
|
+
GUESS=hppa64-unknown-linux-$LIBC
|
|
1151
|
+
;;
|
|
1056
1152
|
parisc:Linux:*:* | hppa:Linux:*:*)
|
|
1057
1153
|
# Look for CPU level
|
|
1058
1154
|
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
|
|
1059
|
-
PA7*)
|
|
1060
|
-
PA8*)
|
|
1061
|
-
*)
|
|
1155
|
+
PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;;
|
|
1156
|
+
PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;;
|
|
1157
|
+
*) GUESS=hppa-unknown-linux-$LIBC ;;
|
|
1062
1158
|
esac
|
|
1063
|
-
|
|
1159
|
+
;;
|
|
1064
1160
|
ppc64:Linux:*:*)
|
|
1065
|
-
|
|
1066
|
-
|
|
1161
|
+
GUESS=powerpc64-unknown-linux-$LIBC
|
|
1162
|
+
;;
|
|
1067
1163
|
ppc:Linux:*:*)
|
|
1068
|
-
|
|
1069
|
-
|
|
1164
|
+
GUESS=powerpc-unknown-linux-$LIBC
|
|
1165
|
+
;;
|
|
1070
1166
|
ppc64le:Linux:*:*)
|
|
1071
|
-
|
|
1072
|
-
|
|
1167
|
+
GUESS=powerpc64le-unknown-linux-$LIBC
|
|
1168
|
+
;;
|
|
1073
1169
|
ppcle:Linux:*:*)
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
riscv32:Linux:*:* | riscv64:Linux:*:*)
|
|
1077
|
-
|
|
1078
|
-
|
|
1170
|
+
GUESS=powerpcle-unknown-linux-$LIBC
|
|
1171
|
+
;;
|
|
1172
|
+
riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*)
|
|
1173
|
+
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
|
1174
|
+
;;
|
|
1079
1175
|
s390:Linux:*:* | s390x:Linux:*:*)
|
|
1080
|
-
|
|
1081
|
-
|
|
1176
|
+
GUESS=$UNAME_MACHINE-ibm-linux-$LIBC
|
|
1177
|
+
;;
|
|
1082
1178
|
sh64*:Linux:*:*)
|
|
1083
|
-
|
|
1084
|
-
|
|
1179
|
+
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
|
1180
|
+
;;
|
|
1085
1181
|
sh*:Linux:*:*)
|
|
1086
|
-
|
|
1087
|
-
|
|
1182
|
+
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
|
1183
|
+
;;
|
|
1088
1184
|
sparc:Linux:*:* | sparc64:Linux:*:*)
|
|
1089
|
-
|
|
1090
|
-
|
|
1185
|
+
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
|
1186
|
+
;;
|
|
1091
1187
|
tile*:Linux:*:*)
|
|
1092
|
-
|
|
1093
|
-
|
|
1188
|
+
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
|
1189
|
+
;;
|
|
1094
1190
|
vax:Linux:*:*)
|
|
1095
|
-
|
|
1096
|
-
|
|
1191
|
+
GUESS=$UNAME_MACHINE-dec-linux-$LIBC
|
|
1192
|
+
;;
|
|
1097
1193
|
x86_64:Linux:*:*)
|
|
1098
1194
|
set_cc_for_build
|
|
1195
|
+
CPU=$UNAME_MACHINE
|
|
1099
1196
|
LIBCABI=$LIBC
|
|
1100
|
-
if
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1197
|
+
if test "$CC_FOR_BUILD" != no_compiler_found; then
|
|
1198
|
+
ABI=64
|
|
1199
|
+
sed 's/^ //' << EOF > "$dummy.c"
|
|
1200
|
+
#ifdef __i386__
|
|
1201
|
+
ABI=x86
|
|
1202
|
+
#else
|
|
1203
|
+
#ifdef __ILP32__
|
|
1204
|
+
ABI=x32
|
|
1205
|
+
#endif
|
|
1206
|
+
#endif
|
|
1207
|
+
EOF
|
|
1208
|
+
cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'`
|
|
1209
|
+
eval "$cc_set_abi"
|
|
1210
|
+
case $ABI in
|
|
1211
|
+
x86) CPU=i686 ;;
|
|
1212
|
+
x32) LIBCABI=${LIBC}x32 ;;
|
|
1213
|
+
esac
|
|
1107
1214
|
fi
|
|
1108
|
-
|
|
1109
|
-
|
|
1215
|
+
GUESS=$CPU-pc-linux-$LIBCABI
|
|
1216
|
+
;;
|
|
1110
1217
|
xtensa*:Linux:*:*)
|
|
1111
|
-
|
|
1112
|
-
|
|
1218
|
+
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
|
1219
|
+
;;
|
|
1113
1220
|
i*86:DYNIX/ptx:4*:*)
|
|
1114
1221
|
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
|
|
1115
1222
|
# earlier versions are messed up and put the nodename in both
|
|
1116
1223
|
# sysname and nodename.
|
|
1117
|
-
|
|
1118
|
-
|
|
1224
|
+
GUESS=i386-sequent-sysv4
|
|
1225
|
+
;;
|
|
1119
1226
|
i*86:UNIX_SV:4.2MP:2.*)
|
|
1120
1227
|
# Unixware is an offshoot of SVR4, but it has its own version
|
|
1121
1228
|
# number series starting with 2...
|
|
1122
1229
|
# I am not positive that other SVR4 systems won't match this,
|
|
1123
1230
|
# I just have to hope. -- rms.
|
|
1124
1231
|
# Use sysv4.2uw... so that sysv4* matches it.
|
|
1125
|
-
|
|
1126
|
-
|
|
1232
|
+
GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
|
|
1233
|
+
;;
|
|
1127
1234
|
i*86:OS/2:*:*)
|
|
1128
|
-
# If we were able to find
|
|
1235
|
+
# If we were able to find 'uname', then EMX Unix compatibility
|
|
1129
1236
|
# is probably installed.
|
|
1130
|
-
|
|
1131
|
-
|
|
1237
|
+
GUESS=$UNAME_MACHINE-pc-os2-emx
|
|
1238
|
+
;;
|
|
1132
1239
|
i*86:XTS-300:*:STOP)
|
|
1133
|
-
|
|
1134
|
-
|
|
1240
|
+
GUESS=$UNAME_MACHINE-unknown-stop
|
|
1241
|
+
;;
|
|
1135
1242
|
i*86:atheos:*:*)
|
|
1136
|
-
|
|
1137
|
-
|
|
1243
|
+
GUESS=$UNAME_MACHINE-unknown-atheos
|
|
1244
|
+
;;
|
|
1138
1245
|
i*86:syllable:*:*)
|
|
1139
|
-
|
|
1140
|
-
|
|
1246
|
+
GUESS=$UNAME_MACHINE-pc-syllable
|
|
1247
|
+
;;
|
|
1141
1248
|
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
|
|
1142
|
-
|
|
1143
|
-
|
|
1249
|
+
GUESS=i386-unknown-lynxos$UNAME_RELEASE
|
|
1250
|
+
;;
|
|
1144
1251
|
i*86:*DOS:*:*)
|
|
1145
|
-
|
|
1146
|
-
|
|
1252
|
+
GUESS=$UNAME_MACHINE-pc-msdosdjgpp
|
|
1253
|
+
;;
|
|
1147
1254
|
i*86:*:4.*:*)
|
|
1148
1255
|
UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
|
|
1149
1256
|
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
|
|
1150
|
-
|
|
1257
|
+
GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL
|
|
1151
1258
|
else
|
|
1152
|
-
|
|
1259
|
+
GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL
|
|
1153
1260
|
fi
|
|
1154
|
-
|
|
1261
|
+
;;
|
|
1155
1262
|
i*86:*:5:[678]*)
|
|
1156
1263
|
# UnixWare 7.x, OpenUNIX and OpenServer 6.
|
|
1157
1264
|
case `/bin/uname -X | grep "^Machine"` in
|
|
@@ -1159,12 +1266,12 @@ EOF
|
|
|
1159
1266
|
*Pentium) UNAME_MACHINE=i586 ;;
|
|
1160
1267
|
*Pent*|*Celeron) UNAME_MACHINE=i686 ;;
|
|
1161
1268
|
esac
|
|
1162
|
-
|
|
1163
|
-
|
|
1269
|
+
GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
|
|
1270
|
+
;;
|
|
1164
1271
|
i*86:*:3.2:*)
|
|
1165
1272
|
if test -f /usr/options/cb.name; then
|
|
1166
1273
|
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
|
|
1167
|
-
|
|
1274
|
+
GUESS=$UNAME_MACHINE-pc-isc$UNAME_REL
|
|
1168
1275
|
elif /bin/uname -X 2>/dev/null >/dev/null ; then
|
|
1169
1276
|
UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
|
|
1170
1277
|
(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
|
|
@@ -1174,11 +1281,11 @@ EOF
|
|
|
1174
1281
|
&& UNAME_MACHINE=i686
|
|
1175
1282
|
(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
|
|
1176
1283
|
&& UNAME_MACHINE=i686
|
|
1177
|
-
|
|
1284
|
+
GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL
|
|
1178
1285
|
else
|
|
1179
|
-
|
|
1286
|
+
GUESS=$UNAME_MACHINE-pc-sysv32
|
|
1180
1287
|
fi
|
|
1181
|
-
|
|
1288
|
+
;;
|
|
1182
1289
|
pc:*:*:*)
|
|
1183
1290
|
# Left here for compatibility:
|
|
1184
1291
|
# uname -m prints for DJGPP always 'pc', but it prints nothing about
|
|
@@ -1186,31 +1293,31 @@ EOF
|
|
|
1186
1293
|
# Note: whatever this is, it MUST be the same as what config.sub
|
|
1187
1294
|
# prints for the "djgpp" host, or else GDB configure will decide that
|
|
1188
1295
|
# this is a cross-build.
|
|
1189
|
-
|
|
1190
|
-
|
|
1296
|
+
GUESS=i586-pc-msdosdjgpp
|
|
1297
|
+
;;
|
|
1191
1298
|
Intel:Mach:3*:*)
|
|
1192
|
-
|
|
1193
|
-
|
|
1299
|
+
GUESS=i386-pc-mach3
|
|
1300
|
+
;;
|
|
1194
1301
|
paragon:*:*:*)
|
|
1195
|
-
|
|
1196
|
-
|
|
1302
|
+
GUESS=i860-intel-osf1
|
|
1303
|
+
;;
|
|
1197
1304
|
i860:*:4.*:*) # i860-SVR4
|
|
1198
1305
|
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
|
|
1199
|
-
|
|
1306
|
+
GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4
|
|
1200
1307
|
else # Add other i860-SVR4 vendors below as they are discovered.
|
|
1201
|
-
|
|
1308
|
+
GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4
|
|
1202
1309
|
fi
|
|
1203
|
-
|
|
1310
|
+
;;
|
|
1204
1311
|
mini*:CTIX:SYS*5:*)
|
|
1205
1312
|
# "miniframe"
|
|
1206
|
-
|
|
1207
|
-
|
|
1313
|
+
GUESS=m68010-convergent-sysv
|
|
1314
|
+
;;
|
|
1208
1315
|
mc68k:UNIX:SYSTEM5:3.51m)
|
|
1209
|
-
|
|
1210
|
-
|
|
1316
|
+
GUESS=m68k-convergent-sysv
|
|
1317
|
+
;;
|
|
1211
1318
|
M680?0:D-NIX:5.3:*)
|
|
1212
|
-
|
|
1213
|
-
|
|
1319
|
+
GUESS=m68k-diab-dnix
|
|
1320
|
+
;;
|
|
1214
1321
|
M68*:*:R3V[5678]*:*)
|
|
1215
1322
|
test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
|
|
1216
1323
|
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)
|
|
@@ -1235,116 +1342,119 @@ EOF
|
|
|
1235
1342
|
/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
|
|
1236
1343
|
&& { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
|
|
1237
1344
|
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
|
|
1238
|
-
|
|
1239
|
-
|
|
1345
|
+
GUESS=m68k-unknown-lynxos$UNAME_RELEASE
|
|
1346
|
+
;;
|
|
1240
1347
|
mc68030:UNIX_System_V:4.*:*)
|
|
1241
|
-
|
|
1242
|
-
|
|
1348
|
+
GUESS=m68k-atari-sysv4
|
|
1349
|
+
;;
|
|
1243
1350
|
TSUNAMI:LynxOS:2.*:*)
|
|
1244
|
-
|
|
1245
|
-
|
|
1351
|
+
GUESS=sparc-unknown-lynxos$UNAME_RELEASE
|
|
1352
|
+
;;
|
|
1246
1353
|
rs6000:LynxOS:2.*:*)
|
|
1247
|
-
|
|
1248
|
-
|
|
1354
|
+
GUESS=rs6000-unknown-lynxos$UNAME_RELEASE
|
|
1355
|
+
;;
|
|
1249
1356
|
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
|
|
1250
|
-
|
|
1251
|
-
|
|
1357
|
+
GUESS=powerpc-unknown-lynxos$UNAME_RELEASE
|
|
1358
|
+
;;
|
|
1252
1359
|
SM[BE]S:UNIX_SV:*:*)
|
|
1253
|
-
|
|
1254
|
-
|
|
1360
|
+
GUESS=mips-dde-sysv$UNAME_RELEASE
|
|
1361
|
+
;;
|
|
1255
1362
|
RM*:ReliantUNIX-*:*:*)
|
|
1256
|
-
|
|
1257
|
-
|
|
1363
|
+
GUESS=mips-sni-sysv4
|
|
1364
|
+
;;
|
|
1258
1365
|
RM*:SINIX-*:*:*)
|
|
1259
|
-
|
|
1260
|
-
|
|
1366
|
+
GUESS=mips-sni-sysv4
|
|
1367
|
+
;;
|
|
1261
1368
|
*:SINIX-*:*:*)
|
|
1262
1369
|
if uname -p 2>/dev/null >/dev/null ; then
|
|
1263
1370
|
UNAME_MACHINE=`(uname -p) 2>/dev/null`
|
|
1264
|
-
|
|
1371
|
+
GUESS=$UNAME_MACHINE-sni-sysv4
|
|
1265
1372
|
else
|
|
1266
|
-
|
|
1373
|
+
GUESS=ns32k-sni-sysv
|
|
1267
1374
|
fi
|
|
1268
|
-
|
|
1269
|
-
PENTIUM:*:4.0*:*) # Unisys
|
|
1375
|
+
;;
|
|
1376
|
+
PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort
|
|
1270
1377
|
# says <Richard.M.Bartel@ccMail.Census.GOV>
|
|
1271
|
-
|
|
1272
|
-
|
|
1378
|
+
GUESS=i586-unisys-sysv4
|
|
1379
|
+
;;
|
|
1273
1380
|
*:UNIX_System_V:4*:FTX*)
|
|
1274
1381
|
# From Gerald Hewes <hewes@openmarket.com>.
|
|
1275
1382
|
# How about differentiating between stratus architectures? -djm
|
|
1276
|
-
|
|
1277
|
-
|
|
1383
|
+
GUESS=hppa1.1-stratus-sysv4
|
|
1384
|
+
;;
|
|
1278
1385
|
*:*:*:FTX*)
|
|
1279
1386
|
# From seanf@swdc.stratus.com.
|
|
1280
|
-
|
|
1281
|
-
|
|
1387
|
+
GUESS=i860-stratus-sysv4
|
|
1388
|
+
;;
|
|
1282
1389
|
i*86:VOS:*:*)
|
|
1283
1390
|
# From Paul.Green@stratus.com.
|
|
1284
|
-
|
|
1285
|
-
|
|
1391
|
+
GUESS=$UNAME_MACHINE-stratus-vos
|
|
1392
|
+
;;
|
|
1286
1393
|
*:VOS:*:*)
|
|
1287
1394
|
# From Paul.Green@stratus.com.
|
|
1288
|
-
|
|
1289
|
-
|
|
1395
|
+
GUESS=hppa1.1-stratus-vos
|
|
1396
|
+
;;
|
|
1290
1397
|
mc68*:A/UX:*:*)
|
|
1291
|
-
|
|
1292
|
-
|
|
1398
|
+
GUESS=m68k-apple-aux$UNAME_RELEASE
|
|
1399
|
+
;;
|
|
1293
1400
|
news*:NEWS-OS:6*:*)
|
|
1294
|
-
|
|
1295
|
-
|
|
1401
|
+
GUESS=mips-sony-newsos6
|
|
1402
|
+
;;
|
|
1296
1403
|
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
|
|
1297
|
-
if
|
|
1298
|
-
|
|
1404
|
+
if test -d /usr/nec; then
|
|
1405
|
+
GUESS=mips-nec-sysv$UNAME_RELEASE
|
|
1299
1406
|
else
|
|
1300
|
-
|
|
1407
|
+
GUESS=mips-unknown-sysv$UNAME_RELEASE
|
|
1301
1408
|
fi
|
|
1302
|
-
|
|
1409
|
+
;;
|
|
1303
1410
|
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
|
|
1304
|
-
|
|
1305
|
-
|
|
1411
|
+
GUESS=powerpc-be-beos
|
|
1412
|
+
;;
|
|
1306
1413
|
BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
|
|
1307
|
-
|
|
1308
|
-
|
|
1414
|
+
GUESS=powerpc-apple-beos
|
|
1415
|
+
;;
|
|
1309
1416
|
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
|
|
1310
|
-
|
|
1311
|
-
|
|
1417
|
+
GUESS=i586-pc-beos
|
|
1418
|
+
;;
|
|
1312
1419
|
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1420
|
+
GUESS=i586-pc-haiku
|
|
1421
|
+
;;
|
|
1422
|
+
ppc:Haiku:*:*) # Haiku running on Apple PowerPC
|
|
1423
|
+
GUESS=powerpc-apple-haiku
|
|
1424
|
+
;;
|
|
1425
|
+
*:Haiku:*:*) # Haiku modern gcc (not bound by BeOS compat)
|
|
1426
|
+
GUESS=$UNAME_MACHINE-unknown-haiku
|
|
1427
|
+
;;
|
|
1318
1428
|
SX-4:SUPER-UX:*:*)
|
|
1319
|
-
|
|
1320
|
-
|
|
1429
|
+
GUESS=sx4-nec-superux$UNAME_RELEASE
|
|
1430
|
+
;;
|
|
1321
1431
|
SX-5:SUPER-UX:*:*)
|
|
1322
|
-
|
|
1323
|
-
|
|
1432
|
+
GUESS=sx5-nec-superux$UNAME_RELEASE
|
|
1433
|
+
;;
|
|
1324
1434
|
SX-6:SUPER-UX:*:*)
|
|
1325
|
-
|
|
1326
|
-
|
|
1435
|
+
GUESS=sx6-nec-superux$UNAME_RELEASE
|
|
1436
|
+
;;
|
|
1327
1437
|
SX-7:SUPER-UX:*:*)
|
|
1328
|
-
|
|
1329
|
-
|
|
1438
|
+
GUESS=sx7-nec-superux$UNAME_RELEASE
|
|
1439
|
+
;;
|
|
1330
1440
|
SX-8:SUPER-UX:*:*)
|
|
1331
|
-
|
|
1332
|
-
|
|
1441
|
+
GUESS=sx8-nec-superux$UNAME_RELEASE
|
|
1442
|
+
;;
|
|
1333
1443
|
SX-8R:SUPER-UX:*:*)
|
|
1334
|
-
|
|
1335
|
-
|
|
1444
|
+
GUESS=sx8r-nec-superux$UNAME_RELEASE
|
|
1445
|
+
;;
|
|
1336
1446
|
SX-ACE:SUPER-UX:*:*)
|
|
1337
|
-
|
|
1338
|
-
|
|
1447
|
+
GUESS=sxace-nec-superux$UNAME_RELEASE
|
|
1448
|
+
;;
|
|
1339
1449
|
Power*:Rhapsody:*:*)
|
|
1340
|
-
|
|
1341
|
-
|
|
1450
|
+
GUESS=powerpc-apple-rhapsody$UNAME_RELEASE
|
|
1451
|
+
;;
|
|
1342
1452
|
*:Rhapsody:*:*)
|
|
1343
|
-
|
|
1344
|
-
|
|
1453
|
+
GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE
|
|
1454
|
+
;;
|
|
1345
1455
|
arm64:Darwin:*:*)
|
|
1346
|
-
|
|
1347
|
-
|
|
1456
|
+
GUESS=aarch64-apple-darwin$UNAME_RELEASE
|
|
1457
|
+
;;
|
|
1348
1458
|
*:Darwin:*:*)
|
|
1349
1459
|
UNAME_PROCESSOR=`uname -p`
|
|
1350
1460
|
case $UNAME_PROCESSOR in
|
|
@@ -1359,7 +1469,7 @@ EOF
|
|
|
1359
1469
|
else
|
|
1360
1470
|
set_cc_for_build
|
|
1361
1471
|
fi
|
|
1362
|
-
if
|
|
1472
|
+
if test "$CC_FOR_BUILD" != no_compiler_found; then
|
|
1363
1473
|
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
|
|
1364
1474
|
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
|
|
1365
1475
|
grep IS_64BIT_ARCH >/dev/null
|
|
@@ -1380,109 +1490,122 @@ EOF
|
|
|
1380
1490
|
# uname -m returns i386 or x86_64
|
|
1381
1491
|
UNAME_PROCESSOR=$UNAME_MACHINE
|
|
1382
1492
|
fi
|
|
1383
|
-
|
|
1384
|
-
|
|
1493
|
+
GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE
|
|
1494
|
+
;;
|
|
1385
1495
|
*:procnto*:*:* | *:QNX:[0123456789]*:*)
|
|
1386
1496
|
UNAME_PROCESSOR=`uname -p`
|
|
1387
1497
|
if test "$UNAME_PROCESSOR" = x86; then
|
|
1388
1498
|
UNAME_PROCESSOR=i386
|
|
1389
1499
|
UNAME_MACHINE=pc
|
|
1390
1500
|
fi
|
|
1391
|
-
|
|
1392
|
-
|
|
1501
|
+
GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE
|
|
1502
|
+
;;
|
|
1393
1503
|
*:QNX:*:4*)
|
|
1394
|
-
|
|
1395
|
-
|
|
1504
|
+
GUESS=i386-pc-qnx
|
|
1505
|
+
;;
|
|
1396
1506
|
NEO-*:NONSTOP_KERNEL:*:*)
|
|
1397
|
-
|
|
1398
|
-
|
|
1507
|
+
GUESS=neo-tandem-nsk$UNAME_RELEASE
|
|
1508
|
+
;;
|
|
1399
1509
|
NSE-*:NONSTOP_KERNEL:*:*)
|
|
1400
|
-
|
|
1401
|
-
|
|
1510
|
+
GUESS=nse-tandem-nsk$UNAME_RELEASE
|
|
1511
|
+
;;
|
|
1402
1512
|
NSR-*:NONSTOP_KERNEL:*:*)
|
|
1403
|
-
|
|
1404
|
-
|
|
1513
|
+
GUESS=nsr-tandem-nsk$UNAME_RELEASE
|
|
1514
|
+
;;
|
|
1405
1515
|
NSV-*:NONSTOP_KERNEL:*:*)
|
|
1406
|
-
|
|
1407
|
-
|
|
1516
|
+
GUESS=nsv-tandem-nsk$UNAME_RELEASE
|
|
1517
|
+
;;
|
|
1408
1518
|
NSX-*:NONSTOP_KERNEL:*:*)
|
|
1409
|
-
|
|
1410
|
-
|
|
1519
|
+
GUESS=nsx-tandem-nsk$UNAME_RELEASE
|
|
1520
|
+
;;
|
|
1411
1521
|
*:NonStop-UX:*:*)
|
|
1412
|
-
|
|
1413
|
-
|
|
1522
|
+
GUESS=mips-compaq-nonstopux
|
|
1523
|
+
;;
|
|
1414
1524
|
BS2000:POSIX*:*:*)
|
|
1415
|
-
|
|
1416
|
-
|
|
1525
|
+
GUESS=bs2000-siemens-sysv
|
|
1526
|
+
;;
|
|
1417
1527
|
DS/*:UNIX_System_V:*:*)
|
|
1418
|
-
|
|
1419
|
-
|
|
1528
|
+
GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE
|
|
1529
|
+
;;
|
|
1420
1530
|
*:Plan9:*:*)
|
|
1421
1531
|
# "uname -m" is not consistent, so use $cputype instead. 386
|
|
1422
1532
|
# is converted to i386 for consistency with other x86
|
|
1423
1533
|
# operating systems.
|
|
1424
|
-
|
|
1425
|
-
if test "$cputype" = 386; then
|
|
1534
|
+
if test "${cputype-}" = 386; then
|
|
1426
1535
|
UNAME_MACHINE=i386
|
|
1427
|
-
|
|
1428
|
-
UNAME_MACHINE
|
|
1536
|
+
elif test "x${cputype-}" != x; then
|
|
1537
|
+
UNAME_MACHINE=$cputype
|
|
1429
1538
|
fi
|
|
1430
|
-
|
|
1431
|
-
|
|
1539
|
+
GUESS=$UNAME_MACHINE-unknown-plan9
|
|
1540
|
+
;;
|
|
1432
1541
|
*:TOPS-10:*:*)
|
|
1433
|
-
|
|
1434
|
-
|
|
1542
|
+
GUESS=pdp10-unknown-tops10
|
|
1543
|
+
;;
|
|
1435
1544
|
*:TENEX:*:*)
|
|
1436
|
-
|
|
1437
|
-
|
|
1545
|
+
GUESS=pdp10-unknown-tenex
|
|
1546
|
+
;;
|
|
1438
1547
|
KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
|
|
1439
|
-
|
|
1440
|
-
|
|
1548
|
+
GUESS=pdp10-dec-tops20
|
|
1549
|
+
;;
|
|
1441
1550
|
XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
|
|
1442
|
-
|
|
1443
|
-
|
|
1551
|
+
GUESS=pdp10-xkl-tops20
|
|
1552
|
+
;;
|
|
1444
1553
|
*:TOPS-20:*:*)
|
|
1445
|
-
|
|
1446
|
-
|
|
1554
|
+
GUESS=pdp10-unknown-tops20
|
|
1555
|
+
;;
|
|
1447
1556
|
*:ITS:*:*)
|
|
1448
|
-
|
|
1449
|
-
|
|
1557
|
+
GUESS=pdp10-unknown-its
|
|
1558
|
+
;;
|
|
1450
1559
|
SEI:*:*:SEIUX)
|
|
1451
|
-
|
|
1452
|
-
|
|
1560
|
+
GUESS=mips-sei-seiux$UNAME_RELEASE
|
|
1561
|
+
;;
|
|
1453
1562
|
*:DragonFly:*:*)
|
|
1454
|
-
echo "$
|
|
1455
|
-
|
|
1563
|
+
DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
|
|
1564
|
+
GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL
|
|
1565
|
+
;;
|
|
1456
1566
|
*:*VMS:*:*)
|
|
1457
1567
|
UNAME_MACHINE=`(uname -p) 2>/dev/null`
|
|
1458
|
-
case
|
|
1459
|
-
A*)
|
|
1460
|
-
I*)
|
|
1461
|
-
V*)
|
|
1568
|
+
case $UNAME_MACHINE in
|
|
1569
|
+
A*) GUESS=alpha-dec-vms ;;
|
|
1570
|
+
I*) GUESS=ia64-dec-vms ;;
|
|
1571
|
+
V*) GUESS=vax-dec-vms ;;
|
|
1462
1572
|
esac ;;
|
|
1463
1573
|
*:XENIX:*:SysV)
|
|
1464
|
-
|
|
1465
|
-
|
|
1574
|
+
GUESS=i386-pc-xenix
|
|
1575
|
+
;;
|
|
1466
1576
|
i*86:skyos:*:*)
|
|
1467
|
-
echo "$
|
|
1468
|
-
|
|
1577
|
+
SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`
|
|
1578
|
+
GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL
|
|
1579
|
+
;;
|
|
1469
1580
|
i*86:rdos:*:*)
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
i*86:
|
|
1473
|
-
|
|
1474
|
-
|
|
1581
|
+
GUESS=$UNAME_MACHINE-pc-rdos
|
|
1582
|
+
;;
|
|
1583
|
+
i*86:Fiwix:*:*)
|
|
1584
|
+
GUESS=$UNAME_MACHINE-pc-fiwix
|
|
1585
|
+
;;
|
|
1586
|
+
*:AROS:*:*)
|
|
1587
|
+
GUESS=$UNAME_MACHINE-unknown-aros
|
|
1588
|
+
;;
|
|
1475
1589
|
x86_64:VMkernel:*:*)
|
|
1476
|
-
|
|
1477
|
-
|
|
1590
|
+
GUESS=$UNAME_MACHINE-unknown-esx
|
|
1591
|
+
;;
|
|
1478
1592
|
amd64:Isilon\ OneFS:*:*)
|
|
1479
|
-
|
|
1480
|
-
|
|
1593
|
+
GUESS=x86_64-unknown-onefs
|
|
1594
|
+
;;
|
|
1481
1595
|
*:Unleashed:*:*)
|
|
1482
|
-
|
|
1483
|
-
|
|
1596
|
+
GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
|
|
1597
|
+
;;
|
|
1598
|
+
*:Ironclad:*:*)
|
|
1599
|
+
GUESS=$UNAME_MACHINE-unknown-ironclad
|
|
1600
|
+
;;
|
|
1484
1601
|
esac
|
|
1485
1602
|
|
|
1603
|
+
# Do we have a guess based on uname results?
|
|
1604
|
+
if test "x$GUESS" != x; then
|
|
1605
|
+
echo "$GUESS"
|
|
1606
|
+
exit
|
|
1607
|
+
fi
|
|
1608
|
+
|
|
1486
1609
|
# No uname command or uname output not recognized.
|
|
1487
1610
|
set_cc_for_build
|
|
1488
1611
|
cat > "$dummy.c" <<EOF
|
|
@@ -1614,7 +1737,7 @@ main ()
|
|
|
1614
1737
|
}
|
|
1615
1738
|
EOF
|
|
1616
1739
|
|
|
1617
|
-
$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME
|
|
1740
|
+
$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` &&
|
|
1618
1741
|
{ echo "$SYSTEM_NAME"; exit; }
|
|
1619
1742
|
|
|
1620
1743
|
# Apollos put the system type in the environment.
|
|
@@ -1622,7 +1745,7 @@ test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; }
|
|
|
1622
1745
|
|
|
1623
1746
|
echo "$0: unable to guess system type" >&2
|
|
1624
1747
|
|
|
1625
|
-
case
|
|
1748
|
+
case $UNAME_MACHINE:$UNAME_SYSTEM in
|
|
1626
1749
|
mips:Linux | mips64:Linux)
|
|
1627
1750
|
# If we got here on MIPS GNU/Linux, output extra information.
|
|
1628
1751
|
cat >&2 <<EOF
|
|
@@ -1639,14 +1762,16 @@ This script (version $timestamp), has failed to recognize the
|
|
|
1639
1762
|
operating system you are using. If your script is old, overwrite *all*
|
|
1640
1763
|
copies of config.guess and config.sub with the latest versions from:
|
|
1641
1764
|
|
|
1642
|
-
https://git.savannah.gnu.org/
|
|
1765
|
+
https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
|
|
1643
1766
|
and
|
|
1644
|
-
https://git.savannah.gnu.org/
|
|
1767
|
+
https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
|
|
1645
1768
|
EOF
|
|
1646
1769
|
|
|
1647
|
-
|
|
1770
|
+
our_year=`echo $timestamp | sed 's,-.*,,'`
|
|
1771
|
+
thisyear=`date +%Y`
|
|
1648
1772
|
# shellcheck disable=SC2003
|
|
1649
|
-
|
|
1773
|
+
script_age=`expr "$thisyear" - "$our_year"`
|
|
1774
|
+
if test "$script_age" -lt 3 ; then
|
|
1650
1775
|
cat >&2 <<EOF
|
|
1651
1776
|
|
|
1652
1777
|
If $0 has already been updated, send the following data and any
|