mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-30 17:25:21 +00:00
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
This commit is contained in:
@@ -1321,9 +1321,17 @@ if test "$llvm_cv_enable_libffi" = "yes" ; then
|
|||||||
AC_CHECK_HEADERS([ffi.h ffi/ffi.h])
|
AC_CHECK_HEADERS([ffi.h ffi/ffi.h])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl Try to find Darwin specific crash reporting library.
|
dnl Try to find Darwin specific crash reporting libraries.
|
||||||
AC_CHECK_HEADERS([CrashReporterClient.h])
|
AC_CHECK_HEADERS([CrashReporterClient.h])
|
||||||
|
|
||||||
|
dnl Try to find Darwin specific crash reporting global.
|
||||||
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([[const char *__crashreporter_info__;]], [[]])],[darwin_crashreport = yes],[darwin_crashreport = no])
|
||||||
|
AC_MSG_RESULT($darwin_crashreport)
|
||||||
|
if test "x$darwin_crashreport = xyes"
|
||||||
|
then
|
||||||
|
AC_DEFINE([HAVE_CRASHREPORTER_INFO],[1],
|
||||||
|
[Define if __crashreporter_info__ exists.])
|
||||||
|
fi
|
||||||
dnl===-----------------------------------------------------------------------===
|
dnl===-----------------------------------------------------------------------===
|
||||||
dnl===
|
dnl===
|
||||||
dnl=== SECTION 7: Check for types and structures
|
dnl=== SECTION 7: Check for types and structures
|
||||||
|
75
configure
vendored
75
configure
vendored
@@ -773,12 +773,12 @@ HAVE_PTHREAD
|
|||||||
HUGE_VAL_SANITY
|
HUGE_VAL_SANITY
|
||||||
MMAP_FILE
|
MMAP_FILE
|
||||||
LLVMCC_EMITIR_FLAG
|
LLVMCC_EMITIR_FLAG
|
||||||
LLVMCC_DISABLEOPT_FLAGS
|
|
||||||
LLVMCC1
|
LLVMCC1
|
||||||
LLVMCC1PLUS
|
LLVMCC1PLUS
|
||||||
LLVMGCCDIR
|
LLVMGCCDIR
|
||||||
LLVMGCC_LANGS
|
LLVMGCC_LANGS
|
||||||
LLVMGCC_DRAGONEGG
|
LLVMGCC_DRAGONEGG
|
||||||
|
LLVMCC_DISABLEOPT_FLAGS
|
||||||
SHLIBEXT
|
SHLIBEXT
|
||||||
SHLIBPATH_VAR
|
SHLIBPATH_VAR
|
||||||
LLVM_PREFIX
|
LLVM_PREFIX
|
||||||
@@ -11518,7 +11518,7 @@ else
|
|||||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||||
lt_status=$lt_dlunknown
|
lt_status=$lt_dlunknown
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 11525 "configure"
|
#line 11521 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#if HAVE_DLFCN_H
|
#if HAVE_DLFCN_H
|
||||||
@@ -17419,6 +17419,75 @@ fi
|
|||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
cat >conftest.$ac_ext <<_ACEOF
|
||||||
|
/* confdefs.h. */
|
||||||
|
_ACEOF
|
||||||
|
cat confdefs.h >>conftest.$ac_ext
|
||||||
|
cat >>conftest.$ac_ext <<_ACEOF
|
||||||
|
/* end confdefs.h. */
|
||||||
|
const char *__crashreporter_info__;
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
_ACEOF
|
||||||
|
rm -f conftest.$ac_objext conftest$ac_exeext
|
||||||
|
if { (ac_try="$ac_link"
|
||||||
|
case "(($ac_try" in
|
||||||
|
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||||
|
*) ac_try_echo=$ac_try;;
|
||||||
|
esac
|
||||||
|
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
||||||
|
(eval "$ac_link") 2>conftest.er1
|
||||||
|
ac_status=$?
|
||||||
|
grep -v '^ *+' conftest.er1 >conftest.err
|
||||||
|
rm -f conftest.er1
|
||||||
|
cat conftest.err >&5
|
||||||
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
|
(exit $ac_status); } &&
|
||||||
|
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||||
|
{ (case "(($ac_try" in
|
||||||
|
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||||
|
*) ac_try_echo=$ac_try;;
|
||||||
|
esac
|
||||||
|
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
||||||
|
(eval "$ac_try") 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
|
(exit $ac_status); }; } &&
|
||||||
|
{ ac_try='test -s conftest$ac_exeext'
|
||||||
|
{ (case "(($ac_try" in
|
||||||
|
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||||
|
*) ac_try_echo=$ac_try;;
|
||||||
|
esac
|
||||||
|
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
||||||
|
(eval "$ac_try") 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
|
(exit $ac_status); }; }; then
|
||||||
|
darwin_crashreport = yes
|
||||||
|
else
|
||||||
|
echo "$as_me: failed program was:" >&5
|
||||||
|
sed 's/^/| /' conftest.$ac_ext >&5
|
||||||
|
|
||||||
|
darwin_crashreport = no
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
|
{ echo "$as_me:$LINENO: result: $darwin_crashreport" >&5
|
||||||
|
echo "${ECHO_T}$darwin_crashreport" >&6; }
|
||||||
|
if test "x$darwin_crashreport = xyes"
|
||||||
|
then
|
||||||
|
|
||||||
|
cat >>confdefs.h <<\_ACEOF
|
||||||
|
#define HAVE_CRASHREPORTER_INFO 1
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -21839,12 +21908,12 @@ HAVE_PTHREAD!$HAVE_PTHREAD$ac_delim
|
|||||||
HUGE_VAL_SANITY!$HUGE_VAL_SANITY$ac_delim
|
HUGE_VAL_SANITY!$HUGE_VAL_SANITY$ac_delim
|
||||||
MMAP_FILE!$MMAP_FILE$ac_delim
|
MMAP_FILE!$MMAP_FILE$ac_delim
|
||||||
LLVMCC_EMITIR_FLAG!$LLVMCC_EMITIR_FLAG$ac_delim
|
LLVMCC_EMITIR_FLAG!$LLVMCC_EMITIR_FLAG$ac_delim
|
||||||
LLVMCC_DISABLEOPT_FLAGS!$LLVMCC_DISABLEOPT_FLAGS$ac_delim
|
|
||||||
LLVMCC1!$LLVMCC1$ac_delim
|
LLVMCC1!$LLVMCC1$ac_delim
|
||||||
LLVMCC1PLUS!$LLVMCC1PLUS$ac_delim
|
LLVMCC1PLUS!$LLVMCC1PLUS$ac_delim
|
||||||
LLVMGCCDIR!$LLVMGCCDIR$ac_delim
|
LLVMGCCDIR!$LLVMGCCDIR$ac_delim
|
||||||
LLVMGCC_LANGS!$LLVMGCC_LANGS$ac_delim
|
LLVMGCC_LANGS!$LLVMGCC_LANGS$ac_delim
|
||||||
LLVMGCC_DRAGONEGG!$LLVMGCC_DRAGONEGG$ac_delim
|
LLVMGCC_DRAGONEGG!$LLVMGCC_DRAGONEGG$ac_delim
|
||||||
|
LLVMCC_DISABLEOPT_FLAGS!$LLVMCC_DISABLEOPT_FLAGS$ac_delim
|
||||||
SHLIBEXT!$SHLIBEXT$ac_delim
|
SHLIBEXT!$SHLIBEXT$ac_delim
|
||||||
SHLIBPATH_VAR!$SHLIBPATH_VAR$ac_delim
|
SHLIBPATH_VAR!$SHLIBPATH_VAR$ac_delim
|
||||||
LLVM_PREFIX!$LLVM_PREFIX$ac_delim
|
LLVM_PREFIX!$LLVM_PREFIX$ac_delim
|
||||||
|
@@ -72,6 +72,9 @@
|
|||||||
/* Define to 1 if you have the <CrashReporterClient.h> header file. */
|
/* Define to 1 if you have the <CrashReporterClient.h> header file. */
|
||||||
#undef HAVE_CRASHREPORTERCLIENT_H
|
#undef HAVE_CRASHREPORTERCLIENT_H
|
||||||
|
|
||||||
|
/* Define if __crashreporter_info__ exists. */
|
||||||
|
#undef HAVE_CRASHREPORTER_INFO
|
||||||
|
|
||||||
/* Define to 1 if you have the <ctype.h> header file. */
|
/* Define to 1 if you have the <ctype.h> header file. */
|
||||||
#undef HAVE_CTYPE_H
|
#undef HAVE_CTYPE_H
|
||||||
|
|
||||||
|
@@ -55,7 +55,7 @@ static void PrintCurStackTrace(raw_ostream &OS) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Integrate with crash reporter libraries.
|
// Integrate with crash reporter libraries.
|
||||||
#if defined (__APPLE__) && defined (HAVE_CRASHREPORTERCLIENT_H)
|
#if defined (__APPLE__) && HAVE_CRASHREPORTERCLIENT_H
|
||||||
// If any clients of llvm try to link to libCrashReporterClient.a themselves,
|
// If any clients of llvm try to link to libCrashReporterClient.a themselves,
|
||||||
// only one crash info struct will be used.
|
// only one crash info struct will be used.
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@@ -64,7 +64,7 @@ struct crashreporter_annotations_t gCRAnnotations
|
|||||||
__attribute__((section("__DATA," CRASHREPORTER_ANNOTATIONS_SECTION)))
|
__attribute__((section("__DATA," CRASHREPORTER_ANNOTATIONS_SECTION)))
|
||||||
= { CRASHREPORTER_ANNOTATIONS_VERSION, 0, 0, 0, 0 };
|
= { CRASHREPORTER_ANNOTATIONS_VERSION, 0, 0, 0, 0 };
|
||||||
}
|
}
|
||||||
#elif defined (__APPLE__)
|
#elif defined (__APPLE__) && HAVE_CRASHREPORTER_INFO
|
||||||
static const char *__crashreporter_info__ = 0;
|
static const char *__crashreporter_info__ = 0;
|
||||||
asm(".desc ___crashreporter_info__, 0x10");
|
asm(".desc ___crashreporter_info__, 0x10");
|
||||||
#endif
|
#endif
|
||||||
@@ -86,11 +86,11 @@ static void CrashHandler(void *) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!TmpStr.empty()) {
|
if (!TmpStr.empty()) {
|
||||||
#ifndef HAVE_CRASHREPORTERCLIENT_H
|
#ifdef HAVE_CRASHREPORTERCLIENT_H
|
||||||
__crashreporter_info__ = strdup(std::string(TmpStr.str()).c_str());
|
|
||||||
#else
|
|
||||||
// Cast to void to avoid warning.
|
// Cast to void to avoid warning.
|
||||||
(void)CRSetCrashLogMessage(std::string(TmpStr.str()).c_str());
|
(void)CRSetCrashLogMessage(std::string(TmpStr.str()).c_str());
|
||||||
|
#elif HAVE_CRASHREPORTER_INFO
|
||||||
|
__crashreporter_info__ = strdup(std::string(TmpStr.str()).c_str());
|
||||||
#endif
|
#endif
|
||||||
errs() << TmpStr.str();
|
errs() << TmpStr.str();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user