Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Libretro
flycast
Commits
2ba2c71c
Commit
2ba2c71c
authored
Feb 12, 2018
by
kwyxz
Browse files
Enable build on Haiku target
parent
74c4ddf8
Changes
5
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
2ba2c71c
...
...
@@ -107,7 +107,11 @@ ifneq (,$(findstring unix,$(platform)))
TARGET
:=
$(TARGET_NAME)
_libretro.
$(EXT)
SHARED
:=
-shared
-Wl
,--version-script
=
link.T
LDFLAGS
+=
-Wl
,--no-undefined
ifneq
(,$(findstring Haiku,$(shell uname -s)))
LIBS
+=
-lroot
else
LIBS
+=
-lrt
endif
fpic
=
-fPIC
...
...
core/hw/mem/_vmem.cpp
View file @
2ba2c71c
...
...
@@ -723,13 +723,21 @@ void _vmem_bm_reset_nvmem(void)
VirtualFree
(
p_sh4rcb
,
sizeof
(
p_sh4rcb
->
fpcb
),
MEM_DECOMMIT
);
#else
mprotect
(
p_sh4rcb
,
sizeof
(
p_sh4rcb
->
fpcb
),
PROT_NONE
);
#ifdef __HAIKU__
posix_madvise
(
p_sh4rcb
,
sizeof
(
p_sh4rcb
->
fpcb
),
POSIX_MADV_DONTNEED
);
#else
madvise
(
p_sh4rcb
,
sizeof
(
p_sh4rcb
->
fpcb
),
MADV_DONTNEED
);
#endif
#ifdef MADV_REMOVE
madvise
(
p_sh4rcb
,
sizeof
(
p_sh4rcb
->
fpcb
),
MADV_REMOVE
);
#else
#ifdef __HAIKU__
posix_madvise
(
p_sh4rcb
,
sizeof
(
p_sh4rcb
->
fpcb
),
POSIX_MADV_DONTNEED
);
#else
/* OSX, IOS */
madvise
(
p_sh4rcb
,
sizeof
(
p_sh4rcb
->
fpcb
),
MADV_FREE
);
#endif
#endif
#endif
printf
(
"Freeing fpcb
\n
"
);
...
...
core/hw/mem/_vmem.h
View file @
2ba2c71c
#pragma once
#include "types.h"
#if defined(__HAIKU__)
#include <posix/sys/mman.h>
#endif
//Typedef's
//ReadMem
typedef
u8
DYNACALL
_vmem_ReadMem8FP
(
u32
Address
);
...
...
@@ -70,4 +74,4 @@ static inline bool _nvmem_enabled() {
return
virt_ram_base
!=
0
;
}
void
_vmem_bm_reset
();
\ No newline at end of file
void
_vmem_bm_reset
();
core/hw/sh4/dyna/driver.cpp
View file @
2ba2c71c
...
...
@@ -38,6 +38,8 @@ u8 SH4_TCB[CODE_SIZE+4096]
__attribute__
((
section
(
".text"
)));
#elif defined(__MACH__)
__attribute__
((
section
(
"__TEXT,.text"
)));
#elif defined(__HAIKU__)
__attribute__
((
section
(
".text"
)));
#else
#error SH4_TCB ALLOC
#endif
...
...
core/libretro/common.cpp
View file @
2ba2c71c
...
...
@@ -9,9 +9,11 @@
#if !defined(TARGET_NO_EXCEPTIONS)
#ifndef _WIN32
#ifndef __HAIKU__
#include <ucontext.h>
#endif
#endif
#endif
#if defined(_ANDROID)
#include <asm/sigcontext.h>
...
...
@@ -338,7 +340,7 @@ static void sigill_handler(int sn, siginfo_t * si, void *segfault_ctx)
}
#endif
#if defined(__MACH__) || defined(__linux__)
#if defined(__MACH__) || defined(__linux__)
|| defined(__HAIKU__)
//#define LOG_SIGHANDLER
static
void
signal_handler
(
int
sn
,
siginfo_t
*
si
,
void
*
segfault_ctx
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment