mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-14 07:40:07 +02:00
338 lines
14 KiB
Diff
338 lines
14 KiB
Diff
diff -Naur boost_1_50_0/boost/config/platform/haiku.hpp boost_1_50_0-haiku/boost/config/platform/haiku.hpp
|
||
--- boost_1_50_0/boost/config/platform/haiku.hpp 1970-01-01 01:00:00.000000000 +0100
|
||
+++ boost_1_50_0-haiku/boost/config/platform/haiku.hpp 2012-08-16 01:16:44.000000000 +0200
|
||
@@ -0,0 +1,27 @@
|
||
+// (C) Copyright John Maddock 2001.
|
||
+// Use, modification and distribution are subject to the
|
||
+// Boost Software License, Version 1.0. (See accompanying file
|
||
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||
+
|
||
+// See http://www.boost.org for most recent version.
|
||
+
|
||
+// Haiku specific config options:
|
||
+
|
||
+#define BOOST_PLATFORM "Haiku"
|
||
+
|
||
+#define BOOST_NO_INTRINSIC_WCHAR_T
|
||
+#define BOOST_HAS_UNISTD_H
|
||
+
|
||
+#define BOOST_HAS_BETHREADS
|
||
+
|
||
+#ifndef BOOST_DISABLE_THREADS
|
||
+# define BOOST_HAS_THREADS
|
||
+#endif
|
||
+
|
||
+//
|
||
+// thread API's not auto detected:
|
||
+//
|
||
+#define BOOST_HAS_GETTIMEOFDAY
|
||
+
|
||
+// boilerplate code:
|
||
+#include <boost/config/posix_features.hpp>
|
||
diff -Naur boost_1_50_0/boost/config/select_platform_config.hpp boost_1_50_0-haiku/boost/config/select_platform_config.hpp
|
||
--- boost_1_50_0/boost/config/select_platform_config.hpp 2011-10-10 13:50:55.047185920 +0200
|
||
+++ boost_1_50_0-haiku/boost/config/select_platform_config.hpp 2012-08-16 13:32:04.000000000 +0200
|
||
@@ -41,6 +41,10 @@
|
||
// win32:
|
||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/win32.hpp"
|
||
|
||
+#elif defined(__HAIKU__)
|
||
+// Haiku
|
||
+# define BOOST_PLATFORM_CONFIG "boost/config/platform/haiku.hpp"
|
||
+
|
||
#elif defined(__BEOS__)
|
||
// BeOS
|
||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/beos.hpp"
|
||
diff -Naur boost_1_50_0/boost/config/stdlib/libstdcpp3.hpp boost_1_50_0-haiku/boost/config/stdlib/libstdcpp3.hpp
|
||
--- boost_1_50_0/boost/config/stdlib/libstdcpp3.hpp 2012-05-15 13:57:21.047972352 +0200
|
||
+++ boost_1_50_0-haiku/boost/config/stdlib/libstdcpp3.hpp 2012-08-16 15:22:26.000000000 +0200
|
||
@@ -35,7 +35,8 @@
|
||
# if defined(_GLIBCXX_HAVE_GTHR_DEFAULT) \
|
||
|| defined(_GLIBCXX__PTHREADS) \
|
||
|| defined(_GLIBCXX_HAS_GTHREADS) \
|
||
- || defined(_WIN32)
|
||
+ || defined(_WIN32) \
|
||
+ || defined(__HAIKU__)
|
||
//
|
||
// If the std lib has thread support turned on, then turn it on in Boost
|
||
// as well. We do this because some gcc-3.4 std lib headers define _REENTANT
|
||
diff -Naur boost_1_50_0/boost/thread/detail/platform.hpp boost_1_50_0-haiku/boost/thread/detail/platform.hpp
|
||
--- boost_1_50_0/boost/thread/detail/platform.hpp 2012-05-22 19:03:15.043253760 +0200
|
||
+++ boost_1_50_0-haiku/boost/thread/detail/platform.hpp 2012-08-16 23:24:30.135266304 +0200
|
||
@@ -34,6 +34,8 @@
|
||
# define BOOST_THREAD_WIN32
|
||
#elif defined(__BEOS__)
|
||
# define BOOST_THREAD_BEOS
|
||
+#elif defined(__HAIKU__)
|
||
+# define BOOST_THREAD_BEOS
|
||
#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
|
||
# define BOOST_THREAD_MACOS
|
||
# define BOOST_THREAD_WAIT_BUG boost::posix_time::microseconds(1000)
|
||
diff -Naur boost_1_50_0/tools/build/v2/engine/boehm_gc/dyn_load.c boost_1_50_0-haiku/tools/build/v2/engine/boehm_gc/dyn_load.c
|
||
--- boost_1_50_0/tools/build/v2/engine/boehm_gc/dyn_load.c 2011-06-06 22:36:21.020185088 +0200
|
||
+++ boost_1_50_0-haiku/tools/build/v2/engine/boehm_gc/dyn_load.c 2012-08-16 13:10:40.000000000 +0200
|
||
@@ -64,7 +64,7 @@
|
||
!defined(AIX) && !defined(SCO_ELF) && !defined(DGUX) && \
|
||
!(defined(FREEBSD) && defined(__ELF__)) && \
|
||
!(defined(NETBSD) && defined(__ELF__)) && !defined(HURD) && \
|
||
- !defined(DARWIN) && !defined(CYGWIN32)
|
||
+ !defined(DARWIN) && !defined(CYGWIN32) !(defined(HAIKU)
|
||
--> We only know how to find data segments of dynamic libraries for the
|
||
--> above. Additional SVR4 variants might not be too
|
||
--> hard to add.
|
||
@@ -82,6 +82,10 @@
|
||
# define ELFSIZE ARCH_ELFSIZE
|
||
#endif
|
||
|
||
+#if defined(HAIKU)
|
||
+
|
||
+#endif
|
||
+
|
||
#if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \
|
||
(defined(FREEBSD) && defined(__ELF__)) || defined(DGUX) || \
|
||
(defined(NETBSD) && defined(__ELF__)) || defined(HURD)
|
||
@@ -216,7 +220,8 @@
|
||
|
||
#if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \
|
||
(defined(FREEBSD) && defined(__ELF__)) || defined(DGUX) || \
|
||
- (defined(NETBSD) && defined(__ELF__)) || defined(HURD)
|
||
+ (defined(NETBSD) && defined(__ELF__)) || defined(HURD) || \
|
||
+ defined(HAIKU)
|
||
|
||
|
||
#ifdef USE_PROC_FOR_LIBRARIES
|
||
diff -Naur boost_1_50_0/tools/build/v2/engine/boehm_gc/include/gc_config_macros.h boost_1_50_0-haiku/tools/build/v2/engine/boehm_gc/include/gc_config_macros.h
|
||
--- boost_1_50_0/tools/build/v2/engine/boehm_gc/include/gc_config_macros.h 2011-06-06 22:36:21.022282240 +0200
|
||
+++ boost_1_50_0-haiku/tools/build/v2/engine/boehm_gc/include/gc_config_macros.h 2012-08-16 13:17:27.000000000 +0200
|
||
@@ -45,7 +45,8 @@
|
||
|| defined(GC_AIX_THREADS) \
|
||
|| defined(GC_LINUX_THREADS) \
|
||
|| defined(GC_NETBSD_THREADS) \
|
||
- || defined(GC_GNU_THREADS))
|
||
+ || defined(GC_GNU_THREADS)) \
|
||
+ || defined(GC_HAIKU_THREADS)
|
||
# define _REENTRANT
|
||
/* Better late than never. This fails if system headers that */
|
||
/* depend on this were previously included. */
|
||
@@ -62,6 +63,7 @@
|
||
# if defined(GC_SOLARIS_THREADS) || defined(GC_FREEBSD_THREADS) || \
|
||
defined(GC_IRIX_THREADS) || defined(GC_LINUX_THREADS) || \
|
||
defined(GC_HPUX_THREADS) || defined(GC_OSF1_THREADS) || \
|
||
+ defined(GC_HAIKU_THREADS) || \
|
||
defined(GC_DGUX386_THREADS) || defined(GC_DARWIN_THREADS) || \
|
||
defined(GC_AIX_THREADS) || defined(GC_NETBSD_THREADS) || \
|
||
(defined(GC_WIN32_THREADS) && defined(__CYGWIN32__)) || \
|
||
diff -Naur boost_1_50_0/tools/build/v2/engine/boehm_gc/include/gc.h boost_1_50_0-haiku/tools/build/v2/engine/boehm_gc/include/gc.h
|
||
--- boost_1_50_0/tools/build/v2/engine/boehm_gc/include/gc.h 2011-06-06 22:36:21.022020096 +0200
|
||
+++ boost_1_50_0-haiku/tools/build/v2/engine/boehm_gc/include/gc.h 2012-08-16 13:12:51.000000000 +0200
|
||
@@ -494,7 +494,7 @@
|
||
/* of compilers. */
|
||
/* This may also be desirable if it is possible but expensive to */
|
||
/* retrieve the call chain. */
|
||
-#if (defined(__linux__) || defined(__NetBSD__) || defined(__OpenBSD__) \
|
||
+#if (defined(__linux__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__HAIKU__) \
|
||
|| defined(__FreeBSD__) || defined(__DragonFly__)) & !defined(GC_CAN_SAVE_CALL_STACKS)
|
||
# define GC_ADD_CALLER
|
||
# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
|
||
diff -Naur boost_1_50_0/tools/build/v2/engine/boehm_gc/include/private/gcconfig.h boost_1_50_0-haiku/tools/build/v2/engine/boehm_gc/include/private/gcconfig.h
|
||
--- boost_1_50_0/tools/build/v2/engine/boehm_gc/include/private/gcconfig.h 2011-06-06 22:36:21.024117248 +0200
|
||
+++ boost_1_50_0-haiku/tools/build/v2/engine/boehm_gc/include/private/gcconfig.h 2012-08-16 13:49:16.000000000 +0200
|
||
@@ -215,6 +215,11 @@
|
||
# define BEOS
|
||
# define mach_type_known
|
||
# endif
|
||
+# if defined(__HAIKU__) && defined(_X86_)
|
||
+# define I386
|
||
+# define HAIKU
|
||
+# define mach_type_known
|
||
+# endif
|
||
# if defined(LINUX) && (defined(i386) || defined(__i386__))
|
||
# define I386
|
||
# define mach_type_known
|
||
@@ -1014,6 +1019,13 @@
|
||
extern int etext[];
|
||
# define DATASTART ((ptr_t)((((word) (etext)) + 0xfff) & ~0xfff))
|
||
# endif
|
||
+# ifdef HAIKU
|
||
+# define OS_TYPE "HAIKU"
|
||
+# include <OS.h>
|
||
+# define GETPAGESIZE() B_PAGE_SIZE
|
||
+ extern int etext[];
|
||
+# define DATASTART ((ptr_t)((((word) (etext)) + 0xfff) & ~0xfff))
|
||
+# endif
|
||
# ifdef SOLARIS
|
||
# define OS_TYPE "SOLARIS"
|
||
extern int _etext[], _end[];
|
||
diff -Naur boost_1_50_0/tools/build/v2/engine/boehm_gc/os_dep.c boost_1_50_0-haiku/tools/build/v2/engine/boehm_gc/os_dep.c
|
||
--- boost_1_50_0/tools/build/v2/engine/boehm_gc/os_dep.c 2011-06-06 22:36:21.030408704 +0200
|
||
+++ boost_1_50_0-haiku/tools/build/v2/engine/boehm_gc/os_dep.c 2012-08-16 13:52:23.000000000 +0200
|
||
@@ -777,6 +777,16 @@
|
||
# endif /* BEOS */
|
||
|
||
|
||
+# ifdef HAIKU
|
||
+# include <OS.h>
|
||
+ptr_t GC_get_main_stack_base(void){
|
||
+ thread_info th;
|
||
+ get_thread_info(find_thread(NULL),&th);
|
||
+ return th.stack_end;
|
||
+}
|
||
+# endif /* HAIKU */
|
||
+
|
||
+
|
||
# ifdef OS2
|
||
|
||
ptr_t GC_get_main_stack_base(void)
|
||
@@ -1095,7 +1105,7 @@
|
||
|
||
#endif /* FREEBSD_STACKBOTTOM */
|
||
|
||
-#if !defined(BEOS) && !defined(AMIGA) && !defined(MSWIN32) \
|
||
+#if !defined(BEOS) && !defined(HAIKU) && !defined(AMIGA) && !defined(MSWIN32) \
|
||
&& !defined(MSWINCE) && !defined(OS2) && !defined(NOSYS) && !defined(ECOS) \
|
||
&& !defined(CYGWIN32)
|
||
|
||
@@ -1154,7 +1164,7 @@
|
||
# endif /* STACKBOTTOM */
|
||
}
|
||
|
||
-# endif /* ! AMIGA, !OS 2, ! MS Windows, !BEOS, !NOSYS, !ECOS */
|
||
+# endif /* ! AMIGA, !OS 2, ! MS Windows, !BEOS, !HAIKU, !NOSYS, !ECOS */
|
||
|
||
#if defined(GC_LINUX_THREADS) && !defined(HAVE_GET_STACK_BASE)
|
||
|
||
diff -Naur boost_1_50_0/tools/build/v2/engine/fileunix.c boost_1_50_0-haiku/tools/build/v2/engine/fileunix.c
|
||
--- boost_1_50_0/tools/build/v2/engine/fileunix.c 2012-04-26 05:35:55.037224448 +0200
|
||
+++ boost_1_50_0-haiku/tools/build/v2/engine/fileunix.c 2012-08-16 13:54:03.000000000 +0200
|
||
@@ -81,6 +81,7 @@
|
||
|
||
# if defined( OS_QNX ) || \
|
||
defined( OS_BEOS ) || \
|
||
+ defined( OS_HAIKU ) || \
|
||
defined( OS_MPEIX )
|
||
# define NO_AR
|
||
# define HAVE_AR
|
||
diff -Naur boost_1_50_0/tools/build/v2/engine/jam.h boost_1_50_0-haiku/tools/build/v2/engine/jam.h
|
||
--- boost_1_50_0/tools/build/v2/engine/jam.h 2012-06-06 06:00:21.039059456 +0200
|
||
+++ boost_1_50_0-haiku/tools/build/v2/engine/jam.h 2012-08-16 13:57:51.000000000 +0200
|
||
@@ -151,6 +151,11 @@
|
||
#define OS_BEOS
|
||
#define NO_VFORK
|
||
#endif
|
||
+#ifdef __HAIKU__
|
||
+ #define unix
|
||
+ #define OSMINOR "OS=HAIKU"
|
||
+ #define OS_HAIKU
|
||
+#endif
|
||
#ifdef __bsdi__
|
||
#define OSMINOR "OS=BSDI"
|
||
#define OS_BSDI
|
||
diff -Naur boost_1_50_0/tools/build/v2/engine/jambase.c boost_1_50_0-haiku/tools/build/v2/engine/jambase.c
|
||
--- boost_1_50_0/tools/build/v2/engine/jambase.c 2011-06-06 22:36:21.039321600 +0200
|
||
+++ boost_1_50_0-haiku/tools/build/v2/engine/jambase.c 2012-08-16 14:03:05.000000000 +0200
|
||
@@ -548,6 +548,18 @@
|
||
"NOARSCAN ?= true ;\n",
|
||
"STDHDRS ?= /boot/develop/headers/posix ;\n",
|
||
"}\n",
|
||
+"else if $(OS) = HAIKU\n",
|
||
+"{\n",
|
||
+"BINDIR ?= /boot/common/bin ;\n",
|
||
+"CC ?= gcc ;\n",
|
||
+"C++ ?= $(CC) ;\n",
|
||
+"FORTRAN ?= \"\" ;\n",
|
||
+"LIBDIR ?= /boot/common/lib ;\n",
|
||
+"LINK ?= gcc ;\n",
|
||
+"LINKLIBS ?= -lnetwork ;\n",
|
||
+"NOARSCAN ?= true ;\n",
|
||
+"STDHDRS ?= /boot/develop/headers/posix ;\n",
|
||
+"}\n",
|
||
"else if $(OS) = BEOS\n",
|
||
"{\n",
|
||
"BINDIR ?= /boot/apps ;\n",
|
||
diff -Naur boost_1_50_0/tools/build/v2/tools/builtin.jam boost_1_50_0-haiku/tools/build/v2/tools/builtin.jam
|
||
--- boost_1_50_0/tools/build/v2/tools/builtin.jam 2011-06-06 22:36:21.022020096 +0200
|
||
+++ boost_1_50_0-haiku/tools/build/v2/tools/builtin.jam 2012-08-16 15:57:04.000000000 +0200
|
||
@@ -40,7 +40,7 @@
|
||
|
||
|
||
.os-names = aix bsd cygwin darwin freebsd hpux iphone linux netbsd
|
||
- openbsd osf qnx qnxnto sgi solaris unix unixware windows
|
||
+ openbsd osf qnx qnxnto sgi solaris unix unixware windows haiku
|
||
elf # Not actually an OS -- used for targeting bare metal where
|
||
# object format is ELF. This catches both -elf and -eabi gcc
|
||
# targets and well as other compilers targeting ELF. It is not
|
||
@@ -75,6 +75,7 @@
|
||
case COHERENT : host-os = unix ;
|
||
case DRAGONFLYBSD : host-os = bsd ;
|
||
case IRIX : host-os = sgi ;
|
||
+ case HAIKU : host-os = haiku ;
|
||
case MACOSX : host-os = darwin ;
|
||
case KFREEBSD : host-os = freebsd ;
|
||
case LINUX : host-os = linux ;
|
||
diff -Naur boost_1_50_0/tools/build/v2/tools/builtin.py boost_1_50_0-haiku/tools/build/v2/tools/builtin.py
|
||
--- boost_1_50_0/tools/build/v2/tools/builtin.py 2012-04-26 05:35:55.022020096 +0200
|
||
+++ boost_1_50_0-haiku/tools/build/v2/tools/builtin.py 2012-08-16 15:59:13.000000000 +0200
|
||
@@ -103,6 +103,7 @@
|
||
elif host_os == 'MACOSX': host_os = 'darwin'
|
||
elif host_os == 'KFREEBSD': host_os = 'freebsd'
|
||
elif host_os == 'LINUX': host_os = 'linux'
|
||
+ elif host_os == 'HAIKU': host_os = 'haiku'
|
||
else: host_os = 'unix'
|
||
return host_os.lower()
|
||
|
||
diff -Naur boost_1_50_0/tools/build/v2/tools/gcc.jam boost_1_50_0-haiku/tools/build/v2/tools/gcc.jam
|
||
--- boost_1_50_0/tools/build/v2/tools/gcc.jam 2012-04-26 05:35:55.025165824 +0200
|
||
+++ boost_1_50_0-haiku/tools/build/v2/tools/gcc.jam 2012-08-16 13:40:12.000000000 +0200
|
||
@@ -1050,6 +1050,10 @@
|
||
case beos :
|
||
{
|
||
# BeOS has no threading options, so do not set anything here.
|
||
+ }
|
||
+ case haiku :
|
||
+ {
|
||
+ option = ;
|
||
}
|
||
case *bsd :
|
||
{
|
||
@@ -1067,7 +1071,7 @@
|
||
}
|
||
case * :
|
||
{
|
||
- option = -pthread ;
|
||
+ option = -pthreads ;
|
||
libs = rt ;
|
||
}
|
||
}
|
||
diff -Naur boost_1_50_0/tools/build/v2/tools/gcc.py boost_1_50_0-haiku/tools/build/v2/tools/gcc.py
|
||
--- boost_1_50_0/tools/build/v2/tools/gcc.py 2012-04-26 05:35:55.025165824 +0200
|
||
+++ boost_1_50_0-haiku/tools/build/v2/tools/gcc.py 2012-08-16 15:06:53.000000000 +0200
|
||
@@ -675,6 +675,9 @@
|
||
elif host_os_name == 'BeOS':
|
||
# BeOS has no threading options, don't set anything here.
|
||
pass
|
||
+ elif host_os_name == 'Haiku':
|
||
+ flags('gcc', 'OPTIONS', ['<threading>multi'], ['-lroot'])
|
||
+ # there is no -lrt on HAIKU
|
||
elif host_os_name.endswith('BSD'):
|
||
flags('gcc', 'OPTIONS', ['<threading>multi'], ['-pthread'])
|
||
# there is no -lrt on BSD
|
||
diff -Naur boost_1_50_0/tools/build/v2/tools/python.jam boost_1_50_0-haiku/tools/build/v2/tools/python.jam
|
||
--- boost_1_50_0/tools/build/v2/tools/python.jam 2012-04-26 05:35:55.029097984 +0200
|
||
+++ boost_1_50_0-haiku/tools/build/v2/tools/python.jam 2012-08-16 15:52:51.000000000 +0200
|
||
@@ -648,13 +648,14 @@
|
||
case qnx* : return ;
|
||
case darwin : return ;
|
||
case windows : return ;
|
||
+ case haiku : return ;
|
||
|
||
case hpux : return <library>rt ;
|
||
case *bsd : return <library>pthread <toolset>gcc:<library>util ;
|
||
|
||
case aix : return <library>pthread <library>dl ;
|
||
|
||
- case * : return <library>pthread <library>dl
|
||
+ case * : return ; <library>pthread <library>dl
|
||
<toolset>gcc:<library>util <toolset-intel:platform>linux:<library>util ;
|
||
}
|
||
}
|