You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 1680 Reporter: administrator Status: resolved (set by @damiendoligez on 2017-03-03T16:41:26Z) Resolution: won't fix Priority: normal Severity: feature Category: platform support (windows, cross-compilation, etc) Tags: patch
Bug description
Hi,
This diff against the current CVS version will let ocaml compile nicely
in QNX, specifically QNX 6.2.1 on an x86 machine. I don't have access
to any other architectures so I haven't bothered trying to support them.
There are basically just some configure and i386 code generator changes
to recognise QNX, the socket functions are in libsocket but there is no
libnsl, and mmap'ed memory access isn't synced to the file. The
MAP_NOSYNCFILE just says that I don't care about that, so read only
access will work, read/write will fail since the flag isn't used (an
explicit msync call would be needed to sync any changes.)
Original bug ID: 1680
Reporter: administrator
Status: resolved (set by @damiendoligez on 2017-03-03T16:41:26Z)
Resolution: won't fix
Priority: normal
Severity: feature
Category: platform support (windows, cross-compilation, etc)
Tags: patch
Bug description
Hi,
This diff against the current CVS version will let ocaml compile nicely
in QNX, specifically QNX 6.2.1 on an x86 machine. I don't have access
to any other architectures so I haven't bothered trying to support them.
There are basically just some configure and i386 code generator changes
to recognise QNX, the socket functions are in libsocket but there is no
libnsl, and mmap'ed memory access isn't synced to the file. The
MAP_NOSYNCFILE just says that I don't care about that, so read only
access will work, read/write will fail since the flag isn't used (an
explicit msync call would be needed to sync any changes.)
Julian Kinraid
Index: configure
RCS file: /caml/ocaml/configure,v
retrieving revision 1.186
diff -u -r1.186 configure
--- configure 2003/05/02 12:48:55 1.186
+++ configure 2003/05/07 11:10:34
@@ -452,7 +452,7 @@
if test $withsharedlibs = "yes"; then
case "$host" in
sharedcccompopts="-fPIC"
mksharedlib="$bytecc -shared -o"
bytecclinkopts="$bytecclinkopts -Wl,-E"
@@ -538,6 +538,7 @@
i[3456]86--solaris) arch=i386; system=solaris;;
i[3456]86--beos) arch=i386; system=beos;;
i[3456]86--cygwin) arch=i386; system=cygwin;;
mips--irix6) arch=mips; system=irix;;
hppa1.1--hpux) arch=hppa; system=hpux;;
hppa1.1--nextstep) arch=hppa; system=nextstep;;
@@ -617,6 +618,7 @@
alpha,,digital) profiling='prof';;
i386,,linux_elf) profiling='prof';;
i386,*,bsd_elf) profiling='prof';;
sparc,,solaris)
profiling='prof'
case "$nativecc" in gcc*) ;; *) cc_profile='-xpg';; esac;;
@@ -754,6 +756,11 @@
cclibs="$cclibs -lnsl -lsocket"
echo "#define HAS_SOCKETS" >> s.h
has_sockets=yes
+elif sh ./hasgot -lsocket socket socketpair bind listen accept connect; then
fi
if sh ./hasgot -i sys/socket.h -t socklen_t; then
@@ -1024,6 +1031,7 @@
) bignum_arch=C;;
esac;;
i[3456]86--beos) bignum_arch=x86;;
i[3456]86-*-bsd)
case
sh ./runtest elf.c
inelf) bignum_arch=x86;;
@@ -1060,6 +1068,8 @@
bytecccompopts="$bytecccompopts -pthread"
asppflags="$asppflags -pthread"
nativecccompopts="$nativecccompopts -pthread";;
pthread_link="-lpthread";;
esac
Index: asmcomp/i386/emit.mlp
===================================================================
RCS file: /caml/ocaml/asmcomp/i386/emit.mlp,v
retrieving revision 1.26
diff -u -r1.26 emit.mlp
--- asmcomp/i386/emit.mlp 2003/04/25 12:26:59 1.26
+++ asmcomp/i386/emit.mlp 2003/05/07 11:10:37
@@ -52,6 +52,7 @@
| "bsd_elf" -> ""
| "solaris" -> ""
| "beos" -> ""
| _ -> "_"
let emit_symbol s =
@@ -65,6 +66,7 @@
| "bsd_elf" -> ".L"
| "solaris" -> ".L"
| "beos" -> ".L"
| _ -> "L"
let emit_label lbl =
@@ -92,7 +94,7 @@
let emit_align =
match Config.system with
(fun n ->
.align {emit_int n}\n
)| _ ->
(fun n ->
.align {emit_int(Misc.log2 n)}\n
)Index: asmrun/i386.S
===================================================================
RCS file: /caml/ocaml/asmrun/i386.S,v
retrieving revision 1.38
diff -u -r1.38 i386.S
--- asmrun/i386.S 2002/06/07 09:49:36 1.38
+++ asmrun/i386.S 2003/05/07 11:10:38
@@ -26,7 +26,7 @@
#endif
#if defined(SYS_linux_elf) || defined(SYS_bsd_elf) \
#define G(x) x
#define LBL(x) CONCAT(.L,x)
#else
@@ -36,7 +36,7 @@
#if defined(SYS_linux_elf) || defined(SYS_bsd_elf)
|| defined(SYS_solaris) || defined(SYS_beos) || defined(SYS_cygwin) \
#define FUNCTION_ALIGN 4
#else
#define FUNCTION_ALIGN 2
@@ -57,6 +57,13 @@
popl %edx; popl %ecx; popl %eax; popl %ebp
#define PROFILE_C
pushl %ebp; movl %esp, %ebp; call .mcount; popl %ebp
+#elif defined(SYS_qnxnto)
+#define PROFILE_CAML \
+#define PROFILE_C \
#endif
#else
#define PROFILE_CAML
Index: boot/ocamlc
RCS file: /caml/ocaml/boot/ocamlc,v
retrieving revision 1.286
diff -u -r1.286 ocamlc
Binary files /tmp/cvsyoeLp65423 and ocamlc differ
Index: otherlibs/bigarray/mmap_unix.c
RCS file: /caml/ocaml/otherlibs/bigarray/mmap_unix.c,v
retrieving revision 1.7
diff -u -r1.7 mmap_unix.c
--- otherlibs/bigarray/mmap_unix.c 2001/12/07 13:39:50 1.7
+++ otherlibs/bigarray/mmap_unix.c 2003/05/07 11:12:43
@@ -90,7 +90,11 @@
/* Restore original file position /
lseek(fd, currpos, SEEK_SET);
/ Do the mmap */
+#ifdef QNXNTO
+#else
shared = Bool_val(vshared) ? MAP_SHARED : MAP_PRIVATE;
+#endif
addr = mmap(NULL, array_size, PROT_READ | PROT_WRITE, shared, fd, 0);
if (addr == (void ) MAP_FAILED) sys_error(NO_ARG);
/ Build and return the Caml bigarray */
The text was updated successfully, but these errors were encountered: