ffi 1.13.1 → 1.15.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +91 -0
  3. data/Gemfile +1 -4
  4. data/README.md +14 -2
  5. data/Rakefile +23 -23
  6. data/ext/ffi_c/AbstractMemory.c +24 -25
  7. data/ext/ffi_c/Buffer.c +2 -7
  8. data/ext/ffi_c/Call.c +2 -8
  9. data/ext/ffi_c/ClosurePool.c +64 -11
  10. data/ext/ffi_c/ClosurePool.h +3 -1
  11. data/ext/ffi_c/DynamicLibrary.c +1 -6
  12. data/ext/ffi_c/Function.c +31 -16
  13. data/ext/ffi_c/Function.h +0 -4
  14. data/ext/ffi_c/FunctionInfo.c +2 -6
  15. data/ext/ffi_c/LastError.c +2 -6
  16. data/ext/ffi_c/MemoryPointer.c +2 -7
  17. data/ext/ffi_c/MemoryPointer.h +0 -4
  18. data/ext/ffi_c/MethodHandle.c +4 -8
  19. data/ext/ffi_c/Platform.c +2 -7
  20. data/ext/ffi_c/Pointer.c +24 -25
  21. data/ext/ffi_c/Pointer.h +0 -4
  22. data/ext/ffi_c/Struct.c +3 -6
  23. data/ext/ffi_c/StructByValue.c +2 -7
  24. data/ext/ffi_c/StructLayout.c +2 -6
  25. data/ext/ffi_c/Thread.c +0 -5
  26. data/ext/ffi_c/Thread.h +1 -6
  27. data/ext/ffi_c/Type.c +1 -1
  28. data/ext/ffi_c/Types.c +6 -7
  29. data/ext/ffi_c/Types.h +3 -4
  30. data/ext/ffi_c/Variadic.c +14 -9
  31. data/ext/ffi_c/extconf.rb +20 -4
  32. data/ext/ffi_c/libffi/.travis/bfin-sim.exp +1 -1
  33. data/ext/ffi_c/libffi/.travis/m32r-sim.exp +1 -1
  34. data/ext/ffi_c/libffi/.travis/moxie-sim.exp +1 -1
  35. data/ext/ffi_c/libffi/.travis/or1k-sim.exp +1 -1
  36. data/ext/ffi_c/libffi/.travis/powerpc-eabisim.exp +1 -1
  37. data/ext/ffi_c/libffi/.travis/wine-sim.exp +1 -1
  38. data/ext/ffi_c/libffi/Makefile.am +48 -58
  39. data/ext/ffi_c/libffi/Makefile.in +420 -156
  40. data/ext/ffi_c/libffi/README.md +4 -0
  41. data/ext/ffi_c/libffi/config.guess +552 -331
  42. data/ext/ffi_c/libffi/config.sub +1321 -1306
  43. data/ext/ffi_c/libffi/configure +158 -96
  44. data/ext/ffi_c/libffi/configure.ac +6 -1
  45. data/ext/ffi_c/libffi/configure.host +32 -20
  46. data/ext/ffi_c/libffi/doc/Makefile.in +8 -5
  47. data/ext/ffi_c/libffi/fficonfig.h.in +6 -0
  48. data/ext/ffi_c/libffi/generate-darwin-source-and-headers.py +1 -1
  49. data/ext/ffi_c/libffi/include/Makefile.in +8 -5
  50. data/ext/ffi_c/libffi/install-sh +23 -13
  51. data/ext/ffi_c/libffi/ltmain.sh +156 -61
  52. data/ext/ffi_c/libffi/man/Makefile.in +8 -5
  53. data/ext/ffi_c/libffi/missing +8 -8
  54. data/ext/ffi_c/libffi/msvcc.sh +11 -11
  55. data/ext/ffi_c/libffi/src/aarch64/ffi.c +45 -35
  56. data/ext/ffi_c/libffi/src/aarch64/ffitarget.h +10 -5
  57. data/ext/ffi_c/libffi/src/aarch64/internal.h +1 -0
  58. data/ext/ffi_c/libffi/src/aarch64/sysv.S +1 -1
  59. data/ext/ffi_c/libffi/src/aarch64/win64_armasm.S +1 -1
  60. data/ext/ffi_c/libffi/src/arm/ffi.c +22 -0
  61. data/ext/ffi_c/libffi/src/arm/sysv.S +4 -4
  62. data/ext/ffi_c/libffi/src/closures.c +23 -6
  63. data/ext/ffi_c/libffi/src/csky/ffi.c +395 -0
  64. data/ext/ffi_c/libffi/src/csky/ffitarget.h +63 -0
  65. data/ext/ffi_c/libffi/src/csky/sysv.S +371 -0
  66. data/ext/ffi_c/libffi/src/dlmalloc.c +1 -1
  67. data/ext/ffi_c/libffi/src/kvx/asm.h +5 -0
  68. data/ext/ffi_c/libffi/src/kvx/ffi.c +273 -0
  69. data/ext/ffi_c/libffi/src/kvx/ffitarget.h +75 -0
  70. data/ext/ffi_c/libffi/src/kvx/sysv.S +127 -0
  71. data/ext/ffi_c/libffi/src/mips/ffi.c +5 -1
  72. data/ext/ffi_c/libffi/src/mips/ffitarget.h +1 -1
  73. data/ext/ffi_c/libffi/src/powerpc/ffi_darwin.c +13 -1
  74. data/ext/ffi_c/libffi/src/powerpc/ffi_powerpc.h +1 -1
  75. data/ext/ffi_c/libffi/src/powerpc/linux64.S +8 -0
  76. data/ext/ffi_c/libffi/src/powerpc/linux64_closure.S +13 -1
  77. data/ext/ffi_c/libffi/src/prep_cif.c +1 -1
  78. data/ext/ffi_c/libffi/src/x86/ffi.c +8 -2
  79. data/ext/ffi_c/libffi/src/x86/ffi64.c +7 -0
  80. data/ext/ffi_c/libffi/src/x86/ffiw64.c +5 -0
  81. data/ext/ffi_c/libffi/src/x86/sysv.S +2 -2
  82. data/ext/ffi_c/libffi/src/x86/unix64.S +1 -2
  83. data/ext/ffi_c/libffi/src/x86/win64.S +3 -2
  84. data/ext/ffi_c/libffi/src/x86/win64_intel.S +3 -2
  85. data/ext/ffi_c/libffi/testsuite/Makefile.in +9 -6
  86. data/ext/ffi_c/libffi/testsuite/lib/libffi.exp +22 -2
  87. data/ext/ffi_c/libffi/testsuite/libffi.bhaible/test-call.c +4 -4
  88. data/ext/ffi_c/libffi/testsuite/libffi.bhaible/test-callback.c +2 -2
  89. data/ext/ffi_c/libffi/testsuite/libffi.closures/huge_struct.c +2 -0
  90. data/ffi.gemspec +1 -1
  91. data/lib/ffi.rb +3 -4
  92. data/lib/ffi/abstract_memory.rb +44 -0
  93. data/lib/ffi/autopointer.rb +1 -1
  94. data/lib/ffi/ffi.rb +1 -0
  95. data/lib/ffi/io.rb +3 -3
  96. data/lib/ffi/library.rb +2 -2
  97. data/lib/ffi/managedstruct.rb +2 -2
  98. data/lib/ffi/platform.rb +17 -11
  99. data/lib/ffi/platform/aarch64-darwin/types.conf +130 -0
  100. data/lib/ffi/platform/aarch64-freebsd/types.conf +2 -2
  101. data/lib/ffi/platform/aarch64-freebsd12/types.conf +113 -60
  102. data/lib/ffi/platform/aarch64-openbsd/types.conf +134 -0
  103. data/lib/ffi/platform/powerpc64le-linux/types.conf +100 -0
  104. data/lib/ffi/platform/riscv64-linux/types.conf +104 -0
  105. data/lib/ffi/platform/x86_64-haiku/types.conf +117 -0
  106. data/lib/ffi/platform/x86_64-msys/types.conf +119 -0
  107. data/lib/ffi/pointer.rb +2 -2
  108. data/lib/ffi/tools/const_generator.rb +2 -1
  109. data/lib/ffi/tools/struct_generator.rb +2 -1
  110. data/lib/ffi/variadic.rb +1 -10
  111. data/lib/ffi/version.rb +1 -1
  112. data/rakelib/ffi_gem_helper.rb +65 -0
  113. metadata +18 -11
  114. data/.appveyor.yml +0 -30
  115. data/.github/workflows/ci.yml +0 -64
  116. data/.gitignore +0 -25
  117. data/.gitmodules +0 -4
  118. data/.travis.yml +0 -58
  119. data/.yardopts +0 -5
  120. data/ext/ffi_c/win32/stdbool.h +0 -8
  121. data/ext/ffi_c/win32/stdint.h +0 -201
@@ -709,7 +709,6 @@ am__nodep
709
709
  AMDEPBACKSLASH
710
710
  AMDEP_FALSE
711
711
  AMDEP_TRUE
712
- am__quote
713
712
  am__include
714
713
  DEPDIR
715
714
  OBJEXT
@@ -797,7 +796,8 @@ PACKAGE_VERSION
797
796
  PACKAGE_TARNAME
798
797
  PACKAGE_NAME
799
798
  PATH_SEPARATOR
800
- SHELL'
799
+ SHELL
800
+ am__quote'
801
801
  ac_subst_files=''
802
802
  ac_user_opts='
803
803
  enable_option_checking
@@ -2921,7 +2921,7 @@ ax_enable_builddir_auxdir="$am_aux_dir"
2921
2921
  ac_config_commands="$ac_config_commands buildir"
2922
2922
 
2923
2923
 
2924
- am__api_version='1.15'
2924
+ am__api_version='1.16'
2925
2925
 
2926
2926
  # Find a good install program. We prefer a C program (faster),
2927
2927
  # so one script is as good as another. But avoid the broken or
@@ -3434,8 +3434,8 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3434
3434
 
3435
3435
  # For better backward compatibility. To be removed once Automake 1.9.x
3436
3436
  # dies out for good. For more background, see:
3437
- # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
3438
- # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
3437
+ # <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
3438
+ # <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
3439
3439
  mkdir_p='$(MKDIR_P)'
3440
3440
 
3441
3441
  # We need awk for the "check" target (and possibly the TAP driver). The
@@ -3486,7 +3486,7 @@ END
3486
3486
  Aborting the configuration process, to ensure you take notice of the issue.
3487
3487
 
3488
3488
  You can download and install GNU coreutils to get an 'rm' implementation
3489
- that behaves properly: <http://www.gnu.org/software/coreutils/>.
3489
+ that behaves properly: <https://www.gnu.org/software/coreutils/>.
3490
3490
 
3491
3491
  If you want to complete the configuration process using your problematic
3492
3492
  'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
@@ -4359,45 +4359,45 @@ DEPDIR="${am__leading_dot}deps"
4359
4359
 
4360
4360
  ac_config_commands="$ac_config_commands depfiles"
4361
4361
 
4362
-
4363
- am_make=${MAKE-make}
4364
- cat > confinc << 'END'
4362
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
4363
+ $as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; }
4364
+ cat > confinc.mk << 'END'
4365
4365
  am__doit:
4366
- @echo this is the am__doit target
4366
+ @echo this is the am__doit target >confinc.out
4367
4367
  .PHONY: am__doit
4368
4368
  END
4369
- # If we don't find an include directive, just comment out the code.
4370
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
4371
- $as_echo_n "checking for style of include used by $am_make... " >&6; }
4372
4369
  am__include="#"
4373
4370
  am__quote=
4374
- _am_result=none
4375
- # First try GNU make style include.
4376
- echo "include confinc" > confmf
4377
- # Ignore all kinds of additional output from 'make'.
4378
- case `$am_make -s -f confmf 2> /dev/null` in #(
4379
- *the\ am__doit\ target*)
4380
- am__include=include
4381
- am__quote=
4382
- _am_result=GNU
4383
- ;;
4384
- esac
4385
- # Now try BSD make style include.
4386
- if test "$am__include" = "#"; then
4387
- echo '.include "confinc"' > confmf
4388
- case `$am_make -s -f confmf 2> /dev/null` in #(
4389
- *the\ am__doit\ target*)
4390
- am__include=.include
4391
- am__quote="\""
4392
- _am_result=BSD
4371
+ # BSD make does it like this.
4372
+ echo '.include "confinc.mk" # ignored' > confmf.BSD
4373
+ # Other make implementations (GNU, Solaris 10, AIX) do it like this.
4374
+ echo 'include confinc.mk # ignored' > confmf.GNU
4375
+ _am_result=no
4376
+ for s in GNU BSD; do
4377
+ { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
4378
+ (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
4379
+ ac_status=$?
4380
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
4381
+ (exit $ac_status); }
4382
+ case $?:`cat confinc.out 2>/dev/null` in #(
4383
+ '0:this is the am__doit target') :
4384
+ case $s in #(
4385
+ BSD) :
4386
+ am__include='.include' am__quote='"' ;; #(
4387
+ *) :
4388
+ am__include='include' am__quote='' ;;
4389
+ esac ;; #(
4390
+ *) :
4393
4391
  ;;
4394
- esac
4395
- fi
4396
-
4397
-
4398
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
4399
- $as_echo "$_am_result" >&6; }
4400
- rm -f confinc confmf
4392
+ esac
4393
+ if test "$am__include" != "#"; then
4394
+ _am_result="yes ($s style)"
4395
+ break
4396
+ fi
4397
+ done
4398
+ rm -f confinc.* confmf.*
4399
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
4400
+ $as_echo "${_am_result}" >&6; }
4401
4401
 
4402
4402
  # Check whether --enable-dependency-tracking was given.
4403
4403
  if test "${enable_dependency_tracking+set}" = set; then :
@@ -17465,6 +17465,30 @@ fi
17465
17465
 
17466
17466
 
17467
17467
 
17468
+ for ac_header in sys/memfd.h
17469
+ do :
17470
+ ac_fn_c_check_header_mongrel "$LINENO" "sys/memfd.h" "ac_cv_header_sys_memfd_h" "$ac_includes_default"
17471
+ if test "x$ac_cv_header_sys_memfd_h" = xyes; then :
17472
+ cat >>confdefs.h <<_ACEOF
17473
+ #define HAVE_SYS_MEMFD_H 1
17474
+ _ACEOF
17475
+
17476
+ fi
17477
+
17478
+ done
17479
+
17480
+ for ac_func in memfd_create
17481
+ do :
17482
+ ac_fn_c_check_func "$LINENO" "memfd_create" "ac_cv_func_memfd_create"
17483
+ if test "x$ac_cv_func_memfd_create" = xyes; then :
17484
+ cat >>confdefs.h <<_ACEOF
17485
+ #define HAVE_MEMFD_CREATE 1
17486
+ _ACEOF
17487
+
17488
+ fi
17489
+ done
17490
+
17491
+
17468
17492
  for ac_header in sys/mman.h
17469
17493
  do :
17470
17494
  ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
@@ -18620,6 +18644,42 @@ $as_echo "#define HAVE_AS_X86_64_UNWIND_SECTION_TYPE 1" >>confdefs.h
18620
18644
  fi
18621
18645
 
18622
18646
  if test "x$GCC" = "xyes"; then
18647
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fno-lto" >&5
18648
+ $as_echo_n "checking whether C compiler accepts -fno-lto... " >&6; }
18649
+ if ${ax_cv_check_cflags___fno_lto+:} false; then :
18650
+ $as_echo_n "(cached) " >&6
18651
+ else
18652
+
18653
+ ax_check_save_flags=$CFLAGS
18654
+ CFLAGS="$CFLAGS -fno-lto"
18655
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18656
+ /* end confdefs.h. */
18657
+
18658
+ int
18659
+ main ()
18660
+ {
18661
+
18662
+ ;
18663
+ return 0;
18664
+ }
18665
+ _ACEOF
18666
+ if ac_fn_c_try_compile "$LINENO"; then :
18667
+ ax_cv_check_cflags___fno_lto=yes
18668
+ else
18669
+ ax_cv_check_cflags___fno_lto=no
18670
+ fi
18671
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18672
+ CFLAGS=$ax_check_save_flags
18673
+ fi
18674
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fno_lto" >&5
18675
+ $as_echo "$ax_cv_check_cflags___fno_lto" >&6; }
18676
+ if test "x$ax_cv_check_cflags___fno_lto" = xyes; then :
18677
+ libffi_cv_no_lto=-fno-lto
18678
+ else
18679
+ :
18680
+ fi
18681
+
18682
+
18623
18683
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether .eh_frame section should be read-only" >&5
18624
18684
  $as_echo_n "checking whether .eh_frame section should be read-only... " >&6; }
18625
18685
  if ${libffi_cv_ro_eh_frame+:} false; then :
@@ -18628,7 +18688,7 @@ else
18628
18688
 
18629
18689
  libffi_cv_ro_eh_frame=yes
18630
18690
  echo 'extern void foo (void); void bar (void) { foo (); foo (); }' > conftest.c
18631
- if $CC $CFLAGS -c -fpic -fexceptions -o conftest.o conftest.c > /dev/null 2>&1; then
18691
+ if $CC $CFLAGS -c -fpic -fexceptions $libffi_cv_no_lto -o conftest.o conftest.c > /dev/null 2>&1; then
18632
18692
  if readelf -WS conftest.o | grep -q -n 'eh_frame .* WA'; then
18633
18693
  libffi_cv_ro_eh_frame=no
18634
18694
  fi
@@ -19993,7 +20053,7 @@ ax_enable_builddir_auxdir="$ax_enable_builddir_auxdir" # $AUX
19993
20053
  ax_enable_builddir_sed="$ax_enable_builddir_sed" # $SED
19994
20054
  ax_enable_builddir="$ax_enable_builddir" # $SUB
19995
20055
 
19996
- AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
20056
+ AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
19997
20057
 
19998
20058
 
19999
20059
  # The HP-UX ksh and POSIX shell print the target directory to stdout
@@ -21141,29 +21201,35 @@ $as_echo "$as_me: build in $ax_enable_builddir (HOST=$ax_enable_builddir_host)"
21141
21201
  # Older Autoconf quotes --file arguments for eval, but not when files
21142
21202
  # are listed without --file. Let's play safe and only enable the eval
21143
21203
  # if we detect the quoting.
21144
- case $CONFIG_FILES in
21145
- *\'*) eval set x "$CONFIG_FILES" ;;
21146
- *) set x $CONFIG_FILES ;;
21147
- esac
21204
+ # TODO: see whether this extra hack can be removed once we start
21205
+ # requiring Autoconf 2.70 or later.
21206
+ case $CONFIG_FILES in #(
21207
+ *\'*) :
21208
+ eval set x "$CONFIG_FILES" ;; #(
21209
+ *) :
21210
+ set x $CONFIG_FILES ;; #(
21211
+ *) :
21212
+ ;;
21213
+ esac
21148
21214
  shift
21149
- for mf
21215
+ # Used to flag and report bootstrapping failures.
21216
+ am_rc=0
21217
+ for am_mf
21150
21218
  do
21151
21219
  # Strip MF so we end up with the name of the file.
21152
- mf=`echo "$mf" | sed -e 's/:.*$//'`
21153
- # Check whether this is an Automake generated Makefile or not.
21154
- # We used to match only the files named 'Makefile.in', but
21155
- # some people rename them; so instead we look at the file content.
21156
- # Grep'ing the first line is not enough: some people post-process
21157
- # each Makefile.in and add a new line on top of each file to say so.
21158
- # Grep'ing the whole file is not good either: AIX grep has a line
21220
+ am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'`
21221
+ # Check whether this is an Automake generated Makefile which includes
21222
+ # dependency-tracking related rules and includes.
21223
+ # Grep'ing the whole file directly is not great: AIX grep has a line
21159
21224
  # limit of 2048, but all sed's we know have understand at least 4000.
21160
- if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
21161
- dirpart=`$as_dirname -- "$mf" ||
21162
- $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21163
- X"$mf" : 'X\(//\)[^/]' \| \
21164
- X"$mf" : 'X\(//\)$' \| \
21165
- X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
21166
- $as_echo X"$mf" |
21225
+ sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
21226
+ || continue
21227
+ am_dirpart=`$as_dirname -- "$am_mf" ||
21228
+ $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21229
+ X"$am_mf" : 'X\(//\)[^/]' \| \
21230
+ X"$am_mf" : 'X\(//\)$' \| \
21231
+ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
21232
+ $as_echo X"$am_mf" |
21167
21233
  sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21168
21234
  s//\1/
21169
21235
  q
@@ -21181,53 +21247,48 @@ $as_echo X"$mf" |
21181
21247
  q
21182
21248
  }
21183
21249
  s/.*/./; q'`
21184
- else
21185
- continue
21186
- fi
21187
- # Extract the definition of DEPDIR, am__include, and am__quote
21188
- # from the Makefile without running 'make'.
21189
- DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
21190
- test -z "$DEPDIR" && continue
21191
- am__include=`sed -n 's/^am__include = //p' < "$mf"`
21192
- test -z "$am__include" && continue
21193
- am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
21194
- # Find all dependency output files, they are included files with
21195
- # $(DEPDIR) in their names. We invoke sed twice because it is the
21196
- # simplest approach to changing $(DEPDIR) to its actual value in the
21197
- # expansion.
21198
- for file in `sed -n "
21199
- s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
21200
- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
21201
- # Make sure the directory exists.
21202
- test -f "$dirpart/$file" && continue
21203
- fdir=`$as_dirname -- "$file" ||
21204
- $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21205
- X"$file" : 'X\(//\)[^/]' \| \
21206
- X"$file" : 'X\(//\)$' \| \
21207
- X"$file" : 'X\(/\)' \| . 2>/dev/null ||
21208
- $as_echo X"$file" |
21209
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21210
- s//\1/
21211
- q
21212
- }
21213
- /^X\(\/\/\)[^/].*/{
21250
+ am_filepart=`$as_basename -- "$am_mf" ||
21251
+ $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
21252
+ X"$am_mf" : 'X\(//\)$' \| \
21253
+ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
21254
+ $as_echo X/"$am_mf" |
21255
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
21214
21256
  s//\1/
21215
21257
  q
21216
21258
  }
21217
- /^X\(\/\/\)$/{
21259
+ /^X\/\(\/\/\)$/{
21218
21260
  s//\1/
21219
21261
  q
21220
21262
  }
21221
- /^X\(\/\).*/{
21263
+ /^X\/\(\/\).*/{
21222
21264
  s//\1/
21223
21265
  q
21224
21266
  }
21225
21267
  s/.*/./; q'`
21226
- as_dir=$dirpart/$fdir; as_fn_mkdir_p
21227
- # echo "creating $dirpart/$file"
21228
- echo '# dummy' > "$dirpart/$file"
21229
- done
21268
+ { echo "$as_me:$LINENO: cd "$am_dirpart" \
21269
+ && sed -e '/# am--include-marker/d' "$am_filepart" \
21270
+ | $MAKE -f - am--depfiles" >&5
21271
+ (cd "$am_dirpart" \
21272
+ && sed -e '/# am--include-marker/d' "$am_filepart" \
21273
+ | $MAKE -f - am--depfiles) >&5 2>&5
21274
+ ac_status=$?
21275
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
21276
+ (exit $ac_status); } || am_rc=$?
21230
21277
  done
21278
+ if test $am_rc -ne 0; then
21279
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
21280
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
21281
+ as_fn_error $? "Something went wrong bootstrapping makefile fragments
21282
+ for automatic dependency tracking. Try re-running configure with the
21283
+ '--disable-dependency-tracking' option to at least be able to build
21284
+ the package (albeit without support for automatic dependency tracking).
21285
+ See \`config.log' for more details" "$LINENO" 5; }
21286
+ fi
21287
+ { am_dirpart=; unset am_dirpart;}
21288
+ { am_filepart=; unset am_filepart;}
21289
+ { am_mf=; unset am_mf;}
21290
+ { am_rc=; unset am_rc;}
21291
+ rm -f conftest-deps.mk
21231
21292
  }
21232
21293
  ;;
21233
21294
  "libtool":C)
@@ -21245,6 +21306,7 @@ $as_echo X"$file" |
21245
21306
  cat <<_LT_EOF >> "$cfgfile"
21246
21307
  #! $SHELL
21247
21308
  # Generated automatically by $as_me ($PACKAGE) $VERSION
21309
+ # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
21248
21310
  # NOTE: Changes made to this file will be lost: look at ltmain.sh.
21249
21311
 
21250
21312
  # Provide generalized library-building support services.
@@ -63,6 +63,9 @@ EOF
63
63
 
64
64
  AM_MAINTAINER_MODE
65
65
 
66
+ AC_CHECK_HEADERS(sys/memfd.h)
67
+ AC_CHECK_FUNCS([memfd_create])
68
+
66
69
  AC_CHECK_HEADERS(sys/mman.h)
67
70
  AC_CHECK_FUNCS([mmap mkostemp])
68
71
  AC_FUNC_MMAP_BLACKLIST
@@ -260,11 +263,13 @@ EOF
260
263
  fi
261
264
 
262
265
  if test "x$GCC" = "xyes"; then
266
+ AX_CHECK_COMPILE_FLAG(-fno-lto, libffi_cv_no_lto=-fno-lto)
267
+
263
268
  AC_CACHE_CHECK([whether .eh_frame section should be read-only],
264
269
  libffi_cv_ro_eh_frame, [
265
270
  libffi_cv_ro_eh_frame=yes
266
271
  echo 'extern void foo (void); void bar (void) { foo (); foo (); }' > conftest.c
267
- if $CC $CFLAGS -c -fpic -fexceptions -o conftest.o conftest.c > /dev/null 2>&1; then
272
+ if $CC $CFLAGS -c -fpic -fexceptions $libffi_cv_no_lto -o conftest.o conftest.c > /dev/null 2>&1; then
268
273
  if readelf -WS conftest.o | grep -q -n 'eh_frame .* WA'; then
269
274
  libffi_cv_ro_eh_frame=no
270
275
  fi
@@ -8,7 +8,9 @@
8
8
  case "${host}" in
9
9
  aarch64*-*-cygwin* | aarch64*-*-mingw* | aarch64*-*-win* )
10
10
  TARGET=ARM_WIN64; TARGETDIR=aarch64
11
- MSVC=1
11
+ if test "${ax_cv_c_compiler_vendor}" = "microsoft"; then
12
+ MSVC=1
13
+ fi
12
14
  ;;
13
15
 
14
16
  aarch64*-*-*)
@@ -53,6 +55,11 @@ case "${host}" in
53
55
  SOURCES="ffi.c sysv.S"
54
56
  ;;
55
57
 
58
+ csky-*-*)
59
+ TARGET=CSKY; TARGETDIR=csky
60
+ SOURCES="ffi.c sysv.S"
61
+ ;;
62
+
56
63
  frv-*-*)
57
64
  TARGET=FRV; TARGETDIR=frv
58
65
  SOURCES="ffi.c eabi.S"
@@ -108,22 +115,14 @@ case "${host}" in
108
115
  i?86-*-* | x86_64-*-* | amd64-*)
109
116
  TARGETDIR=x86
110
117
  if test $ac_cv_sizeof_size_t = 4; then
111
- case "$host" in
112
- x86_64-*x32|x86_64-x32-*)
113
- TARGET_X32=yes
114
- TARGET=X86_64
115
- ;;
116
- *)
117
- echo 'int foo (void) { return __x86_64__; }' > conftest.c
118
- if $CC $CFLAGS -Werror -S conftest.c -o conftest.s > /dev/null 2>&1; then
119
- TARGET_X32=yes
120
- TARGET=X86_64
121
- else
122
- TARGET=X86;
123
- fi
124
- rm -f conftest.*
125
- ;;
126
- esac
118
+ echo 'int foo (void) { return __x86_64__; }' > conftest.c
119
+ if $CC $CFLAGS -Werror -S conftest.c -o conftest.s > /dev/null 2>&1; then
120
+ TARGET_X32=yes
121
+ TARGET=X86_64
122
+ else
123
+ TARGET=X86;
124
+ fi
125
+ rm -f conftest.*
127
126
  else
128
127
  TARGET=X86_64;
129
128
  fi
@@ -134,6 +133,11 @@ case "${host}" in
134
133
  SOURCES="ffi.c unix.S"
135
134
  ;;
136
135
 
136
+ kvx-*-*)
137
+ TARGET=KVX; TARGETDIR=kvx
138
+ SOURCES="ffi.c sysv.S"
139
+ ;;
140
+
137
141
  m32r*-*-*)
138
142
  TARGET=M32R; TARGETDIR=m32r
139
143
  SOURCES="ffi.c sysv.S"
@@ -167,7 +171,7 @@ case "${host}" in
167
171
  mips-sgi-irix5.* | mips-sgi-irix6.* | mips*-*-rtems*)
168
172
  TARGET=MIPS; TARGETDIR=mips
169
173
  ;;
170
- mips*-*linux* | mips*-*-openbsd*)
174
+ mips*-*linux* | mips*-*-openbsd* | mips*-*-freebsd*)
171
175
  # Support 128-bit long double for NewABI.
172
176
  HAVE_LONG_DOUBLE='defined(__mips64)'
173
177
  TARGET=MIPS; TARGETDIR=mips
@@ -206,7 +210,11 @@ case "${host}" in
206
210
  TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc
207
211
  HAVE_LONG_DOUBLE_VARIANT=1
208
212
  ;;
209
- powerpc64-*-freebsd*)
213
+ powerpcspe-*-freebsd*)
214
+ TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc
215
+ CFLAGS="$CFLAGS -D__NO_FPRS__"
216
+ ;;
217
+ powerpc64-*-freebsd* | powerpc64le-*-freebsd*)
210
218
  TARGET=POWERPC; TARGETDIR=powerpc
211
219
  ;;
212
220
  powerpc*-*-rtems*)
@@ -259,7 +267,11 @@ case "${TARGET}" in
259
267
  SOURCES="ffi.c sysv_msvc_arm32.S"
260
268
  ;;
261
269
  ARM_WIN64)
262
- SOURCES="ffi.c win64_armasm.S"
270
+ if test "$MSVC" = 1; then
271
+ SOURCES="ffi.c win64_armasm.S"
272
+ else
273
+ SOURCES="ffi.c sysv.S"
274
+ fi
263
275
  ;;
264
276
  MIPS)
265
277
  SOURCES="ffi.c o32.S n32.S"