llvm.org GIT mirror llvm / d379c6b
[Cygming] Seek also chkstk_ms, or JIT fails with DLL builds. It is fixup for r227519. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227574 91177308-0d34-0410-b5e6-96231b3b80d8 NAKAMURA Takumi 4 years ago
6 changed file(s) with 192 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
17151715 AC_CHECK_LIB(gcc,_alloca,AC_DEFINE([HAVE__ALLOCA],[1],[Have host's _alloca]))
17161716 AC_CHECK_LIB(gcc,__alloca,AC_DEFINE([HAVE___ALLOCA],[1],[Have host's __alloca]))
17171717 AC_CHECK_LIB(gcc,__chkstk,AC_DEFINE([HAVE___CHKSTK],[1],[Have host's __chkstk]))
1718 AC_CHECK_LIB(gcc,__chkstk_ms,AC_DEFINE([HAVE___CHKSTK_MS],[1],[Have host's __chkstk_ms]))
17181719 AC_CHECK_LIB(gcc,___chkstk,AC_DEFINE([HAVE____CHKSTK],[1],[Have host's ___chkstk]))
1720 AC_CHECK_LIB(gcc,___chkstk_ms,AC_DEFINE([HAVE____CHKSTK_MS],[1],[Have host's ___chkstk_ms]))
17191721
17201722 AC_CHECK_LIB(gcc,__ashldi3,AC_DEFINE([HAVE___ASHLDI3],[1],[Have host's __ashldi3]))
17211723 AC_CHECK_LIB(gcc,__ashrdi3,AC_DEFINE([HAVE___ASHRDI3],[1],[Have host's __ashrdi3]))
200200 check_function_exists(_alloca HAVE__ALLOCA)
201201 check_function_exists(__alloca HAVE___ALLOCA)
202202 check_function_exists(__chkstk HAVE___CHKSTK)
203 check_function_exists(__chkstk_ms HAVE___CHKSTK_MS)
203204 check_function_exists(___chkstk HAVE____CHKSTK)
205 check_function_exists(___chkstk_ms HAVE____CHKSTK_MS)
204206
205207 check_function_exists(__ashldi3 HAVE___ASHLDI3)
206208 check_function_exists(__ashrdi3 HAVE___ASHRDI3)
1543915439
1544015440 fi
1544115441
15442 { echo "$as_me:$LINENO: checking for __chkstk_ms in -lgcc" >&5
15443 echo $ECHO_N "checking for __chkstk_ms in -lgcc... $ECHO_C" >&6; }
15444 if test "${ac_cv_lib_gcc___chkstk_ms+set}" = set; then
15445 echo $ECHO_N "(cached) $ECHO_C" >&6
15446 else
15447 ac_check_lib_save_LIBS=$LIBS
15448 LIBS="-lgcc $LIBS"
15449 cat >conftest.$ac_ext <<_ACEOF
15450 /* confdefs.h. */
15451 _ACEOF
15452 cat confdefs.h >>conftest.$ac_ext
15453 cat >>conftest.$ac_ext <<_ACEOF
15454 /* end confdefs.h. */
15455
15456 /* Override any GCC internal prototype to avoid an error.
15457 Use char because int might match the return type of a GCC
15458 builtin and then its argument prototype would still apply. */
15459 #ifdef __cplusplus
15460 extern "C"
15461 #endif
15462 char __chkstk_ms ();
15463 int
15464 main ()
15465 {
15466 return __chkstk_ms ();
15467 ;
15468 return 0;
15469 }
15470 _ACEOF
15471 rm -f conftest.$ac_objext conftest$ac_exeext
15472 if { (ac_try="$ac_link"
15473 case "(($ac_try" in
15474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15475 *) ac_try_echo=$ac_try;;
15476 esac
15477 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15478 (eval "$ac_link") 2>conftest.er1
15479 ac_status=$?
15480 grep -v '^ *+' conftest.er1 >conftest.err
15481 rm -f conftest.er1
15482 cat conftest.err >&5
15483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15484 (exit $ac_status); } &&
15485 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15486 { (case "(($ac_try" in
15487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15488 *) ac_try_echo=$ac_try;;
15489 esac
15490 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15491 (eval "$ac_try") 2>&5
15492 ac_status=$?
15493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15494 (exit $ac_status); }; } &&
15495 { ac_try='test -s conftest$ac_exeext'
15496 { (case "(($ac_try" in
15497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15498 *) ac_try_echo=$ac_try;;
15499 esac
15500 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15501 (eval "$ac_try") 2>&5
15502 ac_status=$?
15503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15504 (exit $ac_status); }; }; then
15505 ac_cv_lib_gcc___chkstk_ms=yes
15506 else
15507 echo "$as_me: failed program was:" >&5
15508 sed 's/^/| /' conftest.$ac_ext >&5
15509
15510 ac_cv_lib_gcc___chkstk_ms=no
15511 fi
15512
15513 rm -f core conftest.err conftest.$ac_objext \
15514 conftest$ac_exeext conftest.$ac_ext
15515 LIBS=$ac_check_lib_save_LIBS
15516 fi
15517 { echo "$as_me:$LINENO: result: $ac_cv_lib_gcc___chkstk_ms" >&5
15518 echo "${ECHO_T}$ac_cv_lib_gcc___chkstk_ms" >&6; }
15519 if test $ac_cv_lib_gcc___chkstk_ms = yes; then
15520
15521 cat >>confdefs.h <<\_ACEOF
15522 #define HAVE___CHKSTK_MS 1
15523 _ACEOF
15524
15525 fi
15526
1544215527 { echo "$as_me:$LINENO: checking for ___chkstk in -lgcc" >&5
1544315528 echo $ECHO_N "checking for ___chkstk in -lgcc... $ECHO_C" >&6; }
1544415529 if test "${ac_cv_lib_gcc____chkstk+set}" = set; then
1552015605
1552115606 cat >>confdefs.h <<\_ACEOF
1552215607 #define HAVE____CHKSTK 1
15608 _ACEOF
15609
15610 fi
15611
15612 { echo "$as_me:$LINENO: checking for ___chkstk_ms in -lgcc" >&5
15613 echo $ECHO_N "checking for ___chkstk_ms in -lgcc... $ECHO_C" >&6; }
15614 if test "${ac_cv_lib_gcc____chkstk_ms+set}" = set; then
15615 echo $ECHO_N "(cached) $ECHO_C" >&6
15616 else
15617 ac_check_lib_save_LIBS=$LIBS
15618 LIBS="-lgcc $LIBS"
15619 cat >conftest.$ac_ext <<_ACEOF
15620 /* confdefs.h. */
15621 _ACEOF
15622 cat confdefs.h >>conftest.$ac_ext
15623 cat >>conftest.$ac_ext <<_ACEOF
15624 /* end confdefs.h. */
15625
15626 /* Override any GCC internal prototype to avoid an error.
15627 Use char because int might match the return type of a GCC
15628 builtin and then its argument prototype would still apply. */
15629 #ifdef __cplusplus
15630 extern "C"
15631 #endif
15632 char ___chkstk_ms ();
15633 int
15634 main ()
15635 {
15636 return ___chkstk_ms ();
15637 ;
15638 return 0;
15639 }
15640 _ACEOF
15641 rm -f conftest.$ac_objext conftest$ac_exeext
15642 if { (ac_try="$ac_link"
15643 case "(($ac_try" in
15644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15645 *) ac_try_echo=$ac_try;;
15646 esac
15647 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15648 (eval "$ac_link") 2>conftest.er1
15649 ac_status=$?
15650 grep -v '^ *+' conftest.er1 >conftest.err
15651 rm -f conftest.er1
15652 cat conftest.err >&5
15653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15654 (exit $ac_status); } &&
15655 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15656 { (case "(($ac_try" in
15657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15658 *) ac_try_echo=$ac_try;;
15659 esac
15660 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15661 (eval "$ac_try") 2>&5
15662 ac_status=$?
15663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15664 (exit $ac_status); }; } &&
15665 { ac_try='test -s conftest$ac_exeext'
15666 { (case "(($ac_try" in
15667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15668 *) ac_try_echo=$ac_try;;
15669 esac
15670 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15671 (eval "$ac_try") 2>&5
15672 ac_status=$?
15673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15674 (exit $ac_status); }; }; then
15675 ac_cv_lib_gcc____chkstk_ms=yes
15676 else
15677 echo "$as_me: failed program was:" >&5
15678 sed 's/^/| /' conftest.$ac_ext >&5
15679
15680 ac_cv_lib_gcc____chkstk_ms=no
15681 fi
15682
15683 rm -f core conftest.err conftest.$ac_objext \
15684 conftest$ac_exeext conftest.$ac_ext
15685 LIBS=$ac_check_lib_save_LIBS
15686 fi
15687 { echo "$as_me:$LINENO: result: $ac_cv_lib_gcc____chkstk_ms" >&5
15688 echo "${ECHO_T}$ac_cv_lib_gcc____chkstk_ms" >&6; }
15689 if test $ac_cv_lib_gcc____chkstk_ms = yes; then
15690
15691 cat >>confdefs.h <<\_ACEOF
15692 #define HAVE____CHKSTK_MS 1
1552315693 _ACEOF
1552415694
1552515695 fi
425425 /* Have host's __chkstk */
426426 #cmakedefine HAVE___CHKSTK ${HAVE___CHKSTK}
427427
428 /* Have host's __chkstk_ms */
429 #cmakedefine HAVE___CHKSTK_MS ${HAVE___CHKSTK_MS}
430
428431 /* Have host's __cmpdi2 */
429432 #cmakedefine HAVE___CMPDI2 ${HAVE___CMPDI2}
430433
460463
461464 /* Have host's ___chkstk */
462465 #cmakedefine HAVE____CHKSTK ${HAVE____CHKSTK}
466
467 /* Have host's ___chkstk_ms */
468 #cmakedefine HAVE____CHKSTK_MS ${HAVE____CHKSTK_MS}
463469
464470 /* Define if we link Polly to the tools */
465471 #cmakedefine LINK_POLLY_INTO_TOOLS
419419 /* Have host's __chkstk */
420420 #undef HAVE___CHKSTK
421421
422 /* Have host's __chkstk_ms */
423 #undef HAVE___CHKSTK_MS
424
422425 /* Have host's __cmpdi2 */
423426 #undef HAVE___CMPDI2
424427
454457
455458 /* Have host's ___chkstk */
456459 #undef HAVE____CHKSTK
460
461 /* Have host's ___chkstk_ms */
462 #undef HAVE____CHKSTK_MS
457463
458464 /* Linker version detected at compile time. */
459465 #undef HOST_LINK_VERSION
99 #ifdef HAVE___CHKSTK
1010 EXPLICIT_SYMBOL(__chkstk)
1111 #endif
12 #ifdef HAVE___CHKSTK_MS
13 EXPLICIT_SYMBOL(__chkstk_ms)
14 #endif
1215 #ifdef HAVE____CHKSTK
1316 EXPLICIT_SYMBOL(___chkstk)
17 #endif
18 #ifdef HAVE____CHKSTK_MS
19 EXPLICIT_SYMBOL(___chkstk_ms)
1420 #endif
1521 #ifdef HAVE___MAIN
1622 EXPLICIT_SYMBOL(__main) // FIXME: Don't call it.