llvm.org GIT mirror llvm / 481d402
Apparently OS X 10.4 doesn't have __crashreporter_info__. Try to fix building on the wayback machine. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120801 91177308-0d34-0410-b5e6-96231b3b80d8 Eric Christopher 8 years ago
4 changed file(s) with 89 addition(s) and 9 deletion(s). Raw diff Collapse all Expand all
13201320 AC_CHECK_HEADERS([ffi.h ffi/ffi.h])
13211321 fi
13221322
1323 dnl Try to find Darwin specific crash reporting library.
1323 dnl Try to find Darwin specific crash reporting libraries.
13241324 AC_CHECK_HEADERS([CrashReporterClient.h])
13251325
1326 dnl Try to find Darwin specific crash reporting global.
1327 AC_LINK_IFELSE([AC_LANG_PROGRAM([[const char *__crashreporter_info__;]], [[]])],[darwin_crashreport = yes],[darwin_crashreport = no])
1328 AC_MSG_RESULT($darwin_crashreport)
1329 if test "x$darwin_crashreport = xyes"
1330 then
1331 AC_DEFINE([HAVE_CRASHREPORTER_INFO],[1],
1332 [Define if __crashreporter_info__ exists.])
1333 fi
13261334 dnl===-----------------------------------------------------------------------===
13271335 dnl===
13281336 dnl=== SECTION 7: Check for types and structures
772772 HUGE_VAL_SANITY
773773 MMAP_FILE
774774 LLVMCC_EMITIR_FLAG
775 LLVMCC_DISABLEOPT_FLAGS
776775 LLVMCC1
777776 LLVMCC1PLUS
778777 LLVMGCCDIR
779778 LLVMGCC_LANGS
780779 LLVMGCC_DRAGONEGG
780 LLVMCC_DISABLEOPT_FLAGS
781781 SHLIBEXT
782782 SHLIBPATH_VAR
783783 LLVM_PREFIX
1151711517 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1151811518 lt_status=$lt_dlunknown
1151911519 cat > conftest.$ac_ext <
11520 #line 11525 "configure"
11520 #line 11521 "configure"
1152111521 #include "confdefs.h"
1152211522
1152311523 #if HAVE_DLFCN_H
1741817418 done
1741917419
1742017420
17421 cat >conftest.$ac_ext <<_ACEOF
17422 /* confdefs.h. */
17423 _ACEOF
17424 cat confdefs.h >>conftest.$ac_ext
17425 cat >>conftest.$ac_ext <<_ACEOF
17426 /* end confdefs.h. */
17427 const char *__crashreporter_info__;
17428 int
17429 main ()
17430 {
17431
17432 ;
17433 return 0;
17434 }
17435 _ACEOF
17436 rm -f conftest.$ac_objext conftest$ac_exeext
17437 if { (ac_try="$ac_link"
17438 case "(($ac_try" in
17439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17440 *) ac_try_echo=$ac_try;;
17441 esac
17442 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17443 (eval "$ac_link") 2>conftest.er1
17444 ac_status=$?
17445 grep -v '^ *+' conftest.er1 >conftest.err
17446 rm -f conftest.er1
17447 cat conftest.err >&5
17448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17449 (exit $ac_status); } &&
17450 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17451 { (case "(($ac_try" in
17452 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17453 *) ac_try_echo=$ac_try;;
17454 esac
17455 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17456 (eval "$ac_try") 2>&5
17457 ac_status=$?
17458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17459 (exit $ac_status); }; } &&
17460 { ac_try='test -s conftest$ac_exeext'
17461 { (case "(($ac_try" in
17462 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17463 *) ac_try_echo=$ac_try;;
17464 esac
17465 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17466 (eval "$ac_try") 2>&5
17467 ac_status=$?
17468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17469 (exit $ac_status); }; }; then
17470 darwin_crashreport = yes
17471 else
17472 echo "$as_me: failed program was:" >&5
17473 sed 's/^/| /' conftest.$ac_ext >&5
17474
17475 darwin_crashreport = no
17476 fi
17477
17478 rm -f core conftest.err conftest.$ac_objext \
17479 conftest$ac_exeext conftest.$ac_ext
17480 { echo "$as_me:$LINENO: result: $darwin_crashreport" >&5
17481 echo "${ECHO_T}$darwin_crashreport" >&6; }
17482 if test "x$darwin_crashreport = xyes"
17483 then
17484
17485 cat >>confdefs.h <<\_ACEOF
17486 #define HAVE_CRASHREPORTER_INFO 1
17487 _ACEOF
17488
17489 fi
1742117490
1742217491
1742317492
2183821907 HUGE_VAL_SANITY!$HUGE_VAL_SANITY$ac_delim
2183921908 MMAP_FILE!$MMAP_FILE$ac_delim
2184021909 LLVMCC_EMITIR_FLAG!$LLVMCC_EMITIR_FLAG$ac_delim
21841 LLVMCC_DISABLEOPT_FLAGS!$LLVMCC_DISABLEOPT_FLAGS$ac_delim
2184221910 LLVMCC1!$LLVMCC1$ac_delim
2184321911 LLVMCC1PLUS!$LLVMCC1PLUS$ac_delim
2184421912 LLVMGCCDIR!$LLVMGCCDIR$ac_delim
2184521913 LLVMGCC_LANGS!$LLVMGCC_LANGS$ac_delim
2184621914 LLVMGCC_DRAGONEGG!$LLVMGCC_DRAGONEGG$ac_delim
21915 LLVMCC_DISABLEOPT_FLAGS!$LLVMCC_DISABLEOPT_FLAGS$ac_delim
2184721916 SHLIBEXT!$SHLIBEXT$ac_delim
2184821917 SHLIBPATH_VAR!$SHLIBPATH_VAR$ac_delim
2184921918 LLVM_PREFIX!$LLVM_PREFIX$ac_delim
7070
7171 /* Define to 1 if you have the header file. */
7272 #undef HAVE_CRASHREPORTERCLIENT_H
73
74 /* Define if __crashreporter_info__ exists. */
75 #undef HAVE_CRASHREPORTER_INFO
7376
7477 /* Define to 1 if you have the header file. */
7578 #undef HAVE_CTYPE_H
5454 }
5555
5656 // Integrate with crash reporter libraries.
57 #if defined (__APPLE__) && defined (HAVE_CRASHREPORTERCLIENT_H)
57 #if defined (__APPLE__) && HAVE_CRASHREPORTERCLIENT_H
5858 // If any clients of llvm try to link to libCrashReporterClient.a themselves,
5959 // only one crash info struct will be used.
6060 extern "C" {
6363 __attribute__((section("__DATA," CRASHREPORTER_ANNOTATIONS_SECTION)))
6464 = { CRASHREPORTER_ANNOTATIONS_VERSION, 0, 0, 0, 0 };
6565 }
66 #elif defined (__APPLE__)
66 #elif defined (__APPLE__) && HAVE_CRASHREPORTER_INFO
6767 static const char *__crashreporter_info__ = 0;
6868 asm(".desc ___crashreporter_info__, 0x10");
6969 #endif
8585 }
8686
8787 if (!TmpStr.empty()) {
88 #ifndef HAVE_CRASHREPORTERCLIENT_H
89 __crashreporter_info__ = strdup(std::string(TmpStr.str()).c_str());
90 #else
88 #ifdef HAVE_CRASHREPORTERCLIENT_H
9189 // Cast to void to avoid warning.
9290 (void)CRSetCrashLogMessage(std::string(TmpStr.str()).c_str());
91 #elif HAVE_CRASHREPORTER_INFO
92 __crashreporter_info__ = strdup(std::string(TmpStr.str()).c_str());
9393 #endif
9494 errs() << TmpStr.str();
9595 }