Fix warning and msvcc patches
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756
diff --git a/.pc/msvcc/.timestamp b/.pc/msvcc/.timestamp
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/.pc/msvcc/.timestamp
diff --git a/README b/README
index 168c7f1..4f524b9 100644
--- a/README
+++ b/README
@@ -145,15 +145,18 @@ History
See the ChangeLog files for details.
3.0.10 ???-??-??
- Add support for Apple's iOS.
+
+ Add support for Apple's iOS, 64-bit PowerPC OSX, IBM's OS/2,
+ and more. See table for details.
+ Add support for native vendor compilers for AIX, IRIX, Solaris
+ and Windows.
Add support for ARM VFP ABI.
Add RTEMS support for MIPS and M68K.
Fix the N64 build on mips-sgi-irix6.5.
- Enable builds with Microsoft's compiler.
- Enable x86 builds with Oracle's Solaris compiler.
+ Remove debugging code from non-debug build.
Fix support for calling code compiled with Oracle's Sparc
- Solaris compiler.
- Testsuite fixes for Tru64 Unix.
+ Solaris compiler from a GCC compiled libffi.
+ Many minor bug and testsuite fixes.
3.0.9 Dec-31-09
Add AVR32 and win64 ports. Add ARM softfp support.
diff --git a/configure b/configure
index b8bb5e0..bf973bb 100755
--- a/configure
+++ b/configure
@@ -11950,69 +11950,6 @@ CC="$lt_save_CC"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGS for maximum warnings" >&5
-$as_echo_n "checking CFLAGS for maximum warnings... " >&6; }
-if ${ac_cv_cflags_warn_all+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_cv_cflags_warn_all="no, unknown"
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
- ac_save_CFLAGS="$CFLAGS"
-for ac_arg in "-pedantic % -Wall" "-xstrconst % -v" "-std1 % -verbose -w0 -warnprotos" "-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" "-ansi -ansiE % -fullwarn" "+ESlit % +w1" "-Xc % -pvctl,fullmsg" "-h conform % -h msglevel 2" #
-do CFLAGS="$ac_save_CFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_cflags_warn_all=`echo $ac_arg | sed -e 's,.*% *,,'` ; break
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-done
- CFLAGS="$ac_save_CFLAGS"
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags_warn_all" >&5
-$as_echo "$ac_cv_cflags_warn_all" >&6; }
-case ".$ac_cv_cflags_warn_all" in
- .ok|.ok,*) ;;
- .|.no|.no,*)
- ;;
- *)
- if echo " $CFLAGS " | grep " $ac_cv_cflags_warn_all " 2>&1 >/dev/null
- then { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS does contain \$ac_cv_cflags_warn_all"; } >&5
- (: CFLAGS does contain $ac_cv_cflags_warn_all) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- else { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$ac_cv_cflags_warn_all\""; } >&5
- (: CFLAGS="$CFLAGS $ac_cv_cflags_warn_all") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- CFLAGS="$CFLAGS $ac_cv_cflags_warn_all"
- fi
- ;;
-esac
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler vendor" >&5
$as_echo_n "checking for C compiler vendor... " >&6; }
@@ -12871,6 +12808,69 @@ fi
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGS for maximum warnings" >&5
+$as_echo_n "checking CFLAGS for maximum warnings... " >&6; }
+if ${ac_cv_cflags_warn_all+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_cflags_warn_all="no, unknown"
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ ac_save_CFLAGS="$CFLAGS"
+for ac_arg in "-pedantic % -Wall" "-xstrconst % -v" "-std1 % -verbose -w0 -warnprotos" "-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" "-ansi -ansiE % -fullwarn" "+ESlit % +w1" "-Xc % -pvctl,fullmsg" "-h conform % -h msglevel 2" #
+do CFLAGS="$ac_save_CFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_cflags_warn_all=`echo $ac_arg | sed -e 's,.*% *,,'` ; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+ CFLAGS="$ac_save_CFLAGS"
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags_warn_all" >&5
+$as_echo "$ac_cv_cflags_warn_all" >&6; }
+case ".$ac_cv_cflags_warn_all" in
+ .ok|.ok,*) ;;
+ .|.no|.no,*)
+ ;;
+ *)
+ if echo " $CFLAGS " | grep " $ac_cv_cflags_warn_all " 2>&1 >/dev/null
+ then { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS does contain \$ac_cv_cflags_warn_all"; } >&5
+ (: CFLAGS does contain $ac_cv_cflags_warn_all) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ else { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$ac_cv_cflags_warn_all\""; } >&5
+ (: CFLAGS="$CFLAGS $ac_cv_cflags_warn_all") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ CFLAGS="$CFLAGS $ac_cv_cflags_warn_all"
+ fi
+ ;;
+esac
+
if test "x$GCC" = "xyes"; then
CFLAGS="$CFLAGS -fexceptions"
fi
diff --git a/configure.ac b/configure.ac
index 05fb407..c93d941 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,8 +36,8 @@ AM_PROG_CC_C_O
AC_PROG_LIBTOOL
AC_CONFIG_MACRO_DIR([m4])
-AX_CFLAGS_WARN_ALL
AX_CC_MAXOPT
+AX_CFLAGS_WARN_ALL
if test "x$GCC" = "xyes"; then
CFLAGS="$CFLAGS -fexceptions"
fi
diff --git a/patches/msvcc b/patches/msvcc
new file mode 100644
index 0000000..e624506
--- /dev/null
+++ b/patches/msvcc
@@ -0,0 +1,28 @@
+Index: libffi/Makefile.am
+===================================================================
+--- libffi.orig/Makefile.am
++++ libffi/Makefile.am
+@@ -31,7 +31,8 @@ EXTRA_DIST = LICENSE ChangeLog.v1 Change
+ src/frv/ffitarget.h src/dlmalloc.c src/moxie/ffi.c \
+ src/moxie/eabi.S libtool-version ChangeLog.libffi \
+ m4/libtool.m4 m4/lt~obsolete.m4 m4/ltoptions.m4 m4/ltsugar.m4 \
+- m4/ltversion.m4 build-ios.sh src/arm/gentramp.sh src/debug.c
++ m4/ltversion.m4 build-ios.sh src/arm/gentramp.sh src/debug.c \
++ msvcc.sh
+
+ info_TEXINFOS = doc/libffi.texi
+
+Index: libffi/Makefile.in
+===================================================================
+--- libffi.orig/Makefile.in
++++ libffi/Makefile.in
+@@ -441,7 +441,8 @@ EXTRA_DIST = LICENSE ChangeLog.v1 Change
+ src/frv/ffitarget.h src/dlmalloc.c src/moxie/ffi.c \
+ src/moxie/eabi.S libtool-version ChangeLog.libffi \
+ m4/libtool.m4 m4/lt~obsolete.m4 m4/ltoptions.m4 m4/ltsugar.m4 \
+- m4/ltversion.m4 build-ios.sh src/arm/gentramp.sh src/debug.c
++ m4/ltversion.m4 build-ios.sh src/arm/gentramp.sh src/debug.c \
++ msvcc.sh
+
+ info_TEXINFOS = doc/libffi.texi
+
diff --git a/patches/ungccify b/patches/ungccify
index a5d21d3..fd988e3 100644
--- a/patches/ungccify
+++ b/patches/ungccify
@@ -275,11 +275,10 @@ Index: libffi/configure
if test x"${MISSING+set}" != xset; then
case $am_aux_dir in
*\ * | *\ *)
-@@ -11834,201 +11950,1126 @@ CC="$lt_save_CC"
+@@ -11835,205 +11951,1130 @@ CC="$lt_save_CC"
--
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
-$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
- # Check whether --enable-maintainer-mode was given.
@@ -294,9 +293,9 @@ Index: libffi/configure
- if test $USE_MAINTAINER_MODE = yes; then
- MAINTAINER_MODE_TRUE=
- MAINTAINER_MODE_FALSE='#'
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGS for maximum warnings" >&5
-+$as_echo_n "checking CFLAGS for maximum warnings... " >&6; }
-+if ${ac_cv_cflags_warn_all+:} false; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler vendor" >&5
++$as_echo_n "checking for C compiler vendor... " >&6; }
++if ${ax_cv_c_compiler_vendor+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- MAINTAINER_MODE_TRUE='#'
@@ -304,57 +303,53 @@ Index: libffi/configure
-fi
-
- MAINT=$MAINTAINER_MODE_TRUE
--
--
--
--for ac_header in sys/mman.h
--do :
-- ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
--if test "x$ac_cv_header_sys_mman_h" = xyes; then :
-- cat >>confdefs.h <<_ACEOF
--#define HAVE_SYS_MMAN_H 1
--_ACEOF
-+ ac_cv_cflags_warn_all="no, unknown"
-+ ac_ext=c
-+ac_cpp='$CPP $CPPFLAGS'
-+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-+ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
--fi
-+ ac_save_CFLAGS="$CFLAGS"
-+for ac_arg in "-pedantic % -Wall" "-xstrconst % -v" "-std1 % -verbose -w0 -warnprotos" "-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" "-ansi -ansiE % -fullwarn" "+ESlit % +w1" "-Xc % -pvctl,fullmsg" "-h conform % -h msglevel 2" #
-+do CFLAGS="$ac_save_CFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ ax_cv_c_compiler_vendor=unknown
++ # note: don't check for gcc first since some other compilers define __GNUC__
++ for ventest in intel:__ICC,__ECC,__INTEL_COMPILER ibm:__xlc__,__xlC__,__IBMC__,__IBMCPP__ pathscale:__PATHCC__,__PATHSCALE__ clang:__clang__ gnu:__GNUC__ sun:__SUNPRO_C,__SUNPRO_CC hp:__HP_cc,__HP_aCC dec:__DECC,__DECCXX,__DECC_VER,__DECCXX_VER borland:__BORLANDC__,__TURBOC__ comeau:__COMO__ cray:_CRAYC kai:__KCC lcc:__LCC__ metrowerks:__MWERKS__ sgi:__sgi,sgi microsoft:_MSC_VER watcom:__WATCOMC__ portland:__PGI; do
++ vencpp="defined("`echo $ventest | cut -d: -f2 | sed 's/,/) || defined(/g'`")"
++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
--done
+int
+main ()
+{
--for ac_func in mmap
++#if !($vencpp)
++ thisisanerror;
++#endif
+
+-for ac_header in sys/mman.h
-do :
-- ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
--if test "x$ac_cv_func_mmap" = xyes; then :
+- ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
+-if test "x$ac_cv_header_sys_mman_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
--#define HAVE_MMAP 1
+-#define HAVE_SYS_MMAN_H 1
+ ;
+ return 0;
+}
_ACEOF
-
+if ac_fn_c_try_compile "$LINENO"; then :
-+ ac_cv_cflags_warn_all=`echo $ac_arg | sed -e 's,.*% *,,'` ; break
++ ax_cv_c_compiler_vendor=`echo $ventest | cut -d: -f1`; break
fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- done
-+ CFLAGS="$ac_save_CFLAGS"
-+ ac_ext=c
-+ac_cpp='$CPP $CPPFLAGS'
-+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-+ac_compiler_gnu=$ac_cv_c_compiler_gnu
++ done
+
+-done
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_compiler_vendor" >&5
++$as_echo "$ax_cv_c_compiler_vendor" >&6; }
+
+-for ac_func in mmap
+-do :
+- ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
+-if test "x$ac_cv_func_mmap" = xyes; then :
+- cat >>confdefs.h <<_ACEOF
+-#define HAVE_MMAP 1
+-_ACEOF
+
+-fi
+-done
-ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
@@ -363,36 +358,18 @@ Index: libffi/configure
-else
- libffi_header_sys_mman_h=no
-fi
--
--
+
+
-ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
-if test "x$ac_cv_func_mmap" = xyes; then :
- libffi_func_mmap=yes
--else
++# Check whether --enable-portable-binary was given.
++if test "${enable_portable_binary+set}" = set; then :
++ enableval=$enable_portable_binary; acx_maxopt_portable=$withval
+ else
- libffi_func_mmap=no
++ acx_maxopt_portable=no
fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags_warn_all" >&5
-+$as_echo "$ac_cv_cflags_warn_all" >&6; }
-+case ".$ac_cv_cflags_warn_all" in
-+ .ok|.ok,*) ;;
-+ .|.no|.no,*)
-+ ;;
-+ *)
-+ if echo " $CFLAGS " | grep " $ac_cv_cflags_warn_all " 2>&1 >/dev/null
-+ then { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS does contain \$ac_cv_cflags_warn_all"; } >&5
-+ (: CFLAGS does contain $ac_cv_cflags_warn_all) 2>&5
-+ ac_status=$?
-+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+ test $ac_status = 0; }
-+ else { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$ac_cv_cflags_warn_all\""; } >&5
-+ (: CFLAGS="$CFLAGS $ac_cv_cflags_warn_all") 2>&5
-+ ac_status=$?
-+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+ test $ac_status = 0; }
-+ CFLAGS="$CFLAGS $ac_cv_cflags_warn_all"
-+ fi
-+ ;;
-+esac
-if test "$libffi_header_sys_mman_h" != yes \
- || test "$libffi_func_mmap" != yes; then
@@ -448,99 +425,9 @@ Index: libffi/configure
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANON(YMOUS)" >&5
-$as_echo_n "checking for MAP_ANON(YMOUS)... " >&6; }
-if ${ac_cv_decl_map_anon+:} false; then :
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler vendor" >&5
-+$as_echo_n "checking for C compiler vendor... " >&6; }
-+if ${ax_cv_c_compiler_vendor+:} false; then :
- $as_echo_n "(cached) " >&6
- else
-- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+ ax_cv_c_compiler_vendor=unknown
-+ # note: don't check for gcc first since some other compilers define __GNUC__
-+ for ventest in intel:__ICC,__ECC,__INTEL_COMPILER ibm:__xlc__,__xlC__,__IBMC__,__IBMCPP__ pathscale:__PATHCC__,__PATHSCALE__ clang:__clang__ gnu:__GNUC__ sun:__SUNPRO_C,__SUNPRO_CC hp:__HP_cc,__HP_aCC dec:__DECC,__DECCXX,__DECC_VER,__DECCXX_VER borland:__BORLANDC__,__TURBOC__ comeau:__COMO__ cray:_CRAYC kai:__KCC lcc:__LCC__ metrowerks:__MWERKS__ sgi:__sgi,sgi microsoft:_MSC_VER watcom:__WATCOMC__ portland:__PGI; do
-+ vencpp="defined("`echo $ventest | cut -d: -f2 | sed 's/,/) || defined(/g'`")"
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
--#include <sys/types.h>
--#include <sys/mman.h>
--#include <unistd.h>
--
--#ifndef MAP_ANONYMOUS
--#define MAP_ANONYMOUS MAP_ANON
--#endif
-
- int
- main ()
- {
--int n = MAP_ANONYMOUS;
-+
-+#if !($vencpp)
-+ thisisanerror;
-+#endif
-+
- ;
- return 0;
- }
- _ACEOF
- if ac_fn_c_try_compile "$LINENO"; then :
-- ac_cv_decl_map_anon=yes
--else
-- ac_cv_decl_map_anon=no
-+ ax_cv_c_compiler_vendor=`echo $ventest | cut -d: -f1`; break
- fi
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_decl_map_anon" >&5
--$as_echo "$ac_cv_decl_map_anon" >&6; }
-+ done
-
-- if test $ac_cv_decl_map_anon = no; then
-- ac_cv_func_mmap_anon=no
-- else
-- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mmap with MAP_ANON(YMOUS) works" >&5
--$as_echo_n "checking whether mmap with MAP_ANON(YMOUS) works... " >&6; }
--if ${ac_cv_func_mmap_anon+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-- # Add a system to this blacklist if it has mmap() and MAP_ANON or
-- # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
-- # doesn't give anonymous zeroed pages with the same properties listed
-- # above for use of /dev/zero.
-- # Systems known to be in this category are Windows, VMS, and SCO Unix.
-- case "$host_os" in
-- vms* | cygwin* | pe | mingw* | sco* | udk* )
-- ac_cv_func_mmap_anon=no ;;
-- *)
-- ac_cv_func_mmap_anon=yes;;
-- esac
--fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_anon" >&5
--$as_echo "$ac_cv_func_mmap_anon" >&6; }
-- fi
- fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_compiler_vendor" >&5
-+$as_echo "$ax_cv_c_compiler_vendor" >&6; }
-+
-
--if test $ac_cv_func_mmap_file = yes; then
-
--$as_echo "#define HAVE_MMAP_FILE 1" >>confdefs.h
-
--fi
--if test $ac_cv_func_mmap_dev_zero = yes; then
-
--$as_echo "#define HAVE_MMAP_DEV_ZERO 1" >>confdefs.h
-
-+# Check whether --enable-portable-binary was given.
-+if test "${enable_portable_binary+set}" = set; then :
-+ enableval=$enable_portable_binary; acx_maxopt_portable=$withval
-+else
-+ acx_maxopt_portable=no
- fi
--if test $ac_cv_func_mmap_anon = yes; then
-
--$as_echo "#define HAVE_MMAP_ANON 1" >>confdefs.h
-
--fi
+- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+# Try to determine "good" native compiler flags if none specified via CFLAGS
+if test "$ac_test_CFLAGS" != "set"; then
+ CFLAGS=""
@@ -570,27 +457,35 @@ Index: libffi/configure
+ax_save_FLAGS=$CFLAGS
+ CFLAGS="$xlc_opt"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-
-+int
-+main ()
-+{
+ /* end confdefs.h. */
+-#include <sys/types.h>
+-#include <sys/mman.h>
+-#include <unistd.h>
+-
+-#ifndef MAP_ANONYMOUS
+-#define MAP_ANONYMOUS MAP_ANON
+-#endif
-- if test -d $srcdir/testsuite; then
-- TESTSUBDIR_TRUE=
-- TESTSUBDIR_FALSE='#'
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+if ac_fn_c_try_compile "$LINENO"; then :
+ int
+ main ()
+ {
+-int n = MAP_ANONYMOUS;
++
+ ;
+ return 0;
+ }
+ _ACEOF
+ if ac_fn_c_try_compile "$LINENO"; then :
+- ac_cv_decl_map_anon=yes
+ eval `$as_echo "ax_cv_c_flags_$xlc_opt" | $as_tr_sh`=yes
else
-- TESTSUBDIR_TRUE='#'
-- TESTSUBDIR_FALSE=
+- ac_cv_decl_map_anon=no
+ eval `$as_echo "ax_cv_c_flags_$xlc_opt" | $as_tr_sh`=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-fi
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_decl_map_anon" >&5
+-$as_echo "$ac_cv_decl_map_anon" >&6; }
+ CFLAGS=$ax_save_FLAGS
+eval ax_check_compiler_flags=$`$as_echo "ax_cv_c_flags_$xlc_opt" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_compiler_flags" >&5
@@ -620,7 +515,13 @@ Index: libffi/configure
+ case $host_cpu in
+ i686*|x86_64*)
+ # icc accepts gcc assembly syntax, so these should work:
-+
+
+- if test $ac_cv_decl_map_anon = no; then
+- ac_cv_func_mmap_anon=no
+- else
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mmap with MAP_ANON(YMOUS) works" >&5
+-$as_echo_n "checking whether mmap with MAP_ANON(YMOUS) works... " >&6; }
+-if ${ac_cv_func_mmap_anon+:} false; then :
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -630,8 +531,26 @@ Index: libffi/configure
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86 cpuid 0 output" >&5
+$as_echo_n "checking for x86 cpuid 0 output... " >&6; }
+if ${ax_cv_gcc_x86_cpuid_0+:} false; then :
-+ $as_echo_n "(cached) " >&6
-+else
+ $as_echo_n "(cached) " >&6
+ else
+- # Add a system to this blacklist if it has mmap() and MAP_ANON or
+- # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
+- # doesn't give anonymous zeroed pages with the same properties listed
+- # above for use of /dev/zero.
+- # Systems known to be in this category are Windows, VMS, and SCO Unix.
+- case "$host_os" in
+- vms* | cygwin* | pe | mingw* | sco* | udk* )
+- ac_cv_func_mmap_anon=no ;;
+- *)
+- ac_cv_func_mmap_anon=yes;;
+- esac
+-fi
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_anon" >&5
+-$as_echo "$ac_cv_func_mmap_anon" >&6; }
+- fi
+-fi
+-
+-if test $ac_cv_func_mmap_file = yes; then
+ if test "$cross_compiling" = yes; then :
+ ax_cv_gcc_x86_cpuid_0=unknown
+else
@@ -641,7 +560,8 @@ Index: libffi/configure
+int
+main ()
+{
-+
+
+-$as_echo "#define HAVE_MMAP_FILE 1" >>confdefs.h
+ int op = 0, eax, ebx, ecx, edx;
+ FILE *f;
+ __asm__("cpuid"
@@ -651,7 +571,7 @@ Index: libffi/configure
+ fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx);
+ fclose(f);
+ return 0;
-+
+
+ ;
+ return 0;
+}
@@ -660,12 +580,19 @@ Index: libffi/configure
+ ax_cv_gcc_x86_cpuid_0=`cat conftest_cpuid`; rm -f conftest_cpuid
+else
+ ax_cv_gcc_x86_cpuid_0=unknown; rm -f conftest_cpuid
-+fi
+ fi
+-if test $ac_cv_func_mmap_dev_zero = yes; then
+-
+-$as_echo "#define HAVE_MMAP_DEV_ZERO 1" >>confdefs.h
+-
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
-+fi
-+
-+fi
+ fi
+-if test $ac_cv_func_mmap_anon = yes; then
+-
+-$as_echo "#define HAVE_MMAP_ANON 1" >>confdefs.h
+
+ fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_x86_cpuid_0" >&5
+$as_echo "$ax_cv_gcc_x86_cpuid_0" >&6; }
+ac_ext=c
@@ -673,15 +600,24 @@ Index: libffi/configure
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
-+
-+
-+
+
+
+- if test -d $srcdir/testsuite; then
+- TESTSUBDIR_TRUE=
+- TESTSUBDIR_FALSE='#'
+-else
+- TESTSUBDIR_TRUE='#'
+- TESTSUBDIR_FALSE=
+-fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
-+
+
+-TARGETDIR="unknown"
+-case "$host" in
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86 cpuid 1 output" >&5
+$as_echo_n "checking for x86 cpuid 1 output... " >&6; }
+if ${ax_cv_gcc_x86_cpuid_1+:} false; then :
@@ -1356,6 +1292,69 @@ Index: libffi/configure
+
+fi
+
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGS for maximum warnings" >&5
++$as_echo_n "checking CFLAGS for maximum warnings... " >&6; }
++if ${ac_cv_cflags_warn_all+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++ ac_cv_cflags_warn_all="no, unknown"
++ ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
++
++ ac_save_CFLAGS="$CFLAGS"
++for ac_arg in "-pedantic % -Wall" "-xstrconst % -v" "-std1 % -verbose -w0 -warnprotos" "-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" "-ansi -ansiE % -fullwarn" "+ESlit % +w1" "-Xc % -pvctl,fullmsg" "-h conform % -h msglevel 2" #
++do CFLAGS="$ac_save_CFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h. */
++
++int
++main ()
++{
++
++ ;
++ return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++ ac_cv_cflags_warn_all=`echo $ac_arg | sed -e 's,.*% *,,'` ; break
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++done
++ CFLAGS="$ac_save_CFLAGS"
++ ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
++
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags_warn_all" >&5
++$as_echo "$ac_cv_cflags_warn_all" >&6; }
++case ".$ac_cv_cflags_warn_all" in
++ .ok|.ok,*) ;;
++ .|.no|.no,*)
++ ;;
++ *)
++ if echo " $CFLAGS " | grep " $ac_cv_cflags_warn_all " 2>&1 >/dev/null
++ then { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS does contain \$ac_cv_cflags_warn_all"; } >&5
++ (: CFLAGS does contain $ac_cv_cflags_warn_all) 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }
++ else { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$ac_cv_cflags_warn_all\""; } >&5
++ (: CFLAGS="$CFLAGS $ac_cv_cflags_warn_all") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }
++ CFLAGS="$CFLAGS $ac_cv_cflags_warn_all"
++ fi
++ ;;
++esac
++
+if test "x$GCC" = "xyes"; then
+ CFLAGS="$CFLAGS -fexceptions"
+fi
@@ -1555,9 +1554,14 @@ Index: libffi/configure
+else
+ TESTSUBDIR_TRUE='#'
+ TESTSUBDIR_FALSE=
- fi
-
-
++fi
++
++
++TARGETDIR="unknown"
++case "$host" in
+ alpha*-*-*)
+ TARGET=ALPHA; TARGETDIR=alpha;
+ # Support 128-bit long double, changeable via command-line switch.
@@ -13282,13 +14323,30 @@ $as_echo "#define SYMBOL_UNDERSCORE 1" >
fi
fi
@@ -1791,8 +1795,8 @@ Index: libffi/configure.ac
AC_PROG_LIBTOOL
AC_CONFIG_MACRO_DIR([m4])
-+AX_CFLAGS_WARN_ALL
+AX_CC_MAXOPT
++AX_CFLAGS_WARN_ALL
+if test "x$GCC" = "xyes"; then
+ CFLAGS="$CFLAGS -fexceptions"
+fi