mirror of
https://github.com/corda/corda.git
synced 2025-01-06 05:04:20 +00:00
add support for QNX on x86_32
All but one test is passing. The failure is due to the fact that QNX doesn't (in general) support calling fork(2) from a multithreaded process. Thus, we'll need to use spawn instead of fork/exec on QNX, which I'll attempt in a later commit. http://www.qnx.com/developers/docs/6.4.1/neutrino/getting_started/s1_procs.html
This commit is contained in:
parent
38e1e3f521
commit
4237a19b68
@ -16,6 +16,8 @@
|
|||||||
# define ONLY_ON_WINDOWS(x) x
|
# define ONLY_ON_WINDOWS(x) x
|
||||||
#else
|
#else
|
||||||
# include <netdb.h>
|
# include <netdb.h>
|
||||||
|
# include <sys/socket.h>
|
||||||
|
# include <netinet/in.h>
|
||||||
# define ONLY_ON_WINDOWS(x)
|
# define ONLY_ON_WINDOWS(x)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
# include <errno.h>
|
# include <errno.h>
|
||||||
# include <netdb.h>
|
# include <netdb.h>
|
||||||
# include <sys/select.h>
|
# include <sys/select.h>
|
||||||
|
# include <netinet/ip.h>
|
||||||
# include <netinet/tcp.h>
|
# include <netinet/tcp.h>
|
||||||
# include <sys/socket.h>
|
# include <sys/socket.h>
|
||||||
#endif
|
#endif
|
||||||
|
25
makefile
25
makefile
@ -5,6 +5,7 @@ version = 0.6
|
|||||||
|
|
||||||
build-arch := $(shell uname -m \
|
build-arch := $(shell uname -m \
|
||||||
| sed 's/^i.86$$/i386/' \
|
| sed 's/^i.86$$/i386/' \
|
||||||
|
| sed 's/^x86pc$$/i386/' \
|
||||||
| sed 's/^arm.*$$/arm/' \
|
| sed 's/^arm.*$$/arm/' \
|
||||||
| sed 's/ppc/powerpc/')
|
| sed 's/ppc/powerpc/')
|
||||||
|
|
||||||
@ -309,6 +310,24 @@ ifeq ($(build-platform),darwin)
|
|||||||
build-lflags += -framework CoreFoundation
|
build-lflags += -framework CoreFoundation
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(platform),qnx)
|
||||||
|
target-platform = linux
|
||||||
|
cflags = $(common-cflags) -fPIC -fvisibility=hidden -I$(src)
|
||||||
|
lflags = $(common-lflags) -lsocket
|
||||||
|
ifeq ($(build-platform),qnx)
|
||||||
|
build-cflags = $(common-cflags) -fPIC -fvisibility=hidden -I$(src)
|
||||||
|
build-lflags = $(common-lflags)
|
||||||
|
else
|
||||||
|
prefix = i486-pc-nto-qnx6.5.0-
|
||||||
|
endif
|
||||||
|
cxx = $(prefix)g++
|
||||||
|
cc = $(prefix)gcc
|
||||||
|
ar = $(prefix)ar
|
||||||
|
ranlib = $(prefix)ranlib
|
||||||
|
strip = $(prefix)strip
|
||||||
|
rdynamic = -Wl,--export-dynamic
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(platform),darwin)
|
ifeq ($(platform),darwin)
|
||||||
ifeq (${OSX_SDK_SYSROOT},)
|
ifeq (${OSX_SDK_SYSROOT},)
|
||||||
OSX_SDK_SYSROOT = 10.4u
|
OSX_SDK_SYSROOT = 10.4u
|
||||||
@ -994,7 +1013,7 @@ $(build)/classpath.jar: $(classpath-dep) $(classpath-jar-dep)
|
|||||||
$(classpath-object): $(build)/classpath.jar $(converter)
|
$(classpath-object): $(build)/classpath.jar $(converter)
|
||||||
@echo "creating $(@)"
|
@echo "creating $(@)"
|
||||||
$(converter) $(<) $(@) _binary_classpath_jar_start \
|
$(converter) $(<) $(@) _binary_classpath_jar_start \
|
||||||
_binary_classpath_jar_end $(platform) $(arch)
|
_binary_classpath_jar_end $(target-platform) $(arch)
|
||||||
|
|
||||||
$(build)/javahome.jar:
|
$(build)/javahome.jar:
|
||||||
@echo "creating $(@)"
|
@echo "creating $(@)"
|
||||||
@ -1005,7 +1024,7 @@ $(build)/javahome.jar:
|
|||||||
$(javahome-object): $(build)/javahome.jar $(converter)
|
$(javahome-object): $(build)/javahome.jar $(converter)
|
||||||
@echo "creating $(@)"
|
@echo "creating $(@)"
|
||||||
$(converter) $(<) $(@) _binary_javahome_jar_start \
|
$(converter) $(<) $(@) _binary_javahome_jar_start \
|
||||||
_binary_javahome_jar_end $(platform) $(arch)
|
_binary_javahome_jar_end $(target-platform) $(arch)
|
||||||
|
|
||||||
define compile-generator-object
|
define compile-generator-object
|
||||||
@echo "compiling $(@)"
|
@echo "compiling $(@)"
|
||||||
@ -1066,7 +1085,7 @@ $(bootimage-generator): $(bootimage-generator-objects)
|
|||||||
arch=$(build-arch) \
|
arch=$(build-arch) \
|
||||||
target-arch=$(arch) \
|
target-arch=$(arch) \
|
||||||
platform=$(bootimage-platform) \
|
platform=$(bootimage-platform) \
|
||||||
target-platform=$(platform) \
|
target-platform=$(target-platform) \
|
||||||
openjdk=$(openjdk) \
|
openjdk=$(openjdk) \
|
||||||
openjdk-src=$(openjdk-src) \
|
openjdk-src=$(openjdk-src) \
|
||||||
bootimage-generator= \
|
bootimage-generator= \
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
#include "unistd.h"
|
#include "unistd.h"
|
||||||
#include "pthread.h"
|
#include "pthread.h"
|
||||||
#include "signal.h"
|
#include "signal.h"
|
||||||
#include "sys/ucontext.h"
|
#include "ucontext.h"
|
||||||
#include "stdint.h"
|
#include "stdint.h"
|
||||||
#include "dirent.h"
|
#include "dirent.h"
|
||||||
#include "sched.h"
|
#include "sched.h"
|
||||||
|
@ -64,6 +64,12 @@
|
|||||||
# define FRAME_REGISTER(context) \
|
# define FRAME_REGISTER(context) \
|
||||||
THREAD_STATE_FRAME(context->uc_mcontext->FIELD(ss))
|
THREAD_STATE_FRAME(context->uc_mcontext->FIELD(ss))
|
||||||
|
|
||||||
|
# elif (defined __QNX__)
|
||||||
|
# define IP_REGISTER(context) (context->uc_mcontext.cpu.eip)
|
||||||
|
# define STACK_REGISTER(context) (context->uc_mcontext.cpu.esp)
|
||||||
|
# define THREAD_REGISTER(context) (context->uc_mcontext.cpu.ebx)
|
||||||
|
# define LINK_REGISTER(context) (context->uc_mcontext.cpu.ecx)
|
||||||
|
# define FRAME_REGISTER(context) (context->uc_mcontext.cpu.ebp)
|
||||||
# else
|
# else
|
||||||
# define IP_REGISTER(context) (context->uc_mcontext.gregs[REG_EIP])
|
# define IP_REGISTER(context) (context->uc_mcontext.gregs[REG_EIP])
|
||||||
# define STACK_REGISTER(context) (context->uc_mcontext.gregs[REG_ESP])
|
# define STACK_REGISTER(context) (context->uc_mcontext.gregs[REG_ESP])
|
||||||
|
Loading…
Reference in New Issue
Block a user