ffi 1.9.23 → 1.9.24

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +66 -0
  3. data/Rakefile +1 -1
  4. data/ext/ffi_c/Call.c +5 -2
  5. data/ext/ffi_c/Function.c +8 -5
  6. data/ext/ffi_c/Thread.c +1 -0
  7. data/ext/ffi_c/extconf.rb +1 -0
  8. data/ext/ffi_c/libffi/.appveyor.yml +6 -4
  9. data/ext/ffi_c/libffi/.github/issue_template.md +10 -0
  10. data/ext/ffi_c/libffi/.gitignore +2 -0
  11. data/ext/ffi_c/libffi/.travis.yml +20 -16
  12. data/ext/ffi_c/libffi/.travis/ar-lib +270 -0
  13. data/ext/ffi_c/libffi/.travis/build.sh +34 -0
  14. data/ext/ffi_c/libffi/.travis/compile +351 -0
  15. data/ext/ffi_c/libffi/.travis/install.sh +11 -3
  16. data/ext/ffi_c/libffi/.travis/moxie-sim.exp +60 -0
  17. data/ext/ffi_c/libffi/.travis/site.exp +18 -0
  18. data/ext/ffi_c/libffi/LICENSE-BUILDTOOLS +352 -0
  19. data/ext/ffi_c/libffi/Makefile.am +4 -45
  20. data/ext/ffi_c/libffi/{README → README.md} +237 -230
  21. data/ext/ffi_c/libffi/configure.ac +10 -8
  22. data/ext/ffi_c/libffi/configure.host +5 -0
  23. data/ext/ffi_c/libffi/include/ffi.h.in +48 -26
  24. data/ext/ffi_c/libffi/include/ffi_common.h +2 -0
  25. data/ext/ffi_c/libffi/m4/ax_append_flag.m4 +18 -16
  26. data/ext/ffi_c/libffi/m4/ax_cc_maxopt.m4 +21 -8
  27. data/ext/ffi_c/libffi/m4/ax_cflags_warn_all.m4 +4 -4
  28. data/ext/ffi_c/libffi/m4/ax_check_compile_flag.m4 +9 -7
  29. data/ext/ffi_c/libffi/m4/ax_compiler_vendor.m4 +8 -5
  30. data/ext/ffi_c/libffi/m4/ax_configure_args.m4 +5 -5
  31. data/ext/ffi_c/libffi/m4/ax_enable_builddir.m4 +7 -6
  32. data/ext/ffi_c/libffi/m4/ax_gcc_archflag.m4 +99 -61
  33. data/ext/ffi_c/libffi/m4/ax_gcc_x86_cpuid.m4 +18 -8
  34. data/ext/ffi_c/libffi/m4/ax_require_defined.m4 +37 -0
  35. data/ext/ffi_c/libffi/msvcc.sh +82 -14
  36. data/ext/ffi_c/libffi/src/aarch64/ffi.c +8 -31
  37. data/ext/ffi_c/libffi/src/closures.c +31 -1
  38. data/ext/ffi_c/libffi/src/ia64/ffi.c +24 -6
  39. data/ext/ffi_c/libffi/src/ia64/ffitarget.h +2 -1
  40. data/ext/ffi_c/libffi/src/ia64/unix.S +6 -1
  41. data/ext/ffi_c/libffi/src/mips/ffi.c +29 -12
  42. data/ext/ffi_c/libffi/src/mips/ffitarget.h +7 -12
  43. data/ext/ffi_c/libffi/src/moxie/eabi.S +1 -1
  44. data/ext/ffi_c/libffi/src/moxie/ffi.c +18 -5
  45. data/ext/ffi_c/libffi/src/powerpc/ffi_linux64.c +45 -16
  46. data/ext/ffi_c/libffi/src/riscv/ffi.c +445 -0
  47. data/ext/ffi_c/libffi/src/riscv/ffitarget.h +68 -0
  48. data/ext/ffi_c/libffi/src/riscv/sysv.S +214 -0
  49. data/ext/ffi_c/libffi/src/types.c +3 -1
  50. data/ext/ffi_c/libffi/src/x86/ffi.c +18 -0
  51. data/ext/ffi_c/libffi/src/x86/ffi64.c +15 -9
  52. data/ext/ffi_c/libffi/src/x86/ffitarget.h +8 -2
  53. data/ext/ffi_c/libffi/src/x86/ffiw64.c +30 -9
  54. data/ext/ffi_c/libffi/src/xtensa/sysv.S +6 -1
  55. data/ext/ffi_c/libffi/testsuite/Makefile.am +108 -77
  56. data/ext/ffi_c/libffi/testsuite/lib/libffi.exp +195 -5
  57. data/ext/ffi_c/libffi/testsuite/libffi.bhaible/Makefile +28 -0
  58. data/ext/ffi_c/libffi/testsuite/libffi.bhaible/README +78 -0
  59. data/ext/ffi_c/libffi/testsuite/libffi.bhaible/alignof.h +50 -0
  60. data/ext/ffi_c/libffi/testsuite/libffi.bhaible/bhaible.exp +58 -0
  61. data/ext/ffi_c/libffi/testsuite/libffi.bhaible/test-call.c +1745 -0
  62. data/ext/ffi_c/libffi/testsuite/libffi.bhaible/test-callback.c +2885 -0
  63. data/ext/ffi_c/libffi/testsuite/libffi.bhaible/testcases.c +743 -0
  64. data/ext/ffi_c/libffi/testsuite/libffi.call/align_stdcall.c +46 -0
  65. data/ext/ffi_c/libffi/testsuite/libffi.call/call.exp +14 -1
  66. data/ext/ffi_c/libffi/testsuite/libffi.call/ffitest.h +3 -1
  67. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct10.c +1 -0
  68. data/ext/ffi_c/libffi/testsuite/libffi.call/struct10.c +57 -0
  69. data/ext/ffi_c/libffi/testsuite/libffi.call/unwindtest.cc +1 -1
  70. data/ext/ffi_c/libffi/testsuite/libffi.call/unwindtest_ffi_call.cc +1 -1
  71. data/lib/ffi/library.rb +2 -4
  72. data/lib/ffi/platform/mips64-linux/types.conf +104 -0
  73. data/lib/ffi/platform/mipsisa32r6-linux/types.conf +102 -0
  74. data/lib/ffi/platform/mipsisa32r6el-linux/types.conf +102 -0
  75. data/lib/ffi/platform/mipsisa64r6-linux/types.conf +104 -0
  76. data/lib/ffi/platform/mipsisa64r6el-linux/types.conf +104 -0
  77. data/lib/ffi/version.rb +1 -1
  78. metadata +29 -3
@@ -2,7 +2,7 @@ dnl Process this with autoconf to create configure
2
2
 
3
3
  AC_PREREQ(2.68)
4
4
 
5
- AC_INIT([libffi], [3.99999], [http://github.com/libffi/libffi/issues])
5
+ AC_INIT([libffi], [3.3-rc0], [http://github.com/libffi/libffi/issues])
6
6
  AC_CONFIG_HEADERS([fficonfig.h])
7
7
 
8
8
  AC_CANONICAL_SYSTEM
@@ -353,11 +353,11 @@ AC_ARG_ENABLE(multi-os-directory,
353
353
  if test "x$GCC" = "xyes"; then
354
354
  if test -n "$with_cross_host" &&
355
355
  test x"$with_cross_host" != x"no"; then
356
- toolexecdir="${exec_prefix}"/'$(target_alias)'
357
- toolexeclibdir="${toolexecdir}"/lib
356
+ toolexecdir='${exec_prefix}'/'$(target_alias)'
357
+ toolexeclibdir='${toolexecdir}'/lib
358
358
  else
359
- toolexecdir="${libdir}"/gcc-lib/'$(target_alias)'
360
- toolexeclibdir="${libdir}"
359
+ toolexecdir='${libdir}'/gcc-lib/'$(target_alias)'
360
+ toolexeclibdir='${libdir}'
361
361
  fi
362
362
  if test x"$enable_multi_os_directory" != x"no"; then
363
363
  multi_os_directory=`$CC $CFLAGS -print-multi-os-directory`
@@ -368,7 +368,7 @@ if test "x$GCC" = "xyes"; then
368
368
  fi
369
369
  AC_SUBST(toolexecdir)
370
370
  else
371
- toolexeclibdir="${libdir}"
371
+ toolexeclibdir='${libdir}'
372
372
  fi
373
373
  AC_SUBST(toolexeclibdir)
374
374
 
@@ -381,8 +381,10 @@ test -d src || mkdir src
381
381
  test -d src/$TARGETDIR || mkdir src/$TARGETDIR
382
382
  ], [TARGETDIR="$TARGETDIR"])
383
383
 
384
- AC_CONFIG_LINKS(include/ffitarget.h:src/$TARGETDIR/ffitarget.h)
385
-
386
384
  AC_CONFIG_FILES(include/Makefile include/ffi.h Makefile testsuite/Makefile man/Makefile doc/Makefile libffi.pc)
387
385
 
388
386
  AC_OUTPUT
387
+
388
+ # Copy this file instead of using AC_CONFIG_LINK in order to support
389
+ # compiling with MSVC, which won't understand cygwin style symlinks.
390
+ cp ${srcdir}/src/$TARGETDIR/ffitarget.h include/ffitarget.h
@@ -206,6 +206,11 @@ case "${host}" in
206
206
  TARGET=POWERPC; TARGETDIR=powerpc
207
207
  ;;
208
208
 
209
+ riscv*-*)
210
+ TARGET=RISCV; TARGETDIR=riscv
211
+ SOURCES="ffi.c sysv.S"
212
+ ;;
213
+
209
214
  s390-*-* | s390x-*-*)
210
215
  TARGET=S390; TARGETDIR=s390
211
216
  SOURCES="ffi.c sysv.S"
@@ -108,6 +108,32 @@ typedef struct _ffi_type
108
108
  struct _ffi_type **elements;
109
109
  } ffi_type;
110
110
 
111
+ /* Need minimal decorations for DLLs to work on Windows. GCC has
112
+ autoimport and autoexport. Always mark externally visible symbols
113
+ as dllimport for MSVC clients, even if it means an extra indirection
114
+ when using the static version of the library.
115
+ Besides, as a workaround, they can define FFI_BUILDING if they
116
+ *know* they are going to link with the static library. */
117
+ #if defined _MSC_VER
118
+ # if defined FFI_BUILDING_DLL /* Building libffi.DLL with msvcc.sh */
119
+ # define FFI_API __declspec(dllexport)
120
+ # elif !defined FFI_BUILDING /* Importing libffi.DLL */
121
+ # define FFI_API __declspec(dllimport)
122
+ # else /* Building/linking static library */
123
+ # define FFI_API
124
+ # endif
125
+ #else
126
+ # define FFI_API
127
+ #endif
128
+
129
+ /* The externally visible type declarations also need the MSVC DLL
130
+ decorations, or they will not be exported from the object file. */
131
+ #if defined LIBFFI_HIDE_BASIC_TYPES
132
+ # define FFI_EXTERN FFI_API
133
+ #else
134
+ # define FFI_EXTERN extern FFI_API
135
+ #endif
136
+
111
137
  #ifndef LIBFFI_HIDE_BASIC_TYPES
112
138
  #if SCHAR_MAX == 127
113
139
  # define ffi_type_uchar ffi_type_uint8
@@ -157,19 +183,6 @@ typedef struct _ffi_type
157
183
  #error "long size not supported"
158
184
  #endif
159
185
 
160
- /* Need minimal decorations for DLLs to works on Windows. GCC has
161
- autoimport and autoexport. Rely on Libtool to help MSVC export
162
- from a DLL, but always declare data to be imported for MSVC
163
- clients. This costs an extra indirection for MSVC clients using
164
- the static version of the library, but don't worry about that.
165
- Besides, as a workaround, they can define FFI_BUILDING if they
166
- *know* they are going to link with the static library. */
167
- #if defined _MSC_VER && !defined FFI_BUILDING
168
- #define FFI_EXTERN extern __declspec(dllimport)
169
- #else
170
- #define FFI_EXTERN extern
171
- #endif
172
-
173
186
  /* These are defined in types.c. */
174
187
  FFI_EXTERN ffi_type ffi_type_void;
175
188
  FFI_EXTERN ffi_type ffi_type_uint8;
@@ -256,26 +269,31 @@ typedef ffi_raw ffi_java_raw;
256
269
  #endif
257
270
 
258
271
 
272
+ FFI_API
259
273
  void ffi_raw_call (ffi_cif *cif,
260
274
  void (*fn)(void),
261
275
  void *rvalue,
262
276
  ffi_raw *avalue);
263
277
 
264
- void ffi_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_raw *raw);
265
- void ffi_raw_to_ptrarray (ffi_cif *cif, ffi_raw *raw, void **args);
266
- size_t ffi_raw_size (ffi_cif *cif);
278
+ FFI_API void ffi_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_raw *raw);
279
+ FFI_API void ffi_raw_to_ptrarray (ffi_cif *cif, ffi_raw *raw, void **args);
280
+ FFI_API size_t ffi_raw_size (ffi_cif *cif);
267
281
 
268
282
  /* This is analogous to the raw API, except it uses Java parameter
269
283
  packing, even on 64-bit machines. I.e. on 64-bit machines longs
270
284
  and doubles are followed by an empty 64-bit word. */
271
285
 
286
+ FFI_API
272
287
  void ffi_java_raw_call (ffi_cif *cif,
273
288
  void (*fn)(void),
274
289
  void *rvalue,
275
290
  ffi_java_raw *avalue);
276
291
 
292
+ FFI_API
277
293
  void ffi_java_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_java_raw *raw);
294
+ FFI_API
278
295
  void ffi_java_raw_to_ptrarray (ffi_cif *cif, ffi_java_raw *raw, void **args);
296
+ FFI_API
279
297
  size_t ffi_java_raw_size (ffi_cif *cif);
280
298
 
281
299
  /* ---- Definitions for closures ----------------------------------------- */
@@ -307,10 +325,10 @@ typedef struct {
307
325
  # endif
308
326
  #endif
309
327
 
310
- void *ffi_closure_alloc (size_t size, void **code);
311
- void ffi_closure_free (void *);
328
+ FFI_API void *ffi_closure_alloc (size_t size, void **code);
329
+ FFI_API void ffi_closure_free (void *);
312
330
 
313
- ffi_status
331
+ FFI_API ffi_status
314
332
  ffi_prep_closure (ffi_closure*,
315
333
  ffi_cif *,
316
334
  void (*fun)(ffi_cif*,void*,void**,void*),
@@ -322,7 +340,7 @@ ffi_prep_closure (ffi_closure*,
322
340
  #endif
323
341
  ;
324
342
 
325
- ffi_status
343
+ FFI_API ffi_status
326
344
  ffi_prep_closure_loc (ffi_closure*,
327
345
  ffi_cif *,
328
346
  void (*fun)(ffi_cif*,void*,void**,void*),
@@ -383,26 +401,26 @@ typedef struct {
383
401
 
384
402
  } ffi_java_raw_closure;
385
403
 
386
- ffi_status
404
+ FFI_API ffi_status
387
405
  ffi_prep_raw_closure (ffi_raw_closure*,
388
406
  ffi_cif *cif,
389
407
  void (*fun)(ffi_cif*,void*,ffi_raw*,void*),
390
408
  void *user_data);
391
409
 
392
- ffi_status
410
+ FFI_API ffi_status
393
411
  ffi_prep_raw_closure_loc (ffi_raw_closure*,
394
412
  ffi_cif *cif,
395
413
  void (*fun)(ffi_cif*,void*,ffi_raw*,void*),
396
414
  void *user_data,
397
415
  void *codeloc);
398
416
 
399
- ffi_status
417
+ FFI_API ffi_status
400
418
  ffi_prep_java_raw_closure (ffi_java_raw_closure*,
401
419
  ffi_cif *cif,
402
420
  void (*fun)(ffi_cif*,void*,ffi_java_raw*,void*),
403
421
  void *user_data);
404
422
 
405
- ffi_status
423
+ FFI_API ffi_status
406
424
  ffi_prep_java_raw_closure_loc (ffi_java_raw_closure*,
407
425
  ffi_cif *cif,
408
426
  void (*fun)(ffi_cif*,void*,ffi_java_raw*,void*),
@@ -419,22 +437,24 @@ typedef struct {
419
437
  void (*fun)(ffi_cif*,void*,void**,void*);
420
438
  } ffi_go_closure;
421
439
 
422
- ffi_status ffi_prep_go_closure (ffi_go_closure*, ffi_cif *,
440
+ FFI_API ffi_status ffi_prep_go_closure (ffi_go_closure*, ffi_cif *,
423
441
  void (*fun)(ffi_cif*,void*,void**,void*));
424
442
 
425
- void ffi_call_go (ffi_cif *cif, void (*fn)(void), void *rvalue,
443
+ FFI_API void ffi_call_go (ffi_cif *cif, void (*fn)(void), void *rvalue,
426
444
  void **avalue, void *closure);
427
445
 
428
446
  #endif /* FFI_GO_CLOSURES */
429
447
 
430
448
  /* ---- Public interface definition -------------------------------------- */
431
449
 
450
+ FFI_API
432
451
  ffi_status ffi_prep_cif(ffi_cif *cif,
433
452
  ffi_abi abi,
434
453
  unsigned int nargs,
435
454
  ffi_type *rtype,
436
455
  ffi_type **atypes);
437
456
 
457
+ FFI_API
438
458
  ffi_status ffi_prep_cif_var(ffi_cif *cif,
439
459
  ffi_abi abi,
440
460
  unsigned int nfixedargs,
@@ -442,11 +462,13 @@ ffi_status ffi_prep_cif_var(ffi_cif *cif,
442
462
  ffi_type *rtype,
443
463
  ffi_type **atypes);
444
464
 
465
+ FFI_API
445
466
  void ffi_call(ffi_cif *cif,
446
467
  void (*fn)(void),
447
468
  void *rvalue,
448
469
  void **avalue);
449
470
 
471
+ FFI_API
450
472
  ffi_status ffi_get_struct_offsets (ffi_abi abi, ffi_type *struct_type,
451
473
  size_t *offsets);
452
474
 
@@ -74,7 +74,9 @@ void ffi_type_test(ffi_type *a, char *file, int line);
74
74
  #define FFI_ASSERT_VALID_TYPE(x)
75
75
  #endif
76
76
 
77
+ /* v cast to size_t and aligned up to a multiple of a */
77
78
  #define FFI_ALIGN(v, a) (((((size_t) (v))-1) | ((a)-1))+1)
79
+ /* v cast to size_t and aligned down to a multiple of a */
78
80
  #define ALIGN_DOWN(v, a) (((size_t) (v)) & -a)
79
81
 
80
82
  /* Perform machine dependent cif processing */
@@ -1,5 +1,5 @@
1
1
  # ===========================================================================
2
- # http://www.gnu.org/software/autoconf-archive/ax_append_flag.html
2
+ # https://www.gnu.org/software/autoconf-archive/ax_append_flag.html
3
3
  # ===========================================================================
4
4
  #
5
5
  # SYNOPSIS
@@ -34,7 +34,7 @@
34
34
  # Public License for more details.
35
35
  #
36
36
  # You should have received a copy of the GNU General Public License along
37
- # with this program. If not, see <http://www.gnu.org/licenses/>.
37
+ # with this program. If not, see <https://www.gnu.org/licenses/>.
38
38
  #
39
39
  # As a special exception, the respective Autoconf Macro's copyright owner
40
40
  # gives unlimited permission to copy, distribute and modify the configure
@@ -49,21 +49,23 @@
49
49
  # modified version of the Autoconf Macro, you may extend this special
50
50
  # exception to the GPL to apply to your modified version as well.
51
51
 
52
- #serial 2
52
+ #serial 7
53
53
 
54
54
  AC_DEFUN([AX_APPEND_FLAG],
55
- [AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX
56
- AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])])dnl
57
- AS_VAR_SET_IF(FLAGS,
58
- [case " AS_VAR_GET(FLAGS) " in
59
- *" $1 "*)
60
- AC_RUN_LOG([: FLAGS already contains $1])
61
- ;;
62
- *)
63
- AC_RUN_LOG([: FLAGS="$FLAGS $1"])
64
- AS_VAR_SET(FLAGS, ["AS_VAR_GET(FLAGS) $1"])
65
- ;;
66
- esac],
67
- [AS_VAR_SET(FLAGS,["$1"])])
55
+ [dnl
56
+ AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_SET_IF
57
+ AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])])
58
+ AS_VAR_SET_IF(FLAGS,[
59
+ AS_CASE([" AS_VAR_GET(FLAGS) "],
60
+ [*" $1 "*], [AC_RUN_LOG([: FLAGS already contains $1])],
61
+ [
62
+ AS_VAR_APPEND(FLAGS,[" $1"])
63
+ AC_RUN_LOG([: FLAGS="$FLAGS"])
64
+ ])
65
+ ],
66
+ [
67
+ AS_VAR_SET(FLAGS,[$1])
68
+ AC_RUN_LOG([: FLAGS="$FLAGS"])
69
+ ])
68
70
  AS_VAR_POPDEF([FLAGS])dnl
69
71
  ])dnl AX_APPEND_FLAG
@@ -1,5 +1,5 @@
1
1
  # ===========================================================================
2
- # http://www.gnu.org/software/autoconf-archive/ax_cc_maxopt.html
2
+ # https://www.gnu.org/software/autoconf-archive/ax_cc_maxopt.html
3
3
  # ===========================================================================
4
4
  #
5
5
  # SYNOPSIS
@@ -40,7 +40,7 @@
40
40
  # Public License for more details.
41
41
  #
42
42
  # You should have received a copy of the GNU General Public License along
43
- # with this program. If not, see <http://www.gnu.org/licenses/>.
43
+ # with this program. If not, see <https://www.gnu.org/licenses/>.
44
44
  #
45
45
  # As a special exception, the respective Autoconf Macro's copyright owner
46
46
  # gives unlimited permission to copy, distribute and modify the configure
@@ -55,7 +55,7 @@
55
55
  # modified version of the Autoconf Macro, you may extend this special
56
56
  # exception to the GPL to apply to your modified version as well.
57
57
 
58
- #serial 13
58
+ #serial 17
59
59
 
60
60
  AC_DEFUN([AX_CC_MAXOPT],
61
61
  [
@@ -115,11 +115,19 @@ if test "$ac_test_CFLAGS" != "set"; then
115
115
  AX_GCC_X86_CPUID(0)
116
116
  AX_GCC_X86_CPUID(1)
117
117
  case $ax_cv_gcc_x86_cpuid_0 in # see AX_GCC_ARCHFLAG
118
- *:756e6547:*:*) # Intel
118
+ *:756e6547:6c65746e:49656e69) # Intel
119
119
  case $ax_cv_gcc_x86_cpuid_1 in
120
- *6a?:*[[234]]:*:*|*6[[789b]]?:*:*:*) icc_flags="-xK";;
121
- *f3[[347]]:*:*:*|*f4[1347]:*:*:*) icc_flags="-xP -xN -xW -xK";;
122
- *f??:*:*:*) icc_flags="-xN -xW -xK";;
120
+ *0?6[[78ab]]?:*:*:*|?6[[78ab]]?:*:*:*|6[[78ab]]?:*:*:*) icc_flags="-xK" ;;
121
+ *0?6[[9d]]?:*:*:*|?6[[9d]]?:*:*:*|6[[9d]]?:*:*:*|*1?65?:*:*:*) icc_flags="-xSSE2 -xB -xK" ;;
122
+ *0?6e?:*:*:*|?6e?:*:*:*|6e?:*:*:*) icc_flags="-xSSE3 -xP -xO -xB -xK" ;;
123
+ *0?6f?:*:*:*|?6f?:*:*:*|6f?:*:*:*|*1?66?:*:*:*) icc_flags="-xSSSE3 -xT -xB -xK" ;;
124
+ *1?6[[7d]]?:*:*:*) icc_flags="-xSSE4.1 -xS -xT -xB -xK" ;;
125
+ *1?6[[aef]]?:*:*:*|*2?6[[5cef]]?:*:*:*) icc_flags="-xSSE4.2 -xS -xT -xB -xK" ;;
126
+ *2?6[[ad]]?:*:*:*) icc_flags="-xAVX -SSE4.2 -xS -xT -xB -xK" ;;
127
+ *3?6[[ae]]?:*:*:*) icc_flags="-xCORE-AVX-I -xAVX -SSE4.2 -xS -xT -xB -xK" ;;
128
+ *3?6[[cf]]?:*:*:*|*4?6[[56]]?:*:*:*) icc_flags="-xCORE-AVX2 -xCORE-AVX-I -xAVX -SSE4.2 -xS -xT -xB -xK" ;;
129
+ *000?f[[346]]?:*:*:*|?f[[346]]?:*:*:*|f[[346]]?:*:*:*) icc_flags="-xSSE3 -xP -xO -xN -xW -xK" ;;
130
+ *00??f??:*:*:*|??f??:*:*:*|?f??:*:*:*|f??:*:*:*) icc_flags="-xSSE2 -xN -xW -xK" ;;
123
131
  esac ;;
124
132
  esac ;;
125
133
  esac
@@ -141,7 +149,7 @@ if test "$ac_test_CFLAGS" != "set"; then
141
149
  CFLAGS="-O3 -fomit-frame-pointer"
142
150
 
143
151
  # -malign-double for x86 systems
144
- # LIBFFI -- DON'T DO THIS - CHANGES ABI
152
+ # libffi local change -- don't align double, as it changes the ABI
145
153
  # AX_CHECK_COMPILE_FLAG(-malign-double, CFLAGS="$CFLAGS -malign-double")
146
154
 
147
155
  # -fstrict-aliasing for gcc-2.95+
@@ -153,6 +161,11 @@ if test "$ac_test_CFLAGS" != "set"; then
153
161
 
154
162
  AX_GCC_ARCHFLAG($acx_maxopt_portable)
155
163
  ;;
164
+
165
+ microsoft)
166
+ # default optimization flags for MSVC opt builds
167
+ CFLAGS="-O2"
168
+ ;;
156
169
  esac
157
170
 
158
171
  if test -z "$CFLAGS"; then
@@ -1,5 +1,5 @@
1
1
  # ===========================================================================
2
- # http://www.gnu.org/software/autoconf-archive/ax_cflags_warn_all.html
2
+ # https://www.gnu.org/software/autoconf-archive/ax_cflags_warn_all.html
3
3
  # ===========================================================================
4
4
  #
5
5
  # SYNOPSIS
@@ -43,7 +43,7 @@
43
43
  # Public License for more details.
44
44
  #
45
45
  # You should have received a copy of the GNU General Public License along
46
- # with this program. If not, see <http://www.gnu.org/licenses/>.
46
+ # with this program. If not, see <https://www.gnu.org/licenses/>.
47
47
  #
48
48
  # As a special exception, the respective Autoconf Macro's copyright owner
49
49
  # gives unlimited permission to copy, distribute and modify the configure
@@ -58,7 +58,7 @@
58
58
  # modified version of the Autoconf Macro, you may extend this special
59
59
  # exception to the GPL to apply to your modified version as well.
60
60
 
61
- #serial 14
61
+ #serial 16
62
62
 
63
63
  AC_DEFUN([AX_FLAGS_WARN_ALL],[dnl
64
64
  AS_VAR_PUSHDEF([FLAGS],[_AC_LANG_PREFIX[]FLAGS])dnl
@@ -84,7 +84,7 @@ done
84
84
  FLAGS="$ac_save_[]FLAGS"
85
85
  ])
86
86
  AS_VAR_POPDEF([FLAGS])dnl
87
- AC_REQUIRE([AX_APPEND_FLAG])
87
+ AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
88
88
  case ".$VAR" in
89
89
  .ok|.ok,*) m4_ifvaln($3,$3) ;;
90
90
  .|.no|.no,*) m4_default($4,[m4_ifval($2,[AX_APPEND_FLAG([$2], [$1])])]) ;;
@@ -1,10 +1,10 @@
1
1
  # ===========================================================================
2
- # http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
2
+ # https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
3
3
  # ===========================================================================
4
4
  #
5
5
  # SYNOPSIS
6
6
  #
7
- # AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS])
7
+ # AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
8
8
  #
9
9
  # DESCRIPTION
10
10
  #
@@ -19,6 +19,8 @@
19
19
  # the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
20
20
  # force the compiler to issue an error when a bad flag is given.
21
21
  #
22
+ # INPUT gives an alternative input source to AC_COMPILE_IFELSE.
23
+ #
22
24
  # NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
23
25
  # macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
24
26
  #
@@ -38,7 +40,7 @@
38
40
  # Public License for more details.
39
41
  #
40
42
  # You should have received a copy of the GNU General Public License along
41
- # with this program. If not, see <http://www.gnu.org/licenses/>.
43
+ # with this program. If not, see <https://www.gnu.org/licenses/>.
42
44
  #
43
45
  # As a special exception, the respective Autoconf Macro's copyright owner
44
46
  # gives unlimited permission to copy, distribute and modify the configure
@@ -53,19 +55,19 @@
53
55
  # modified version of the Autoconf Macro, you may extend this special
54
56
  # exception to the GPL to apply to your modified version as well.
55
57
 
56
- #serial 2
58
+ #serial 5
57
59
 
58
60
  AC_DEFUN([AX_CHECK_COMPILE_FLAG],
59
- [AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX
61
+ [AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
60
62
  AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
61
63
  AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
62
64
  ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
63
65
  _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
64
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
66
+ AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
65
67
  [AS_VAR_SET(CACHEVAR,[yes])],
66
68
  [AS_VAR_SET(CACHEVAR,[no])])
67
69
  _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
68
- AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes],
70
+ AS_VAR_IF(CACHEVAR,yes,
69
71
  [m4_default([$2], :)],
70
72
  [m4_default([$3], :)])
71
73
  AS_VAR_POPDEF([CACHEVAR])dnl