mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 18:24:23 +00:00
Haiku porting patches, Credit to Paul Davey.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83823 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -175,6 +175,11 @@ AC_CACHE_CHECK([type of operating system we're going to host on],
|
|||||||
llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
|
llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
|
||||||
llvm_cv_os_type="MingW"
|
llvm_cv_os_type="MingW"
|
||||||
llvm_cv_platform_type="Win32" ;;
|
llvm_cv_platform_type="Win32" ;;
|
||||||
|
*-*-haiku*)
|
||||||
|
llvm_cv_link_all_option="-Wl,--whole-archive"
|
||||||
|
llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
|
||||||
|
llvm_cv_os_type="Haiku"
|
||||||
|
llvm_cv_platform_type="Unix" ;;
|
||||||
*-unknown-eabi*)
|
*-unknown-eabi*)
|
||||||
llvm_cv_link_all_option="-Wl,--whole-archive"
|
llvm_cv_link_all_option="-Wl,--whole-archive"
|
||||||
llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
|
llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
|
||||||
@ -223,6 +228,8 @@ AC_CACHE_CHECK([type of operating system we're going to target],
|
|||||||
llvm_cv_target_os_type="Win32" ;;
|
llvm_cv_target_os_type="Win32" ;;
|
||||||
*-*-mingw*)
|
*-*-mingw*)
|
||||||
llvm_cv_target_os_type="MingW" ;;
|
llvm_cv_target_os_type="MingW" ;;
|
||||||
|
*-*-haiku*)
|
||||||
|
llvm_cv_target_os_type="Haiku" ;;
|
||||||
*-unknown-eabi*)
|
*-unknown-eabi*)
|
||||||
llvm_cv_target_os_type="Freestanding" ;;
|
llvm_cv_target_os_type="Freestanding" ;;
|
||||||
*)
|
*)
|
||||||
@ -960,7 +967,9 @@ AC_SEARCH_LIBS(mallinfo,malloc,AC_DEFINE([HAVE_MALLINFO],[1],
|
|||||||
dnl pthread locking functions are optional - but llvm will not be thread-safe
|
dnl pthread locking functions are optional - but llvm will not be thread-safe
|
||||||
dnl without locks.
|
dnl without locks.
|
||||||
if test "$ENABLE_THREADS" -eq 1 ; then
|
if test "$ENABLE_THREADS" -eq 1 ; then
|
||||||
AC_CHECK_LIB(pthread,pthread_mutex_init)
|
AC_SEARCH_LIBS(pthread_mutex_init,pthread,
|
||||||
|
AC_DEFINE([HAVE_PTHREAD],[1],
|
||||||
|
[Have pthread]))
|
||||||
AC_SEARCH_LIBS(pthread_mutex_lock,pthread,
|
AC_SEARCH_LIBS(pthread_mutex_lock,pthread,
|
||||||
AC_DEFINE([HAVE_PTHREAD_MUTEX_LOCK],[1],
|
AC_DEFINE([HAVE_PTHREAD_MUTEX_LOCK],[1],
|
||||||
[Have pthread_mutex_lock]))
|
[Have pthread_mutex_lock]))
|
||||||
|
@ -91,7 +91,7 @@ Process::GetTotalMemoryUsage()
|
|||||||
malloc_statistics_t Stats;
|
malloc_statistics_t Stats;
|
||||||
malloc_zone_statistics(malloc_default_zone(), &Stats);
|
malloc_zone_statistics(malloc_default_zone(), &Stats);
|
||||||
return Stats.size_allocated; // darwin
|
return Stats.size_allocated; // darwin
|
||||||
#elif defined(HAVE_GETRUSAGE)
|
#elif defined(HAVE_GETRUSAGE) && !defined(__HAIKU__)
|
||||||
struct rusage usage;
|
struct rusage usage;
|
||||||
::getrusage(RUSAGE_SELF, &usage);
|
::getrusage(RUSAGE_SELF, &usage);
|
||||||
return usage.ru_maxrss;
|
return usage.ru_maxrss;
|
||||||
|
@ -185,6 +185,8 @@
|
|||||||
#define GTEST_OS_ZOS
|
#define GTEST_OS_ZOS
|
||||||
#elif defined(__sun) && defined(__SVR4)
|
#elif defined(__sun) && defined(__SVR4)
|
||||||
#define GTEST_OS_SOLARIS
|
#define GTEST_OS_SOLARIS
|
||||||
|
#elif defined(__HAIKU__)
|
||||||
|
#define GTEST_OS_HAIKU
|
||||||
#endif // _MSC_VER
|
#endif // _MSC_VER
|
||||||
|
|
||||||
// Determines whether ::std::string and ::string are available.
|
// Determines whether ::std::string and ::string are available.
|
||||||
@ -225,7 +227,7 @@
|
|||||||
// TODO(wan@google.com): uses autoconf to detect whether ::std::wstring
|
// TODO(wan@google.com): uses autoconf to detect whether ::std::wstring
|
||||||
// is available.
|
// is available.
|
||||||
|
|
||||||
#if defined(GTEST_OS_CYGWIN) || defined(GTEST_OS_SOLARIS)
|
#if defined(GTEST_OS_CYGWIN) || defined(GTEST_OS_SOLARIS) || defined(GTEST_OS_HAIKU)
|
||||||
// At least some versions of cygwin don't support ::std::wstring.
|
// At least some versions of cygwin don't support ::std::wstring.
|
||||||
// Solaris' libc++ doesn't support it either.
|
// Solaris' libc++ doesn't support it either.
|
||||||
#define GTEST_HAS_STD_WSTRING 0
|
#define GTEST_HAS_STD_WSTRING 0
|
||||||
|
Reference in New Issue
Block a user