ffi 1.15.5 → 1.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +118 -0
- data/Gemfile +10 -3
- data/README.md +4 -3
- data/Rakefile +25 -10
- 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 +244 -98
- 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 +3 -1
- 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 +130 -61
- 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/.allow-ai-service +0 -0
- data/ext/ffi_c/libffi/.appveyor/site.exp +16 -0
- data/ext/ffi_c/libffi/.appveyor/unix-noexec.exp +7 -0
- data/ext/ffi_c/libffi/.appveyor.yml +27 -9
- data/ext/ffi_c/libffi/.ci/build-cross-in-container.sh +18 -0
- data/ext/ffi_c/libffi/{.travis → .ci}/build-in-container.sh +4 -6
- data/ext/ffi_c/libffi/.ci/build.sh +124 -0
- data/ext/ffi_c/libffi/{.travis → .ci}/install.sh +14 -7
- data/ext/ffi_c/libffi/.ci/msvs-detect +1103 -0
- data/ext/ffi_c/libffi/{.travis → .ci}/site.exp +5 -3
- data/ext/ffi_c/libffi/.circleci/config.yml +156 -0
- data/ext/ffi_c/libffi/.github/workflows/build.yml +479 -0
- data/ext/ffi_c/libffi/.github/workflows/emscripten.yml +172 -0
- data/ext/ffi_c/libffi/.gitignore +10 -2
- data/ext/ffi_c/libffi/LICENSE +1 -1
- data/ext/ffi_c/libffi/Makefile.am +12 -5
- data/ext/ffi_c/libffi/Makefile.in +118 -51
- data/ext/ffi_c/libffi/README.md +150 -105
- data/ext/ffi_c/libffi/acinclude.m4 +10 -112
- data/ext/ffi_c/libffi/compile +348 -0
- data/ext/ffi_c/libffi/config.guess +623 -556
- data/ext/ffi_c/libffi/config.sub +75 -34
- data/ext/ffi_c/libffi/configure +4571 -3830
- data/ext/ffi_c/libffi/configure.ac +64 -28
- data/ext/ffi_c/libffi/configure.host +26 -7
- data/ext/ffi_c/libffi/doc/Makefile.in +9 -6
- data/ext/ffi_c/libffi/doc/libffi.texi +82 -33
- data/ext/ffi_c/libffi/doc/version.texi +4 -4
- data/ext/ffi_c/libffi/fficonfig.h.in +12 -47
- data/ext/ffi_c/libffi/generate-darwin-source-and-headers.py +163 -52
- data/ext/ffi_c/libffi/include/Makefile.am +1 -1
- data/ext/ffi_c/libffi/include/Makefile.in +10 -9
- data/ext/ffi_c/libffi/include/ffi.h.in +55 -60
- data/ext/ffi_c/libffi/include/ffi_cfi.h +21 -0
- data/ext/ffi_c/libffi/include/ffi_common.h +33 -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 +5 -0
- data/ext/ffi_c/libffi/libtool-version +2 -2
- data/ext/ffi_c/libffi/ltmain.sh +518 -333
- 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_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 +9 -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 +172 -55
- data/ext/ffi_c/libffi/src/aarch64/internal.h +32 -0
- data/ext/ffi_c/libffi/src/aarch64/sysv.S +331 -87
- data/ext/ffi_c/libffi/src/arc/arcompact.S +169 -94
- data/ext/ffi_c/libffi/src/arc/ffi.c +325 -148
- 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 +113 -42
- data/ext/ffi_c/libffi/src/closures.c +136 -50
- data/ext/ffi_c/libffi/src/debug.c +2 -2
- data/ext/ffi_c/libffi/src/dlmalloc.c +6 -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 +7 -0
- data/ext/ffi_c/libffi/src/mips/n32.S +193 -33
- data/ext/ffi_c/libffi/src/mips/o32.S +61 -4
- data/ext/ffi_c/libffi/src/moxie/ffi.c +47 -22
- data/ext/ffi_c/libffi/src/or1k/ffi.c +25 -12
- 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 +82 -35
- data/ext/ffi_c/libffi/src/powerpc/ffi_darwin.c +36 -24
- data/ext/ffi_c/libffi/src/powerpc/ffi_linux64.c +1 -1
- data/ext/ffi_c/libffi/src/powerpc/linux64.S +2 -0
- data/ext/ffi_c/libffi/src/powerpc/linux64_closure.S +2 -0
- data/ext/ffi_c/libffi/src/powerpc/t-aix +5 -0
- data/ext/ffi_c/libffi/src/prep_cif.c +22 -2
- data/ext/ffi_c/libffi/src/riscv/ffi.c +37 -4
- data/ext/ffi_c/libffi/src/sparc/ffi64.c +23 -1
- data/ext/ffi_c/libffi/src/tramp.c +716 -0
- data/ext/ffi_c/libffi/src/types.c +4 -6
- data/ext/ffi_c/libffi/src/wasm32/ffi.c +947 -0
- data/ext/ffi_c/libffi/src/wasm32/ffitarget.h +62 -0
- data/ext/ffi_c/libffi/src/x86/ffi.c +99 -37
- data/ext/ffi_c/libffi/src/x86/ffi64.c +67 -12
- data/ext/ffi_c/libffi/src/x86/ffitarget.h +9 -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 +172 -38
- data/ext/ffi_c/libffi/src/x86/sysv_intel.S +91 -88
- 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.am +79 -114
- data/ext/ffi_c/libffi/testsuite/Makefile.in +89 -121
- data/ext/ffi_c/libffi/testsuite/emscripten/build-tests.sh +54 -0
- data/ext/ffi_c/libffi/testsuite/emscripten/build.sh +63 -0
- data/ext/ffi_c/libffi/testsuite/emscripten/conftest.py +86 -0
- data/ext/ffi_c/libffi/testsuite/emscripten/node-tests.sh +48 -0
- data/ext/ffi_c/libffi/testsuite/emscripten/test.html +7 -0
- data/ext/ffi_c/libffi/testsuite/emscripten/test_libffi.py +51 -0
- data/ext/ffi_c/libffi/testsuite/lib/libffi.exp +43 -21
- data/ext/ffi_c/libffi/testsuite/lib/target-libpath.exp +2 -2
- data/ext/ffi_c/libffi/testsuite/libffi.bhaible/test-call.c +1 -0
- data/ext/ffi_c/libffi/testsuite/libffi.bhaible/testcases.c +5 -1
- data/ext/ffi_c/libffi/testsuite/libffi.call/bpo_38748.c +41 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/callback.c +99 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/callback2.c +108 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/callback3.c +114 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/callback4.c +119 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/ffitest.h +28 -3
- data/ext/ffi_c/libffi/testsuite/libffi.call/float_va.c +3 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/return_ll1.c +5 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/return_sl.c +4 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/return_ul.c +4 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/s55.c +60 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/strlen.c +8 -9
- data/ext/ffi_c/libffi/testsuite/libffi.call/strlen2.c +2 -2
- data/ext/ffi_c/libffi/testsuite/libffi.call/strlen3.c +2 -2
- data/ext/ffi_c/libffi/testsuite/libffi.call/strlen4.c +2 -2
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct10.c +1 -1
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_2.c +63 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_3.c +65 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_3f.c +65 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_4.c +67 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_4f.c +67 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_big.c +93 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_small.c +61 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct_return_2H.c +63 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct_return_8H.c +90 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/va_1.c +1 -119
- data/ext/ffi_c/libffi/testsuite/libffi.call/va_2.c +220 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/va_3.c +154 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/va_struct1.c +13 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/va_struct2.c +11 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/va_struct3.c +15 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_fn0.c +3 -2
- data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_fn1.c +2 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_fn2.c +2 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_fn3.c +21 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_fn4.c +2 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_fn5.c +2 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_fn6.c +2 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_loc_fn0.c +7 -6
- data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_simple.c +6 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_12byte.c +18 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_16byte.c +22 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_18byte.c +24 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_19byte.c +29 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_1_1byte.c +4 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_20byte.c +19 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_20byte1.c +21 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_24byte.c +35 -3
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_2byte.c +13 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_3_1byte.c +19 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_3byte1.c +13 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_3byte2.c +13 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_3float.c +18 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_4_1byte.c +22 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_4byte.c +13 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_5_1_byte.c +29 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_5byte.c +19 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_64byte.c +24 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_6_1_byte.c +28 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_6byte.c +24 -2
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_7_1_byte.c +39 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_7byte.c +25 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_8byte.c +14 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_9byte1.c +14 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_9byte2.c +14 -2
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_double.c +19 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_float.c +19 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_longdouble.c +20 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_longdouble_split.c +40 -25
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_longdouble_split2.c +40 -3
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_pointer.c +19 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_sint16.c +18 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_sint32.c +18 -3
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_sint64.c +18 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_uint16.c +18 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_uint32.c +19 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_uint64.c +19 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_dbls_struct.c +3 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_double_va.c +9 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_float.c +4 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_longdouble.c +11 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_longdouble_va.c +22 -3
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_multi_schar.c +5 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_multi_sshort.c +6 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_multi_sshortchar.c +9 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_multi_uchar.c +9 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_multi_ushort.c +6 -2
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_multi_ushortchar.c +9 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_pointer.c +5 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_pointer_stack.c +10 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_schar.c +3 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_sint.c +2 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_sshort.c +3 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_struct_va1.c +11 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_uchar.c +3 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_uint.c +4 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_uint_va.c +4 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_ulong_va.c +4 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_ulonglong.c +2 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_ushort.c +3 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/ffitest.h +1 -138
- data/ext/ffi_c/libffi/testsuite/libffi.closures/huge_struct.c +21 -21
- data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct.c +32 -9
- data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct1.c +1 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct10.c +12 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct11.c +21 -5
- data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct12.c +86 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct13.c +115 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct2.c +10 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct3.c +10 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct4.c +9 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct5.c +9 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct6.c +11 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct7.c +9 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct8.c +11 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct9.c +11 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/single_entry_structs1.c +86 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/single_entry_structs2.c +102 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/single_entry_structs3.c +101 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/stret_medium.c +1 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/stret_medium2.c +1 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/testclosure.c +6 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/unwindtest.cc +2 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/unwindtest_ffi_call.cc +1 -0
- 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/rbffi.h +1 -1
- data/ffi.gemspec +3 -3
- data/lib/ffi/autopointer.rb +8 -31
- data/lib/ffi/compat.rb +43 -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 +3 -0
- data/lib/ffi/function.rb +71 -0
- data/lib/ffi/io.rb +2 -2
- data/lib/ffi/library.rb +72 -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_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 +11 -0
- data/samples/qsort_ractor.rb +28 -0
- data/sig/ffi/abstract_memory.rbs +165 -0
- data/sig/ffi/auto_pointer.rbs +27 -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/function.rbs +39 -0
- data/sig/ffi/library.rbs +42 -0
- data/sig/ffi/native_type.rbs +86 -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 +26 -0
- data.tar.gz.sig +0 -0
- metadata +122 -28
- metadata.gz.sig +1 -0
- data/ext/ffi_c/libffi/.travis/build-cross-in-container.sh +0 -14
- data/ext/ffi_c/libffi/.travis/build.sh +0 -142
- data/ext/ffi_c/libffi/.travis.yml +0 -83
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_uchar_va.c +0 -44
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_ushort_va.c +0 -44
- /data/ext/ffi_c/libffi/{.travis → .ci}/ar-lib +0 -0
- /data/ext/ffi_c/libffi/{.travis → .ci}/bfin-sim.exp +0 -0
- /data/ext/ffi_c/libffi/{.travis → .ci}/compile +0 -0
- /data/ext/ffi_c/libffi/{.travis → .ci}/m32r-sim.exp +0 -0
- /data/ext/ffi_c/libffi/{.travis → .ci}/moxie-sim.exp +0 -0
- /data/ext/ffi_c/libffi/{.travis → .ci}/or1k-sim.exp +0 -0
- /data/ext/ffi_c/libffi/{.travis → .ci}/powerpc-eabisim.exp +0 -0
- /data/ext/ffi_c/libffi/{.travis → .ci}/wine-sim.exp +0 -0
- /data/ext/ffi_c/libffi/testsuite/libffi.call/{pyobjc-tc.c → pyobjc_tc.c} +0 -0
- /data/lib/ffi/platform/{sparc64-linux → sparcv9-linux}/types.conf +0 -0
data/ext/ffi_c/libffi/ltmain.sh
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
#! /bin/sh
|
1
|
+
#! /usr/bin/env sh
|
2
2
|
## DO NOT EDIT - This file generated from ./build-aux/ltmain.in
|
3
|
-
## by inline-source
|
3
|
+
## by inline-source v2019-02-19.15
|
4
4
|
|
5
|
-
# libtool (GNU libtool) 2.4.
|
5
|
+
# libtool (GNU libtool) 2.4.7
|
6
6
|
# Provide generalized library-building support services.
|
7
7
|
# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
|
8
8
|
|
9
|
-
# Copyright (C) 1996-
|
9
|
+
# Copyright (C) 1996-2019, 2021-2022 Free Software Foundation, Inc.
|
10
10
|
# This is free software; see the source for copying conditions. There is NO
|
11
11
|
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
12
12
|
|
@@ -31,8 +31,8 @@
|
|
31
31
|
|
32
32
|
PROGRAM=libtool
|
33
33
|
PACKAGE=libtool
|
34
|
-
VERSION="2.4.
|
35
|
-
package_revision=2.4.
|
34
|
+
VERSION="2.4.7 Debian-2.4.7-7build1"
|
35
|
+
package_revision=2.4.7
|
36
36
|
|
37
37
|
|
38
38
|
## ------ ##
|
@@ -64,34 +64,25 @@ package_revision=2.4.6
|
|
64
64
|
# libraries, which are installed to $pkgauxdir.
|
65
65
|
|
66
66
|
# Set a version string for this script.
|
67
|
-
scriptversion=
|
67
|
+
scriptversion=2019-02-19.15; # UTC
|
68
68
|
|
69
69
|
# General shell script boiler plate, and helper functions.
|
70
70
|
# Written by Gary V. Vaughan, 2004
|
71
71
|
|
72
|
-
#
|
73
|
-
#
|
74
|
-
#
|
75
|
-
|
76
|
-
#
|
77
|
-
#
|
78
|
-
#
|
79
|
-
#
|
80
|
-
|
81
|
-
#
|
82
|
-
#
|
83
|
-
# you may include this file under the same distribution terms that you use
|
84
|
-
# for the rest of that program.
|
85
|
-
|
86
|
-
# This program is distributed in the hope that it will be useful,
|
87
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
88
|
-
# MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU
|
89
|
-
# General Public License for more details.
|
90
|
-
|
91
|
-
# You should have received a copy of the GNU General Public License
|
92
|
-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
72
|
+
# This is free software. There is NO warranty; not even for
|
73
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
74
|
+
#
|
75
|
+
# Copyright (C) 2004-2019, 2021 Bootstrap Authors
|
76
|
+
#
|
77
|
+
# This file is dual licensed under the terms of the MIT license
|
78
|
+
# <https://opensource.org/license/MIT>, and GPL version 2 or later
|
79
|
+
# <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of
|
80
|
+
# these licenses when using or redistributing this software or any of
|
81
|
+
# the files within it. See the URLs above, or the file `LICENSE`
|
82
|
+
# included in the Bootstrap distribution for the full license texts.
|
93
83
|
|
94
|
-
# Please report bugs or propose patches to
|
84
|
+
# Please report bugs or propose patches to:
|
85
|
+
# <https://github.com/gnulib-modules/bootstrap/issues>
|
95
86
|
|
96
87
|
|
97
88
|
## ------ ##
|
@@ -139,9 +130,12 @@ do
|
|
139
130
|
_G_safe_locale=\"$_G_var=C; \$_G_safe_locale\"
|
140
131
|
fi"
|
141
132
|
done
|
142
|
-
|
143
|
-
#
|
144
|
-
|
133
|
+
# These NLS vars are set unconditionally (bootstrap issue #24). Unset those
|
134
|
+
# in case the environment reset is needed later and the $save_* variant is not
|
135
|
+
# defined (see the code above).
|
136
|
+
LC_ALL=C
|
137
|
+
LANGUAGE=C
|
138
|
+
export LANGUAGE LC_ALL
|
145
139
|
|
146
140
|
# Make sure IFS has a sensible default
|
147
141
|
sp=' '
|
@@ -159,6 +153,26 @@ if test "${PATH_SEPARATOR+set}" != set; then
|
|
159
153
|
fi
|
160
154
|
|
161
155
|
|
156
|
+
# func_unset VAR
|
157
|
+
# --------------
|
158
|
+
# Portably unset VAR.
|
159
|
+
# In some shells, an 'unset VAR' statement leaves a non-zero return
|
160
|
+
# status if VAR is already unset, which might be problematic if the
|
161
|
+
# statement is used at the end of a function (thus poisoning its return
|
162
|
+
# value) or when 'set -e' is active (causing even a spurious abort of
|
163
|
+
# the script in this case).
|
164
|
+
func_unset ()
|
165
|
+
{
|
166
|
+
{ eval $1=; (eval unset $1) >/dev/null 2>&1 && eval unset $1 || : ; }
|
167
|
+
}
|
168
|
+
|
169
|
+
|
170
|
+
# Make sure CDPATH doesn't cause `cd` commands to output the target dir.
|
171
|
+
func_unset CDPATH
|
172
|
+
|
173
|
+
# Make sure ${,E,F}GREP behave sanely.
|
174
|
+
func_unset GREP_OPTIONS
|
175
|
+
|
162
176
|
|
163
177
|
## ------------------------- ##
|
164
178
|
## Locate command utilities. ##
|
@@ -259,7 +273,7 @@ test -z "$SED" && {
|
|
259
273
|
rm -f conftest.in conftest.tmp conftest.nl conftest.out
|
260
274
|
}
|
261
275
|
|
262
|
-
func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin
|
276
|
+
func_path_progs "sed gsed" func_check_prog_sed "$PATH:/usr/xpg4/bin"
|
263
277
|
rm -f conftest.sed
|
264
278
|
SED=$func_path_progs_result
|
265
279
|
}
|
@@ -295,7 +309,7 @@ test -z "$GREP" && {
|
|
295
309
|
rm -f conftest.in conftest.tmp conftest.nl conftest.out
|
296
310
|
}
|
297
311
|
|
298
|
-
func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin
|
312
|
+
func_path_progs "grep ggrep" func_check_prog_grep "$PATH:/usr/xpg4/bin"
|
299
313
|
GREP=$func_path_progs_result
|
300
314
|
}
|
301
315
|
|
@@ -360,6 +374,35 @@ sed_double_backslash="\
|
|
360
374
|
s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g
|
361
375
|
s/\n//g"
|
362
376
|
|
377
|
+
# require_check_ifs_backslash
|
378
|
+
# ---------------------------
|
379
|
+
# Check if we can use backslash as IFS='\' separator, and set
|
380
|
+
# $check_ifs_backshlash_broken to ':' or 'false'.
|
381
|
+
require_check_ifs_backslash=func_require_check_ifs_backslash
|
382
|
+
func_require_check_ifs_backslash ()
|
383
|
+
{
|
384
|
+
_G_save_IFS=$IFS
|
385
|
+
IFS='\'
|
386
|
+
_G_check_ifs_backshlash='a\\b'
|
387
|
+
for _G_i in $_G_check_ifs_backshlash
|
388
|
+
do
|
389
|
+
case $_G_i in
|
390
|
+
a)
|
391
|
+
check_ifs_backshlash_broken=false
|
392
|
+
;;
|
393
|
+
'')
|
394
|
+
break
|
395
|
+
;;
|
396
|
+
*)
|
397
|
+
check_ifs_backshlash_broken=:
|
398
|
+
break
|
399
|
+
;;
|
400
|
+
esac
|
401
|
+
done
|
402
|
+
IFS=$_G_save_IFS
|
403
|
+
require_check_ifs_backslash=:
|
404
|
+
}
|
405
|
+
|
363
406
|
|
364
407
|
## ----------------- ##
|
365
408
|
## Global variables. ##
|
@@ -529,27 +572,15 @@ func_require_term_colors ()
|
|
529
572
|
# ---------------------
|
530
573
|
# Append VALUE onto the existing contents of VAR.
|
531
574
|
|
532
|
-
# We should try to minimise forks, especially on Windows where they are
|
533
|
-
# unreasonably slow, so skip the feature probes when bash or zsh are
|
534
|
-
# being used:
|
535
|
-
if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then
|
536
|
-
: ${_G_HAVE_ARITH_OP="yes"}
|
537
|
-
: ${_G_HAVE_XSI_OPS="yes"}
|
538
|
-
# The += operator was introduced in bash 3.1
|
539
|
-
case $BASH_VERSION in
|
540
|
-
[12].* | 3.0 | 3.0*) ;;
|
541
|
-
*)
|
542
|
-
: ${_G_HAVE_PLUSEQ_OP="yes"}
|
543
|
-
;;
|
544
|
-
esac
|
545
|
-
fi
|
546
|
-
|
547
575
|
# _G_HAVE_PLUSEQ_OP
|
548
576
|
# Can be empty, in which case the shell is probed, "yes" if += is
|
549
577
|
# useable or anything else if it does not work.
|
550
|
-
test -z "$_G_HAVE_PLUSEQ_OP" \
|
551
|
-
|
552
|
-
|
578
|
+
if test -z "$_G_HAVE_PLUSEQ_OP" && \
|
579
|
+
__PLUSEQ_TEST="a" && \
|
580
|
+
__PLUSEQ_TEST+=" b" 2>/dev/null && \
|
581
|
+
test "a b" = "$__PLUSEQ_TEST"; then
|
582
|
+
_G_HAVE_PLUSEQ_OP=yes
|
583
|
+
fi
|
553
584
|
|
554
585
|
if test yes = "$_G_HAVE_PLUSEQ_OP"
|
555
586
|
then
|
@@ -580,16 +611,16 @@ if test yes = "$_G_HAVE_PLUSEQ_OP"; then
|
|
580
611
|
{
|
581
612
|
$debug_cmd
|
582
613
|
|
583
|
-
|
584
|
-
eval "$1+=\\ \$
|
614
|
+
func_quote_arg pretty "$2"
|
615
|
+
eval "$1+=\\ \$func_quote_arg_result"
|
585
616
|
}'
|
586
617
|
else
|
587
618
|
func_append_quoted ()
|
588
619
|
{
|
589
620
|
$debug_cmd
|
590
621
|
|
591
|
-
|
592
|
-
eval "$1=\$$1\\ \$
|
622
|
+
func_quote_arg pretty "$2"
|
623
|
+
eval "$1=\$$1\\ \$func_quote_arg_result"
|
593
624
|
}
|
594
625
|
fi
|
595
626
|
|
@@ -1091,85 +1122,203 @@ func_relative_path ()
|
|
1091
1122
|
}
|
1092
1123
|
|
1093
1124
|
|
1094
|
-
#
|
1095
|
-
#
|
1096
|
-
#
|
1097
|
-
#
|
1098
|
-
#
|
1099
|
-
|
1100
|
-
# ii) func_quote_for_eval_unquoted_result
|
1101
|
-
# has all characters that are still active within double
|
1102
|
-
# quotes backslashified.
|
1103
|
-
func_quote_for_eval ()
|
1125
|
+
# func_quote_portable EVAL ARG
|
1126
|
+
# ----------------------------
|
1127
|
+
# Internal function to portably implement func_quote_arg. Note that we still
|
1128
|
+
# keep attention to performance here so we as much as possible try to avoid
|
1129
|
+
# calling sed binary (so far O(N) complexity as long as func_append is O(1)).
|
1130
|
+
func_quote_portable ()
|
1104
1131
|
{
|
1105
1132
|
$debug_cmd
|
1106
1133
|
|
1107
|
-
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1111
|
-
|
1112
|
-
|
1113
|
-
|
1114
|
-
|
1115
|
-
|
1116
|
-
|
1117
|
-
|
1118
|
-
else
|
1119
|
-
func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg"
|
1134
|
+
$require_check_ifs_backslash
|
1135
|
+
|
1136
|
+
func_quote_portable_result=$2
|
1137
|
+
|
1138
|
+
# one-time-loop (easy break)
|
1139
|
+
while true
|
1140
|
+
do
|
1141
|
+
if $1; then
|
1142
|
+
func_quote_portable_result=`$ECHO "$2" | $SED \
|
1143
|
+
-e "$sed_double_quote_subst" -e "$sed_double_backslash"`
|
1144
|
+
break
|
1120
1145
|
fi
|
1121
1146
|
|
1122
|
-
|
1123
|
-
|
1124
|
-
|
1125
|
-
|
1126
|
-
|
1127
|
-
|
1128
|
-
|
1129
|
-
|
1147
|
+
# Quote for eval.
|
1148
|
+
case $func_quote_portable_result in
|
1149
|
+
*[\\\`\"\$]*)
|
1150
|
+
# Fallback to sed for $func_check_bs_ifs_broken=:, or when the string
|
1151
|
+
# contains the shell wildcard characters.
|
1152
|
+
case $check_ifs_backshlash_broken$func_quote_portable_result in
|
1153
|
+
:*|*[\[\*\?]*)
|
1154
|
+
func_quote_portable_result=`$ECHO "$func_quote_portable_result" \
|
1155
|
+
| $SED "$sed_quote_subst"`
|
1156
|
+
break
|
1157
|
+
;;
|
1158
|
+
esac
|
1159
|
+
|
1160
|
+
func_quote_portable_old_IFS=$IFS
|
1161
|
+
for _G_char in '\' '`' '"' '$'
|
1162
|
+
do
|
1163
|
+
# STATE($1) PREV($2) SEPARATOR($3)
|
1164
|
+
set start "" ""
|
1165
|
+
func_quote_portable_result=dummy"$_G_char$func_quote_portable_result$_G_char"dummy
|
1166
|
+
IFS=$_G_char
|
1167
|
+
for _G_part in $func_quote_portable_result
|
1168
|
+
do
|
1169
|
+
case $1 in
|
1170
|
+
quote)
|
1171
|
+
func_append func_quote_portable_result "$3$2"
|
1172
|
+
set quote "$_G_part" "\\$_G_char"
|
1173
|
+
;;
|
1174
|
+
start)
|
1175
|
+
set first "" ""
|
1176
|
+
func_quote_portable_result=
|
1177
|
+
;;
|
1178
|
+
first)
|
1179
|
+
set quote "$_G_part" ""
|
1180
|
+
;;
|
1181
|
+
esac
|
1182
|
+
done
|
1183
|
+
done
|
1184
|
+
IFS=$func_quote_portable_old_IFS
|
1130
1185
|
;;
|
1131
|
-
*)
|
1132
|
-
_G_quoted_arg=$_G_unquoted_arg
|
1133
|
-
;;
|
1186
|
+
*) ;;
|
1134
1187
|
esac
|
1135
|
-
|
1136
|
-
if test -n "$func_quote_for_eval_result"; then
|
1137
|
-
func_append func_quote_for_eval_result " $_G_quoted_arg"
|
1138
|
-
else
|
1139
|
-
func_append func_quote_for_eval_result "$_G_quoted_arg"
|
1140
|
-
fi
|
1141
|
-
shift
|
1188
|
+
break
|
1142
1189
|
done
|
1190
|
+
|
1191
|
+
func_quote_portable_unquoted_result=$func_quote_portable_result
|
1192
|
+
case $func_quote_portable_result in
|
1193
|
+
# double-quote args containing shell metacharacters to delay
|
1194
|
+
# word splitting, command substitution and variable expansion
|
1195
|
+
# for a subsequent eval.
|
1196
|
+
# many bourne shells cannot handle close brackets correctly
|
1197
|
+
# in scan sets, so we specify it separately.
|
1198
|
+
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
|
1199
|
+
func_quote_portable_result=\"$func_quote_portable_result\"
|
1200
|
+
;;
|
1201
|
+
esac
|
1143
1202
|
}
|
1144
1203
|
|
1145
1204
|
|
1146
|
-
#
|
1147
|
-
#
|
1148
|
-
#
|
1149
|
-
# but
|
1150
|
-
|
1151
|
-
|
1152
|
-
|
1205
|
+
# func_quotefast_eval ARG
|
1206
|
+
# -----------------------
|
1207
|
+
# Quote one ARG (internal). This is equivalent to 'func_quote_arg eval ARG',
|
1208
|
+
# but optimized for speed. Result is stored in $func_quotefast_eval.
|
1209
|
+
if test xyes = `(x=; printf -v x %q yes; echo x"$x") 2>/dev/null`; then
|
1210
|
+
printf -v _GL_test_printf_tilde %q '~'
|
1211
|
+
if test '\~' = "$_GL_test_printf_tilde"; then
|
1212
|
+
func_quotefast_eval ()
|
1213
|
+
{
|
1214
|
+
printf -v func_quotefast_eval_result %q "$1"
|
1215
|
+
}
|
1216
|
+
else
|
1217
|
+
# Broken older Bash implementations. Make those faster too if possible.
|
1218
|
+
func_quotefast_eval ()
|
1219
|
+
{
|
1220
|
+
case $1 in
|
1221
|
+
'~'*)
|
1222
|
+
func_quote_portable false "$1"
|
1223
|
+
func_quotefast_eval_result=$func_quote_portable_result
|
1224
|
+
;;
|
1225
|
+
*)
|
1226
|
+
printf -v func_quotefast_eval_result %q "$1"
|
1227
|
+
;;
|
1228
|
+
esac
|
1229
|
+
}
|
1230
|
+
fi
|
1231
|
+
else
|
1232
|
+
func_quotefast_eval ()
|
1233
|
+
{
|
1234
|
+
func_quote_portable false "$1"
|
1235
|
+
func_quotefast_eval_result=$func_quote_portable_result
|
1236
|
+
}
|
1237
|
+
fi
|
1153
1238
|
|
1154
|
-
|
1155
|
-
|
1156
|
-
|
1157
|
-
|
1158
|
-
|
1159
|
-
|
1239
|
+
|
1240
|
+
# func_quote_arg MODEs ARG
|
1241
|
+
# ------------------------
|
1242
|
+
# Quote one ARG to be evaled later. MODEs argument may contain zero or more
|
1243
|
+
# specifiers listed below separated by ',' character. This function returns two
|
1244
|
+
# values:
|
1245
|
+
# i) func_quote_arg_result
|
1246
|
+
# double-quoted (when needed), suitable for a subsequent eval
|
1247
|
+
# ii) func_quote_arg_unquoted_result
|
1248
|
+
# has all characters that are still active within double
|
1249
|
+
# quotes backslashified. Available only if 'unquoted' is specified.
|
1250
|
+
#
|
1251
|
+
# Available modes:
|
1252
|
+
# ----------------
|
1253
|
+
# 'eval' (default)
|
1254
|
+
# - escape shell special characters
|
1255
|
+
# 'expand'
|
1256
|
+
# - the same as 'eval'; but do not quote variable references
|
1257
|
+
# 'pretty'
|
1258
|
+
# - request aesthetic output, i.e. '"a b"' instead of 'a\ b'. This might
|
1259
|
+
# be used later in func_quote to get output like: 'echo "a b"' instead
|
1260
|
+
# of 'echo a\ b'. This is slower than default on some shells.
|
1261
|
+
# 'unquoted'
|
1262
|
+
# - produce also $func_quote_arg_unquoted_result which does not contain
|
1263
|
+
# wrapping double-quotes.
|
1264
|
+
#
|
1265
|
+
# Examples for 'func_quote_arg pretty,unquoted string':
|
1266
|
+
#
|
1267
|
+
# string | *_result | *_unquoted_result
|
1268
|
+
# ------------+-----------------------+-------------------
|
1269
|
+
# " | \" | \"
|
1270
|
+
# a b | "a b" | a b
|
1271
|
+
# "a b" | "\"a b\"" | \"a b\"
|
1272
|
+
# * | "*" | *
|
1273
|
+
# z="${x-$y}" | "z=\"\${x-\$y}\"" | z=\"\${x-\$y}\"
|
1274
|
+
#
|
1275
|
+
# Examples for 'func_quote_arg pretty,unquoted,expand string':
|
1276
|
+
#
|
1277
|
+
# string | *_result | *_unquoted_result
|
1278
|
+
# --------------+---------------------+--------------------
|
1279
|
+
# z="${x-$y}" | "z=\"${x-$y}\"" | z=\"${x-$y}\"
|
1280
|
+
func_quote_arg ()
|
1281
|
+
{
|
1282
|
+
_G_quote_expand=false
|
1283
|
+
case ,$1, in
|
1284
|
+
*,expand,*)
|
1285
|
+
_G_quote_expand=:
|
1286
|
+
;;
|
1160
1287
|
esac
|
1161
1288
|
|
1162
|
-
case
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1289
|
+
case ,$1, in
|
1290
|
+
*,pretty,*|*,expand,*|*,unquoted,*)
|
1291
|
+
func_quote_portable $_G_quote_expand "$2"
|
1292
|
+
func_quote_arg_result=$func_quote_portable_result
|
1293
|
+
func_quote_arg_unquoted_result=$func_quote_portable_unquoted_result
|
1294
|
+
;;
|
1295
|
+
*)
|
1296
|
+
# Faster quote-for-eval for some shells.
|
1297
|
+
func_quotefast_eval "$2"
|
1298
|
+
func_quote_arg_result=$func_quotefast_eval_result
|
1169
1299
|
;;
|
1170
1300
|
esac
|
1301
|
+
}
|
1302
|
+
|
1171
1303
|
|
1172
|
-
|
1304
|
+
# func_quote MODEs ARGs...
|
1305
|
+
# ------------------------
|
1306
|
+
# Quote all ARGs to be evaled later and join them into single command. See
|
1307
|
+
# func_quote_arg's description for more info.
|
1308
|
+
func_quote ()
|
1309
|
+
{
|
1310
|
+
$debug_cmd
|
1311
|
+
_G_func_quote_mode=$1 ; shift
|
1312
|
+
func_quote_result=
|
1313
|
+
while test 0 -lt $#; do
|
1314
|
+
func_quote_arg "$_G_func_quote_mode" "$1"
|
1315
|
+
if test -n "$func_quote_result"; then
|
1316
|
+
func_append func_quote_result " $func_quote_arg_result"
|
1317
|
+
else
|
1318
|
+
func_append func_quote_result "$func_quote_arg_result"
|
1319
|
+
fi
|
1320
|
+
shift
|
1321
|
+
done
|
1173
1322
|
}
|
1174
1323
|
|
1175
1324
|
|
@@ -1215,8 +1364,8 @@ func_show_eval ()
|
|
1215
1364
|
_G_cmd=$1
|
1216
1365
|
_G_fail_exp=${2-':'}
|
1217
1366
|
|
1218
|
-
|
1219
|
-
eval "func_notquiet $
|
1367
|
+
func_quote_arg pretty,expand "$_G_cmd"
|
1368
|
+
eval "func_notquiet $func_quote_arg_result"
|
1220
1369
|
|
1221
1370
|
$opt_dry_run || {
|
1222
1371
|
eval "$_G_cmd"
|
@@ -1241,8 +1390,8 @@ func_show_eval_locale ()
|
|
1241
1390
|
_G_fail_exp=${2-':'}
|
1242
1391
|
|
1243
1392
|
$opt_quiet || {
|
1244
|
-
|
1245
|
-
eval "func_echo $
|
1393
|
+
func_quote_arg expand,pretty "$_G_cmd"
|
1394
|
+
eval "func_echo $func_quote_arg_result"
|
1246
1395
|
}
|
1247
1396
|
|
1248
1397
|
$opt_dry_run || {
|
@@ -1369,30 +1518,26 @@ func_lt_ver ()
|
|
1369
1518
|
# End:
|
1370
1519
|
#! /bin/sh
|
1371
1520
|
|
1372
|
-
# Set a version string for this script.
|
1373
|
-
scriptversion=2015-10-07.11; # UTC
|
1374
|
-
|
1375
1521
|
# A portable, pluggable option parser for Bourne shell.
|
1376
1522
|
# Written by Gary V. Vaughan, 2010
|
1377
1523
|
|
1378
|
-
#
|
1379
|
-
#
|
1380
|
-
#
|
1381
|
-
|
1382
|
-
#
|
1383
|
-
#
|
1384
|
-
#
|
1385
|
-
#
|
1386
|
-
|
1387
|
-
#
|
1388
|
-
#
|
1389
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
1390
|
-
# GNU General Public License for more details.
|
1524
|
+
# This is free software. There is NO warranty; not even for
|
1525
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
1526
|
+
#
|
1527
|
+
# Copyright (C) 2010-2019, 2021 Bootstrap Authors
|
1528
|
+
#
|
1529
|
+
# This file is dual licensed under the terms of the MIT license
|
1530
|
+
# <https://opensource.org/license/MIT>, and GPL version 2 or later
|
1531
|
+
# <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of
|
1532
|
+
# these licenses when using or redistributing this software or any of
|
1533
|
+
# the files within it. See the URLs above, or the file `LICENSE`
|
1534
|
+
# included in the Bootstrap distribution for the full license texts.
|
1391
1535
|
|
1392
|
-
#
|
1393
|
-
#
|
1536
|
+
# Please report bugs or propose patches to:
|
1537
|
+
# <https://github.com/gnulib-modules/bootstrap/issues>
|
1394
1538
|
|
1395
|
-
#
|
1539
|
+
# Set a version string for this script.
|
1540
|
+
scriptversion=2019-02-19.15; # UTC
|
1396
1541
|
|
1397
1542
|
|
1398
1543
|
## ------ ##
|
@@ -1415,7 +1560,7 @@ scriptversion=2015-10-07.11; # UTC
|
|
1415
1560
|
#
|
1416
1561
|
# In order for the '--version' option to work, you will need to have a
|
1417
1562
|
# suitably formatted comment like the one at the top of this file
|
1418
|
-
# starting with '# Written by ' and ending with '#
|
1563
|
+
# starting with '# Written by ' and ending with '# Copyright'.
|
1419
1564
|
#
|
1420
1565
|
# For '-h' and '--help' to work, you will also need a one line
|
1421
1566
|
# description of your script's purpose in a comment directly above the
|
@@ -1427,7 +1572,7 @@ scriptversion=2015-10-07.11; # UTC
|
|
1427
1572
|
# to display verbose messages only when your user has specified
|
1428
1573
|
# '--verbose'.
|
1429
1574
|
#
|
1430
|
-
# After sourcing this file, you can plug processing for additional
|
1575
|
+
# After sourcing this file, you can plug in processing for additional
|
1431
1576
|
# options by amending the variables from the 'Configuration' section
|
1432
1577
|
# below, and following the instructions in the 'Option parsing'
|
1433
1578
|
# section further down.
|
@@ -1476,8 +1621,8 @@ fatal_help="Try '\$progname --help' for more information."
|
|
1476
1621
|
## ------------------------- ##
|
1477
1622
|
|
1478
1623
|
# This section contains functions for adding, removing, and running hooks
|
1479
|
-
#
|
1480
|
-
#
|
1624
|
+
# in the main code. A hook is just a list of function names that can be
|
1625
|
+
# run in order later on.
|
1481
1626
|
|
1482
1627
|
# func_hookable FUNC_NAME
|
1483
1628
|
# -----------------------
|
@@ -1510,7 +1655,8 @@ func_add_hook ()
|
|
1510
1655
|
|
1511
1656
|
# func_remove_hook FUNC_NAME HOOK_FUNC
|
1512
1657
|
# ------------------------------------
|
1513
|
-
# Remove HOOK_FUNC from the list of functions called by
|
1658
|
+
# Remove HOOK_FUNC from the list of hook functions to be called by
|
1659
|
+
# FUNC_NAME.
|
1514
1660
|
func_remove_hook ()
|
1515
1661
|
{
|
1516
1662
|
$debug_cmd
|
@@ -1519,10 +1665,28 @@ func_remove_hook ()
|
|
1519
1665
|
}
|
1520
1666
|
|
1521
1667
|
|
1668
|
+
# func_propagate_result FUNC_NAME_A FUNC_NAME_B
|
1669
|
+
# ---------------------------------------------
|
1670
|
+
# If the *_result variable of FUNC_NAME_A _is set_, assign its value to
|
1671
|
+
# *_result variable of FUNC_NAME_B.
|
1672
|
+
func_propagate_result ()
|
1673
|
+
{
|
1674
|
+
$debug_cmd
|
1675
|
+
|
1676
|
+
func_propagate_result_result=:
|
1677
|
+
if eval "test \"\${${1}_result+set}\" = set"
|
1678
|
+
then
|
1679
|
+
eval "${2}_result=\$${1}_result"
|
1680
|
+
else
|
1681
|
+
func_propagate_result_result=false
|
1682
|
+
fi
|
1683
|
+
}
|
1684
|
+
|
1685
|
+
|
1522
1686
|
# func_run_hooks FUNC_NAME [ARG]...
|
1523
1687
|
# ---------------------------------
|
1524
1688
|
# Run all hook functions registered to FUNC_NAME.
|
1525
|
-
# It
|
1689
|
+
# It's assumed that the list of hook functions contains nothing more
|
1526
1690
|
# than a whitespace-delimited list of legal shell function names, and
|
1527
1691
|
# no effort is wasted trying to catch shell meta-characters or preserve
|
1528
1692
|
# whitespace.
|
@@ -1534,22 +1698,19 @@ func_run_hooks ()
|
|
1534
1698
|
|
1535
1699
|
case " $hookable_fns " in
|
1536
1700
|
*" $1 "*) ;;
|
1537
|
-
*) func_fatal_error "'$1' does not support hook
|
1701
|
+
*) func_fatal_error "'$1' does not support hook functions." ;;
|
1538
1702
|
esac
|
1539
1703
|
|
1540
1704
|
eval _G_hook_fns=\$$1_hooks; shift
|
1541
1705
|
|
1542
1706
|
for _G_hook in $_G_hook_fns; do
|
1543
|
-
|
1544
|
-
|
1545
|
-
|
1546
|
-
|
1547
|
-
eval set dummy "$
|
1548
|
-
_G_rc_run_hooks=:
|
1707
|
+
func_unset "${_G_hook}_result"
|
1708
|
+
eval $_G_hook '${1+"$@"}'
|
1709
|
+
func_propagate_result $_G_hook func_run_hooks
|
1710
|
+
if $func_propagate_result_result; then
|
1711
|
+
eval set dummy "$func_run_hooks_result"; shift
|
1549
1712
|
fi
|
1550
1713
|
done
|
1551
|
-
|
1552
|
-
$_G_rc_run_hooks && func_run_hooks_result=$_G_hook_result
|
1553
1714
|
}
|
1554
1715
|
|
1555
1716
|
|
@@ -1559,14 +1720,16 @@ func_run_hooks ()
|
|
1559
1720
|
## --------------- ##
|
1560
1721
|
|
1561
1722
|
# In order to add your own option parsing hooks, you must accept the
|
1562
|
-
# full positional parameter list
|
1563
|
-
# any options that you action, and then pass back the remaining
|
1564
|
-
# options in '<hooked_function_name>_result', escaped
|
1565
|
-
# 'eval'.
|
1566
|
-
#
|
1567
|
-
# '<hooked_function_name>_result'
|
1568
|
-
#
|
1569
|
-
#
|
1723
|
+
# full positional parameter list from your hook function. You may remove
|
1724
|
+
# or edit any options that you action, and then pass back the remaining
|
1725
|
+
# unprocessed options in '<hooked_function_name>_result', escaped
|
1726
|
+
# suitably for 'eval'.
|
1727
|
+
#
|
1728
|
+
# The '<hooked_function_name>_result' variable is automatically unset
|
1729
|
+
# before your hook gets called; for best performance, only set the
|
1730
|
+
# *_result variable when necessary (i.e. don't call the 'func_quote'
|
1731
|
+
# function unnecessarily because it can be an expensive operation on some
|
1732
|
+
# machines).
|
1570
1733
|
#
|
1571
1734
|
# Like this:
|
1572
1735
|
#
|
@@ -1578,11 +1741,8 @@ func_run_hooks ()
|
|
1578
1741
|
# usage_message=$usage_message'
|
1579
1742
|
# -s, --silent don'\''t print informational messages
|
1580
1743
|
# '
|
1581
|
-
# # No change in '$@' (ignored completely by this hook).
|
1582
|
-
# #
|
1583
|
-
# # func_quote_for_eval ${1+"$@"}
|
1584
|
-
# # my_options_prep_result=$func_quote_for_eval_result
|
1585
|
-
# false
|
1744
|
+
# # No change in '$@' (ignored completely by this hook). Leave
|
1745
|
+
# # my_options_prep_result variable intact.
|
1586
1746
|
# }
|
1587
1747
|
# func_add_hook func_options_prep my_options_prep
|
1588
1748
|
#
|
@@ -1593,7 +1753,7 @@ func_run_hooks ()
|
|
1593
1753
|
#
|
1594
1754
|
# args_changed=false
|
1595
1755
|
#
|
1596
|
-
# # Note that for efficiency, we parse as many options as we can
|
1756
|
+
# # Note that, for efficiency, we parse as many options as we can
|
1597
1757
|
# # recognise in a loop before passing the remainder back to the
|
1598
1758
|
# # caller on the first unrecognised argument we encounter.
|
1599
1759
|
# while test $# -gt 0; do
|
@@ -1610,18 +1770,17 @@ func_run_hooks ()
|
|
1610
1770
|
# args_changed=:
|
1611
1771
|
# ;;
|
1612
1772
|
# *) # Make sure the first unrecognised option "$_G_opt"
|
1613
|
-
# # is added back to "$@"
|
1614
|
-
# # if $args_changed
|
1773
|
+
# # is added back to "$@" in case we need it later,
|
1774
|
+
# # if $args_changed was set to 'true'.
|
1615
1775
|
# set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
|
1616
1776
|
# esac
|
1617
1777
|
# done
|
1618
1778
|
#
|
1779
|
+
# # Only call 'func_quote' here if we processed at least one argument.
|
1619
1780
|
# if $args_changed; then
|
1620
|
-
#
|
1621
|
-
# my_silent_option_result=$
|
1781
|
+
# func_quote eval ${1+"$@"}
|
1782
|
+
# my_silent_option_result=$func_quote_result
|
1622
1783
|
# fi
|
1623
|
-
#
|
1624
|
-
# $args_changed
|
1625
1784
|
# }
|
1626
1785
|
# func_add_hook func_parse_options my_silent_option
|
1627
1786
|
#
|
@@ -1632,8 +1791,6 @@ func_run_hooks ()
|
|
1632
1791
|
#
|
1633
1792
|
# $opt_silent && $opt_verbose && func_fatal_help "\
|
1634
1793
|
# '--silent' and '--verbose' options are mutually exclusive."
|
1635
|
-
#
|
1636
|
-
# false
|
1637
1794
|
# }
|
1638
1795
|
# func_add_hook func_validate_options my_option_validation
|
1639
1796
|
#
|
@@ -1649,13 +1806,8 @@ func_options_finish ()
|
|
1649
1806
|
{
|
1650
1807
|
$debug_cmd
|
1651
1808
|
|
1652
|
-
|
1653
|
-
|
1654
|
-
func_options_finish_result=$func_run_hooks_result
|
1655
|
-
_G_func_options_finish_exit=:
|
1656
|
-
fi
|
1657
|
-
|
1658
|
-
$_G_func_options_finish_exit
|
1809
|
+
func_run_hooks func_options ${1+"$@"}
|
1810
|
+
func_propagate_result func_run_hooks func_options_finish
|
1659
1811
|
}
|
1660
1812
|
|
1661
1813
|
|
@@ -1668,28 +1820,27 @@ func_options ()
|
|
1668
1820
|
{
|
1669
1821
|
$debug_cmd
|
1670
1822
|
|
1671
|
-
|
1823
|
+
_G_options_quoted=false
|
1672
1824
|
|
1673
1825
|
for my_func in options_prep parse_options validate_options options_finish
|
1674
1826
|
do
|
1675
|
-
|
1676
|
-
|
1677
|
-
|
1678
|
-
|
1827
|
+
func_unset func_${my_func}_result
|
1828
|
+
func_unset func_run_hooks_result
|
1829
|
+
eval func_$my_func '${1+"$@"}'
|
1830
|
+
func_propagate_result func_$my_func func_options
|
1831
|
+
if $func_propagate_result_result; then
|
1832
|
+
eval set dummy "$func_options_result"; shift
|
1833
|
+
_G_options_quoted=:
|
1679
1834
|
fi
|
1680
1835
|
done
|
1681
1836
|
|
1682
|
-
|
1683
|
-
|
1684
|
-
|
1685
|
-
|
1686
|
-
|
1687
|
-
|
1688
|
-
|
1689
|
-
func_options_result=$func_quote_for_eval_result
|
1690
|
-
fi
|
1691
|
-
|
1692
|
-
$_G_rc_options
|
1837
|
+
$_G_options_quoted || {
|
1838
|
+
# As we (func_options) are top-level options-parser function and
|
1839
|
+
# nobody quoted "$@" for us yet, we need to do it explicitly for
|
1840
|
+
# caller.
|
1841
|
+
func_quote eval ${1+"$@"}
|
1842
|
+
func_options_result=$func_quote_result
|
1843
|
+
}
|
1693
1844
|
}
|
1694
1845
|
|
1695
1846
|
|
@@ -1699,8 +1850,7 @@ func_options ()
|
|
1699
1850
|
# Note that when calling hook functions, we pass through the list of
|
1700
1851
|
# positional parameters. If a hook function modifies that list, and
|
1701
1852
|
# needs to propagate that back to rest of this script, then the complete
|
1702
|
-
# modified list must be put in 'func_run_hooks_result' before
|
1703
|
-
# returning $EXIT_SUCCESS (otherwise $EXIT_FAILURE is returned).
|
1853
|
+
# modified list must be put in 'func_run_hooks_result' before returning.
|
1704
1854
|
func_hookable func_options_prep
|
1705
1855
|
func_options_prep ()
|
1706
1856
|
{
|
@@ -1710,14 +1860,8 @@ func_options_prep ()
|
|
1710
1860
|
opt_verbose=false
|
1711
1861
|
opt_warning_types=
|
1712
1862
|
|
1713
|
-
|
1714
|
-
|
1715
|
-
_G_rc_options_prep=:
|
1716
|
-
# save modified positional parameters for caller
|
1717
|
-
func_options_prep_result=$func_run_hooks_result
|
1718
|
-
fi
|
1719
|
-
|
1720
|
-
$_G_rc_options_prep
|
1863
|
+
func_run_hooks func_options_prep ${1+"$@"}
|
1864
|
+
func_propagate_result func_run_hooks func_options_prep
|
1721
1865
|
}
|
1722
1866
|
|
1723
1867
|
|
@@ -1729,27 +1873,32 @@ func_parse_options ()
|
|
1729
1873
|
{
|
1730
1874
|
$debug_cmd
|
1731
1875
|
|
1732
|
-
|
1733
|
-
|
1734
|
-
_G_rc_parse_options=false
|
1876
|
+
_G_parse_options_requote=false
|
1735
1877
|
# this just eases exit handling
|
1736
1878
|
while test $# -gt 0; do
|
1737
1879
|
# Defer to hook functions for initial option parsing, so they
|
1738
1880
|
# get priority in the event of reusing an option name.
|
1739
|
-
|
1740
|
-
|
1741
|
-
|
1881
|
+
func_run_hooks func_parse_options ${1+"$@"}
|
1882
|
+
func_propagate_result func_run_hooks func_parse_options
|
1883
|
+
if $func_propagate_result_result; then
|
1884
|
+
eval set dummy "$func_parse_options_result"; shift
|
1885
|
+
# Even though we may have changed "$@", we passed the "$@" array
|
1886
|
+
# down into the hook and it quoted it for us (because we are in
|
1887
|
+
# this if-branch). No need to quote it again.
|
1888
|
+
_G_parse_options_requote=false
|
1742
1889
|
fi
|
1743
1890
|
|
1744
1891
|
# Break out of the loop if we already parsed every option.
|
1745
1892
|
test $# -gt 0 || break
|
1746
1893
|
|
1894
|
+
# We expect that one of the options parsed in this function matches
|
1895
|
+
# and thus we remove _G_opt from "$@" and need to re-quote.
|
1747
1896
|
_G_match_parse_options=:
|
1748
1897
|
_G_opt=$1
|
1749
1898
|
shift
|
1750
1899
|
case $_G_opt in
|
1751
1900
|
--debug|-x) debug_cmd='set -x'
|
1752
|
-
func_echo "enabling shell trace mode"
|
1901
|
+
func_echo "enabling shell trace mode" >&2
|
1753
1902
|
$debug_cmd
|
1754
1903
|
;;
|
1755
1904
|
|
@@ -1760,7 +1909,7 @@ func_parse_options ()
|
|
1760
1909
|
|
1761
1910
|
--warnings|--warning|-W)
|
1762
1911
|
if test $# = 0 && func_missing_arg $_G_opt; then
|
1763
|
-
|
1912
|
+
_G_parse_options_requote=:
|
1764
1913
|
break
|
1765
1914
|
fi
|
1766
1915
|
case " $warning_categories $1" in
|
@@ -1815,7 +1964,7 @@ func_parse_options ()
|
|
1815
1964
|
shift
|
1816
1965
|
;;
|
1817
1966
|
|
1818
|
-
--)
|
1967
|
+
--) _G_parse_options_requote=: ; break ;;
|
1819
1968
|
-*) func_fatal_help "unrecognised option: '$_G_opt'" ;;
|
1820
1969
|
*) set dummy "$_G_opt" ${1+"$@"}; shift
|
1821
1970
|
_G_match_parse_options=false
|
@@ -1823,17 +1972,16 @@ func_parse_options ()
|
|
1823
1972
|
;;
|
1824
1973
|
esac
|
1825
1974
|
|
1826
|
-
$_G_match_parse_options
|
1975
|
+
if $_G_match_parse_options; then
|
1976
|
+
_G_parse_options_requote=:
|
1977
|
+
fi
|
1827
1978
|
done
|
1828
1979
|
|
1829
|
-
|
1830
|
-
if $_G_rc_parse_options; then
|
1980
|
+
if $_G_parse_options_requote; then
|
1831
1981
|
# save modified positional parameters for caller
|
1832
|
-
|
1833
|
-
func_parse_options_result=$
|
1982
|
+
func_quote eval ${1+"$@"}
|
1983
|
+
func_parse_options_result=$func_quote_result
|
1834
1984
|
fi
|
1835
|
-
|
1836
|
-
$_G_rc_parse_options
|
1837
1985
|
}
|
1838
1986
|
|
1839
1987
|
|
@@ -1846,21 +1994,14 @@ func_validate_options ()
|
|
1846
1994
|
{
|
1847
1995
|
$debug_cmd
|
1848
1996
|
|
1849
|
-
_G_rc_validate_options=false
|
1850
|
-
|
1851
1997
|
# Display all warnings if -W was not given.
|
1852
1998
|
test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
|
1853
1999
|
|
1854
|
-
|
1855
|
-
|
1856
|
-
func_validate_options_result=$func_run_hooks_result
|
1857
|
-
_G_rc_validate_options=:
|
1858
|
-
fi
|
2000
|
+
func_run_hooks func_validate_options ${1+"$@"}
|
2001
|
+
func_propagate_result func_run_hooks func_validate_options
|
1859
2002
|
|
1860
2003
|
# Bail if the options were screwed!
|
1861
2004
|
$exit_cmd $EXIT_FAILURE
|
1862
|
-
|
1863
|
-
$_G_rc_validate_options
|
1864
2005
|
}
|
1865
2006
|
|
1866
2007
|
|
@@ -1916,8 +2057,8 @@ func_missing_arg ()
|
|
1916
2057
|
|
1917
2058
|
# func_split_equals STRING
|
1918
2059
|
# ------------------------
|
1919
|
-
# Set func_split_equals_lhs and func_split_equals_rhs shell variables
|
1920
|
-
# splitting STRING at the '=' sign.
|
2060
|
+
# Set func_split_equals_lhs and func_split_equals_rhs shell variables
|
2061
|
+
# after splitting STRING at the '=' sign.
|
1921
2062
|
test -z "$_G_HAVE_XSI_OPS" \
|
1922
2063
|
&& (eval 'x=a/b/c;
|
1923
2064
|
test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
|
@@ -1932,8 +2073,9 @@ then
|
|
1932
2073
|
|
1933
2074
|
func_split_equals_lhs=${1%%=*}
|
1934
2075
|
func_split_equals_rhs=${1#*=}
|
1935
|
-
test "x$func_split_equals_lhs" = "x$1"
|
1936
|
-
|
2076
|
+
if test "x$func_split_equals_lhs" = "x$1"; then
|
2077
|
+
func_split_equals_rhs=
|
2078
|
+
fi
|
1937
2079
|
}'
|
1938
2080
|
else
|
1939
2081
|
# ...otherwise fall back to using expr, which is often a shell builtin.
|
@@ -1943,7 +2085,7 @@ else
|
|
1943
2085
|
|
1944
2086
|
func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'`
|
1945
2087
|
func_split_equals_rhs=
|
1946
|
-
test "x$func_split_equals_lhs" = "x$1" \
|
2088
|
+
test "x$func_split_equals_lhs=" = "x$1" \
|
1947
2089
|
|| func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'`
|
1948
2090
|
}
|
1949
2091
|
fi #func_split_equals
|
@@ -1969,7 +2111,7 @@ else
|
|
1969
2111
|
{
|
1970
2112
|
$debug_cmd
|
1971
2113
|
|
1972
|
-
func_split_short_opt_name=`expr "x$1" : 'x
|
2114
|
+
func_split_short_opt_name=`expr "x$1" : 'x\(-.\)'`
|
1973
2115
|
func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'`
|
1974
2116
|
}
|
1975
2117
|
fi #func_split_short_opt
|
@@ -2011,31 +2153,44 @@ func_usage_message ()
|
|
2011
2153
|
# func_version
|
2012
2154
|
# ------------
|
2013
2155
|
# Echo version message to standard output and exit.
|
2156
|
+
# The version message is extracted from the calling file's header
|
2157
|
+
# comments, with leading '# ' stripped:
|
2158
|
+
# 1. First display the progname and version
|
2159
|
+
# 2. Followed by the header comment line matching /^# Written by /
|
2160
|
+
# 3. Then a blank line followed by the first following line matching
|
2161
|
+
# /^# Copyright /
|
2162
|
+
# 4. Immediately followed by any lines between the previous matches,
|
2163
|
+
# except lines preceding the intervening completely blank line.
|
2164
|
+
# For example, see the header comments of this file.
|
2014
2165
|
func_version ()
|
2015
2166
|
{
|
2016
2167
|
$debug_cmd
|
2017
2168
|
|
2018
2169
|
printf '%s\n' "$progname $scriptversion"
|
2019
2170
|
$SED -n '
|
2020
|
-
|
2021
|
-
|
2022
|
-
|
2023
|
-
|
2024
|
-
|
2025
|
-
|
2026
|
-
|
2027
|
-
:go
|
2028
|
-
/^# Written by /,/# warranty; / {
|
2029
|
-
s|^# ||
|
2030
|
-
s|^# *$||
|
2031
|
-
s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2|
|
2032
|
-
p
|
2171
|
+
/^# Written by /!b
|
2172
|
+
s|^# ||; p; n
|
2173
|
+
|
2174
|
+
:fwd2blnk
|
2175
|
+
/./ {
|
2176
|
+
n
|
2177
|
+
b fwd2blnk
|
2033
2178
|
}
|
2034
|
-
|
2035
|
-
|
2036
|
-
|
2179
|
+
p; n
|
2180
|
+
|
2181
|
+
:holdwrnt
|
2182
|
+
s|^# ||
|
2183
|
+
s|^# *$||
|
2184
|
+
/^Copyright /!{
|
2185
|
+
/./H
|
2186
|
+
n
|
2187
|
+
b holdwrnt
|
2037
2188
|
}
|
2038
|
-
|
2189
|
+
|
2190
|
+
s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2|
|
2191
|
+
G
|
2192
|
+
s|\(\n\)\n*|\1|g
|
2193
|
+
p; q' < "$progpath"
|
2039
2194
|
|
2040
2195
|
exit $?
|
2041
2196
|
}
|
@@ -2045,12 +2200,12 @@ func_version ()
|
|
2045
2200
|
# mode: shell-script
|
2046
2201
|
# sh-indentation: 2
|
2047
2202
|
# eval: (add-hook 'before-save-hook 'time-stamp)
|
2048
|
-
# time-stamp-pattern: "
|
2203
|
+
# time-stamp-pattern: "30/scriptversion=%:y-%02m-%02d.%02H; # UTC"
|
2049
2204
|
# time-stamp-time-zone: "UTC"
|
2050
2205
|
# End:
|
2051
2206
|
|
2052
2207
|
# Set a version string.
|
2053
|
-
scriptversion='(GNU libtool) 2.4.
|
2208
|
+
scriptversion='(GNU libtool) 2.4.7'
|
2054
2209
|
|
2055
2210
|
|
2056
2211
|
# func_echo ARG...
|
@@ -2141,7 +2296,7 @@ include the following information:
|
|
2141
2296
|
compiler: $LTCC
|
2142
2297
|
compiler flags: $LTCFLAGS
|
2143
2298
|
linker: $LD (gnu? $with_gnu_ld)
|
2144
|
-
version: $progname $scriptversion Debian-2.4.
|
2299
|
+
version: $progname $scriptversion Debian-2.4.7-7build1
|
2145
2300
|
automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
|
2146
2301
|
autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
|
2147
2302
|
|
@@ -2197,7 +2352,7 @@ fi
|
|
2197
2352
|
# a configuration failure hint, and exit.
|
2198
2353
|
func_fatal_configuration ()
|
2199
2354
|
{
|
2200
|
-
|
2355
|
+
func_fatal_error ${1+"$@"} \
|
2201
2356
|
"See the $PACKAGE documentation for more information." \
|
2202
2357
|
"Fatal configuration error."
|
2203
2358
|
}
|
@@ -2345,6 +2500,8 @@ libtool_options_prep ()
|
|
2345
2500
|
|
2346
2501
|
_G_rc_lt_options_prep=:
|
2347
2502
|
|
2503
|
+
_G_rc_lt_options_prep=:
|
2504
|
+
|
2348
2505
|
# Shorthand for --mode=foo, only valid as the first argument
|
2349
2506
|
case $1 in
|
2350
2507
|
clean|clea|cle|cl)
|
@@ -2375,11 +2532,9 @@ libtool_options_prep ()
|
|
2375
2532
|
|
2376
2533
|
if $_G_rc_lt_options_prep; then
|
2377
2534
|
# Pass back the list of options.
|
2378
|
-
|
2379
|
-
libtool_options_prep_result=$
|
2535
|
+
func_quote eval ${1+"$@"}
|
2536
|
+
libtool_options_prep_result=$func_quote_result
|
2380
2537
|
fi
|
2381
|
-
|
2382
|
-
$_G_rc_lt_options_prep
|
2383
2538
|
}
|
2384
2539
|
func_add_hook func_options_prep libtool_options_prep
|
2385
2540
|
|
@@ -2482,11 +2637,9 @@ libtool_parse_options ()
|
|
2482
2637
|
|
2483
2638
|
if $_G_rc_lt_parse_options; then
|
2484
2639
|
# save modified positional parameters for caller
|
2485
|
-
|
2486
|
-
libtool_parse_options_result=$
|
2640
|
+
func_quote eval ${1+"$@"}
|
2641
|
+
libtool_parse_options_result=$func_quote_result
|
2487
2642
|
fi
|
2488
|
-
|
2489
|
-
$_G_rc_lt_parse_options
|
2490
2643
|
}
|
2491
2644
|
func_add_hook func_parse_options libtool_parse_options
|
2492
2645
|
|
@@ -2543,8 +2696,8 @@ libtool_validate_options ()
|
|
2543
2696
|
}
|
2544
2697
|
|
2545
2698
|
# Pass back the unparsed argument list
|
2546
|
-
|
2547
|
-
libtool_validate_options_result=$
|
2699
|
+
func_quote eval ${1+"$@"}
|
2700
|
+
libtool_validate_options_result=$func_quote_result
|
2548
2701
|
}
|
2549
2702
|
func_add_hook func_validate_options libtool_validate_options
|
2550
2703
|
|
@@ -3510,8 +3663,8 @@ func_mode_compile ()
|
|
3510
3663
|
esac
|
3511
3664
|
done
|
3512
3665
|
|
3513
|
-
|
3514
|
-
test "X$libobj" != "X$
|
3666
|
+
func_quote_arg pretty "$libobj"
|
3667
|
+
test "X$libobj" != "X$func_quote_arg_result" \
|
3515
3668
|
&& $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
|
3516
3669
|
&& func_warning "libobj name '$libobj' may not contain shell special characters."
|
3517
3670
|
func_dirname_and_basename "$obj" "/" ""
|
@@ -3584,8 +3737,8 @@ compiler."
|
|
3584
3737
|
|
3585
3738
|
func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
|
3586
3739
|
srcfile=$func_to_tool_file_result
|
3587
|
-
|
3588
|
-
qsrcfile=$
|
3740
|
+
func_quote_arg pretty "$srcfile"
|
3741
|
+
qsrcfile=$func_quote_arg_result
|
3589
3742
|
|
3590
3743
|
# Only build a PIC object if we are building libtool libraries.
|
3591
3744
|
if test yes = "$build_libtool_libs"; then
|
@@ -3740,7 +3893,8 @@ This mode accepts the following additional options:
|
|
3740
3893
|
-prefer-non-pic try to build non-PIC objects only
|
3741
3894
|
-shared do not build a '.o' file suitable for static linking
|
3742
3895
|
-static only build a '.o' file suitable for static linking
|
3743
|
-
-Wc,FLAG
|
3896
|
+
-Wc,FLAG
|
3897
|
+
-Xcompiler FLAG pass FLAG directly to the compiler
|
3744
3898
|
|
3745
3899
|
COMPILE-COMMAND is a command to be used in creating a 'standard' object file
|
3746
3900
|
from the given SOURCEFILE.
|
@@ -3846,6 +4000,8 @@ The following components of LINK-COMMAND are treated specially:
|
|
3846
4000
|
-weak LIBNAME declare that the target provides the LIBNAME interface
|
3847
4001
|
-Wc,FLAG
|
3848
4002
|
-Xcompiler FLAG pass linker-specific FLAG directly to the compiler
|
4003
|
+
-Wa,FLAG
|
4004
|
+
-Xassembler FLAG pass linker-specific FLAG directly to the assembler
|
3849
4005
|
-Wl,FLAG
|
3850
4006
|
-Xlinker FLAG pass linker-specific FLAG directly to the linker
|
3851
4007
|
-XCClinker FLAG pass link-specific FLAG to the compiler driver (CC)
|
@@ -4188,8 +4344,8 @@ func_mode_install ()
|
|
4188
4344
|
case $nonopt in *shtool*) :;; *) false;; esac
|
4189
4345
|
then
|
4190
4346
|
# Aesthetically quote it.
|
4191
|
-
|
4192
|
-
install_prog="$
|
4347
|
+
func_quote_arg pretty "$nonopt"
|
4348
|
+
install_prog="$func_quote_arg_result "
|
4193
4349
|
arg=$1
|
4194
4350
|
shift
|
4195
4351
|
else
|
@@ -4199,8 +4355,8 @@ func_mode_install ()
|
|
4199
4355
|
|
4200
4356
|
# The real first argument should be the name of the installation program.
|
4201
4357
|
# Aesthetically quote it.
|
4202
|
-
|
4203
|
-
func_append install_prog "$
|
4358
|
+
func_quote_arg pretty "$arg"
|
4359
|
+
func_append install_prog "$func_quote_arg_result"
|
4204
4360
|
install_shared_prog=$install_prog
|
4205
4361
|
case " $install_prog " in
|
4206
4362
|
*[\\\ /]cp\ *) install_cp=: ;;
|
@@ -4257,12 +4413,12 @@ func_mode_install ()
|
|
4257
4413
|
esac
|
4258
4414
|
|
4259
4415
|
# Aesthetically quote the argument.
|
4260
|
-
|
4261
|
-
func_append install_prog " $
|
4416
|
+
func_quote_arg pretty "$arg"
|
4417
|
+
func_append install_prog " $func_quote_arg_result"
|
4262
4418
|
if test -n "$arg2"; then
|
4263
|
-
|
4419
|
+
func_quote_arg pretty "$arg2"
|
4264
4420
|
fi
|
4265
|
-
func_append install_shared_prog " $
|
4421
|
+
func_append install_shared_prog " $func_quote_arg_result"
|
4266
4422
|
done
|
4267
4423
|
|
4268
4424
|
test -z "$install_prog" && \
|
@@ -4273,8 +4429,8 @@ func_mode_install ()
|
|
4273
4429
|
|
4274
4430
|
if test -n "$install_override_mode" && $no_mode; then
|
4275
4431
|
if $install_cp; then :; else
|
4276
|
-
|
4277
|
-
func_append install_shared_prog " -m $
|
4432
|
+
func_quote_arg pretty "$install_override_mode"
|
4433
|
+
func_append install_shared_prog " -m $func_quote_arg_result"
|
4278
4434
|
fi
|
4279
4435
|
fi
|
4280
4436
|
|
@@ -4570,8 +4726,8 @@ func_mode_install ()
|
|
4570
4726
|
relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
|
4571
4727
|
|
4572
4728
|
$opt_quiet || {
|
4573
|
-
|
4574
|
-
eval "func_echo $
|
4729
|
+
func_quote_arg expand,pretty "$relink_command"
|
4730
|
+
eval "func_echo $func_quote_arg_result"
|
4575
4731
|
}
|
4576
4732
|
if eval "$relink_command"; then :
|
4577
4733
|
else
|
@@ -5350,7 +5506,8 @@ else
|
|
5350
5506
|
if test \"\$libtool_execute_magic\" != \"$magic\"; then
|
5351
5507
|
file=\"\$0\""
|
5352
5508
|
|
5353
|
-
|
5509
|
+
func_quote_arg pretty "$ECHO"
|
5510
|
+
qECHO=$func_quote_arg_result
|
5354
5511
|
$ECHO "\
|
5355
5512
|
|
5356
5513
|
# A function that is used when there is no print builtin or printf.
|
@@ -5360,7 +5517,7 @@ func_fallback_echo ()
|
|
5360
5517
|
\$1
|
5361
5518
|
_LTECHO_EOF'
|
5362
5519
|
}
|
5363
|
-
ECHO
|
5520
|
+
ECHO=$qECHO
|
5364
5521
|
fi
|
5365
5522
|
|
5366
5523
|
# Very basic option parsing. These options are (a) specific to
|
@@ -6703,9 +6860,9 @@ func_mode_link ()
|
|
6703
6860
|
while test "$#" -gt 0; do
|
6704
6861
|
arg=$1
|
6705
6862
|
shift
|
6706
|
-
|
6707
|
-
qarg=$
|
6708
|
-
func_append libtool_args " $
|
6863
|
+
func_quote_arg pretty,unquoted "$arg"
|
6864
|
+
qarg=$func_quote_arg_unquoted_result
|
6865
|
+
func_append libtool_args " $func_quote_arg_result"
|
6709
6866
|
|
6710
6867
|
# If the previous option needs an argument, assign it.
|
6711
6868
|
if test -n "$prev"; then
|
@@ -6941,6 +7098,13 @@ func_mode_link ()
|
|
6941
7098
|
prev=
|
6942
7099
|
continue
|
6943
7100
|
;;
|
7101
|
+
xassembler)
|
7102
|
+
func_append compiler_flags " -Xassembler $qarg"
|
7103
|
+
prev=
|
7104
|
+
func_append compile_command " -Xassembler $qarg"
|
7105
|
+
func_append finalize_command " -Xassembler $qarg"
|
7106
|
+
continue
|
7107
|
+
;;
|
6944
7108
|
xcclinker)
|
6945
7109
|
func_append linker_flags " $qarg"
|
6946
7110
|
func_append compiler_flags " $qarg"
|
@@ -7111,7 +7275,7 @@ func_mode_link ()
|
|
7111
7275
|
# These systems don't actually have a C library (as such)
|
7112
7276
|
test X-lc = "X$arg" && continue
|
7113
7277
|
;;
|
7114
|
-
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
|
7278
|
+
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*)
|
7115
7279
|
# Do not include libc due to us having libc/libc_r.
|
7116
7280
|
test X-lc = "X$arg" && continue
|
7117
7281
|
;;
|
@@ -7131,7 +7295,7 @@ func_mode_link ()
|
|
7131
7295
|
esac
|
7132
7296
|
elif test X-lc_r = "X$arg"; then
|
7133
7297
|
case $host in
|
7134
|
-
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
|
7298
|
+
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*)
|
7135
7299
|
# Do not include libc_r directly, use -pthread flag.
|
7136
7300
|
continue
|
7137
7301
|
;;
|
@@ -7161,8 +7325,20 @@ func_mode_link ()
|
|
7161
7325
|
prev=xcompiler
|
7162
7326
|
continue
|
7163
7327
|
;;
|
7164
|
-
|
7165
|
-
|
7328
|
+
# Solaris ld rejects as of 11.4. Refer to Oracle bug 22985199.
|
7329
|
+
-pthread)
|
7330
|
+
case $host in
|
7331
|
+
*solaris2*) ;;
|
7332
|
+
*)
|
7333
|
+
case "$new_inherited_linker_flags " in
|
7334
|
+
*" $arg "*) ;;
|
7335
|
+
* ) func_append new_inherited_linker_flags " $arg" ;;
|
7336
|
+
esac
|
7337
|
+
;;
|
7338
|
+
esac
|
7339
|
+
continue
|
7340
|
+
;;
|
7341
|
+
-mt|-mthreads|-kthread|-Kthread|-pthreads|--thread-safe \
|
7166
7342
|
|-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
|
7167
7343
|
func_append compiler_flags " $arg"
|
7168
7344
|
func_append compile_command " $arg"
|
@@ -7303,9 +7479,9 @@ func_mode_link ()
|
|
7303
7479
|
save_ifs=$IFS; IFS=,
|
7304
7480
|
for flag in $args; do
|
7305
7481
|
IFS=$save_ifs
|
7306
|
-
|
7307
|
-
func_append arg " $
|
7308
|
-
func_append compiler_flags " $
|
7482
|
+
func_quote_arg pretty "$flag"
|
7483
|
+
func_append arg " $func_quote_arg_result"
|
7484
|
+
func_append compiler_flags " $func_quote_arg_result"
|
7309
7485
|
done
|
7310
7486
|
IFS=$save_ifs
|
7311
7487
|
func_stripname ' ' '' "$arg"
|
@@ -7319,16 +7495,21 @@ func_mode_link ()
|
|
7319
7495
|
save_ifs=$IFS; IFS=,
|
7320
7496
|
for flag in $args; do
|
7321
7497
|
IFS=$save_ifs
|
7322
|
-
|
7323
|
-
func_append arg " $wl$
|
7324
|
-
func_append compiler_flags " $wl$
|
7325
|
-
func_append linker_flags " $
|
7498
|
+
func_quote_arg pretty "$flag"
|
7499
|
+
func_append arg " $wl$func_quote_arg_result"
|
7500
|
+
func_append compiler_flags " $wl$func_quote_arg_result"
|
7501
|
+
func_append linker_flags " $func_quote_arg_result"
|
7326
7502
|
done
|
7327
7503
|
IFS=$save_ifs
|
7328
7504
|
func_stripname ' ' '' "$arg"
|
7329
7505
|
arg=$func_stripname_result
|
7330
7506
|
;;
|
7331
7507
|
|
7508
|
+
-Xassembler)
|
7509
|
+
prev=xassembler
|
7510
|
+
continue
|
7511
|
+
;;
|
7512
|
+
|
7332
7513
|
-Xcompiler)
|
7333
7514
|
prev=xcompiler
|
7334
7515
|
continue
|
@@ -7346,8 +7527,8 @@ func_mode_link ()
|
|
7346
7527
|
|
7347
7528
|
# -msg_* for osf cc
|
7348
7529
|
-msg_*)
|
7349
|
-
|
7350
|
-
arg=$
|
7530
|
+
func_quote_arg pretty "$arg"
|
7531
|
+
arg=$func_quote_arg_result
|
7351
7532
|
;;
|
7352
7533
|
|
7353
7534
|
# Flags to be passed through unchanged, with rationale:
|
@@ -7370,12 +7551,13 @@ func_mode_link ()
|
|
7370
7551
|
# -fuse-ld=* Linker select flags for GCC
|
7371
7552
|
# -static-* direct GCC to link specific libraries statically
|
7372
7553
|
# -fcilkplus Cilk Plus language extension features for C/C++
|
7554
|
+
# -Wa,* Pass flags directly to the assembler
|
7373
7555
|
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
|
7374
7556
|
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
|
7375
7557
|
-O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
|
7376
|
-
-specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus)
|
7377
|
-
|
7378
|
-
arg=$
|
7558
|
+
-specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus|-Wa,*)
|
7559
|
+
func_quote_arg pretty "$arg"
|
7560
|
+
arg=$func_quote_arg_result
|
7379
7561
|
func_append compile_command " $arg"
|
7380
7562
|
func_append finalize_command " $arg"
|
7381
7563
|
func_append compiler_flags " $arg"
|
@@ -7396,15 +7578,15 @@ func_mode_link ()
|
|
7396
7578
|
continue
|
7397
7579
|
else
|
7398
7580
|
# Otherwise treat like 'Some other compiler flag' below
|
7399
|
-
|
7400
|
-
arg=$
|
7581
|
+
func_quote_arg pretty "$arg"
|
7582
|
+
arg=$func_quote_arg_result
|
7401
7583
|
fi
|
7402
7584
|
;;
|
7403
7585
|
|
7404
7586
|
# Some other compiler flag.
|
7405
7587
|
-* | +*)
|
7406
|
-
|
7407
|
-
arg=$
|
7588
|
+
func_quote_arg pretty "$arg"
|
7589
|
+
arg=$func_quote_arg_result
|
7408
7590
|
;;
|
7409
7591
|
|
7410
7592
|
*.$objext)
|
@@ -7524,8 +7706,8 @@ func_mode_link ()
|
|
7524
7706
|
*)
|
7525
7707
|
# Unknown arguments in both finalize_command and compile_command need
|
7526
7708
|
# to be aesthetically quoted because they are evaled later.
|
7527
|
-
|
7528
|
-
arg=$
|
7709
|
+
func_quote_arg pretty "$arg"
|
7710
|
+
arg=$func_quote_arg_result
|
7529
7711
|
;;
|
7530
7712
|
esac # arg
|
7531
7713
|
|
@@ -8733,7 +8915,7 @@ func_mode_link ()
|
|
8733
8915
|
test CXX = "$tagname" && {
|
8734
8916
|
case $host_os in
|
8735
8917
|
linux*)
|
8736
|
-
case `$CC -V 2>&1 |
|
8918
|
+
case `$CC -V 2>&1 | $SED 5q` in
|
8737
8919
|
*Sun\ C*) # Sun C++ 5.9
|
8738
8920
|
func_suncc_cstd_abi
|
8739
8921
|
|
@@ -8906,7 +9088,7 @@ func_mode_link ()
|
|
8906
9088
|
#
|
8907
9089
|
case $version_type in
|
8908
9090
|
# correct linux to gnu/linux during the next big refactor
|
8909
|
-
darwin|freebsd-elf|linux|osf|windows|none)
|
9091
|
+
darwin|freebsd-elf|linux|midnightbsd-elf|osf|windows|none)
|
8910
9092
|
func_arith $number_major + $number_minor
|
8911
9093
|
current=$func_arith_result
|
8912
9094
|
age=$number_minor
|
@@ -9000,7 +9182,7 @@ func_mode_link ()
|
|
9000
9182
|
versuffix=.$current.$revision
|
9001
9183
|
;;
|
9002
9184
|
|
9003
|
-
freebsd-elf)
|
9185
|
+
freebsd-elf | midnightbsd-elf)
|
9004
9186
|
func_arith $current - $age
|
9005
9187
|
major=.$func_arith_result
|
9006
9188
|
versuffix=$major.$age.$revision
|
@@ -9226,7 +9408,7 @@ func_mode_link ()
|
|
9226
9408
|
*-*-netbsd*)
|
9227
9409
|
# Don't link with libc until the a.out ld.so is fixed.
|
9228
9410
|
;;
|
9229
|
-
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
|
9411
|
+
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-midnightbsd*)
|
9230
9412
|
# Do not include libc due to us having libc/libc_r.
|
9231
9413
|
;;
|
9232
9414
|
*-*-sco3.2v5* | *-*-sco5v6*)
|
@@ -10037,8 +10219,8 @@ EOF
|
|
10037
10219
|
for cmd in $concat_cmds; do
|
10038
10220
|
IFS=$save_ifs
|
10039
10221
|
$opt_quiet || {
|
10040
|
-
|
10041
|
-
eval "func_echo $
|
10222
|
+
func_quote_arg expand,pretty "$cmd"
|
10223
|
+
eval "func_echo $func_quote_arg_result"
|
10042
10224
|
}
|
10043
10225
|
$opt_dry_run || eval "$cmd" || {
|
10044
10226
|
lt_exit=$?
|
@@ -10131,8 +10313,8 @@ EOF
|
|
10131
10313
|
eval cmd=\"$cmd\"
|
10132
10314
|
IFS=$save_ifs
|
10133
10315
|
$opt_quiet || {
|
10134
|
-
|
10135
|
-
eval "func_echo $
|
10316
|
+
func_quote_arg expand,pretty "$cmd"
|
10317
|
+
eval "func_echo $func_quote_arg_result"
|
10136
10318
|
}
|
10137
10319
|
$opt_dry_run || eval "$cmd" || {
|
10138
10320
|
lt_exit=$?
|
@@ -10606,12 +10788,13 @@ EOF
|
|
10606
10788
|
elif eval var_value=\$$var; test -z "$var_value"; then
|
10607
10789
|
relink_command="$var=; export $var; $relink_command"
|
10608
10790
|
else
|
10609
|
-
|
10610
|
-
relink_command="$var=$
|
10791
|
+
func_quote_arg pretty "$var_value"
|
10792
|
+
relink_command="$var=$func_quote_arg_result; export $var; $relink_command"
|
10611
10793
|
fi
|
10612
10794
|
done
|
10613
|
-
|
10614
|
-
|
10795
|
+
func_quote eval cd "`pwd`"
|
10796
|
+
func_quote_arg pretty,unquoted "($func_quote_result; $relink_command)"
|
10797
|
+
relink_command=$func_quote_arg_unquoted_result
|
10615
10798
|
fi
|
10616
10799
|
|
10617
10800
|
# Only actually do things if not in dry run mode.
|
@@ -10851,13 +11034,15 @@ EOF
|
|
10851
11034
|
elif eval var_value=\$$var; test -z "$var_value"; then
|
10852
11035
|
relink_command="$var=; export $var; $relink_command"
|
10853
11036
|
else
|
10854
|
-
|
10855
|
-
relink_command="$var=$
|
11037
|
+
func_quote_arg pretty,unquoted "$var_value"
|
11038
|
+
relink_command="$var=$func_quote_arg_unquoted_result; export $var; $relink_command"
|
10856
11039
|
fi
|
10857
11040
|
done
|
10858
11041
|
# Quote the link command for shipping.
|
10859
|
-
|
10860
|
-
relink_command
|
11042
|
+
func_quote eval cd "`pwd`"
|
11043
|
+
relink_command="($func_quote_result; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
|
11044
|
+
func_quote_arg pretty,unquoted "$relink_command"
|
11045
|
+
relink_command=$func_quote_arg_unquoted_result
|
10861
11046
|
if test yes = "$hardcode_automatic"; then
|
10862
11047
|
relink_command=
|
10863
11048
|
fi
|