ocaml: fix SmartOS build.
- Claimed shared library support. same as other ELF platforms, but since it's not GNU ld, no -Wl,-E available. - Change the PLIST vars based on what is actually built - consider x86_64-*-solaris to be x86_64 and solaris. the arch=none option doesn't build. - Search for socket stuff in -lnsl -lsocket. - for a POSIX prototype sigwait, we need to define _XOPEN_SOURCE to something
This commit is contained in:
parent
c73a2c155c
commit
ed25bb0631
4 changed files with 68 additions and 14 deletions
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.128 2019/08/27 05:37:38 jaapb Exp $
|
||||
# $NetBSD: Makefile,v 1.129 2019/10/01 09:07:33 maya Exp $
|
||||
|
||||
.include "Makefile.common"
|
||||
|
||||
|
@ -38,7 +38,7 @@ PLIST.ocaml-stub= yes
|
|||
BUILD_TARGET+= opt opt.opt
|
||||
PLIST.ocaml-opt= yes
|
||||
. if empty(MACHINE_PLATFORM:MDarwin-*-powerpc) && \
|
||||
empty(MACHINE_PLATFORM:MSunOS-*-i386) && \
|
||||
empty(MACHINE_PLATFORM:MSunOS-*-*) && \
|
||||
(${MACHINE_ARCH} != "aarch64")
|
||||
PLIST.ocaml-prof= yes
|
||||
. endif
|
||||
|
@ -52,8 +52,7 @@ PLIST.ocaml-prof= yes
|
|||
!empty(MACHINE_PLATFORM:MFreeBSD-*-*) || \
|
||||
!empty(MACHINE_PLATFORM:MDragonFly-*-*) || \
|
||||
(!empty(MACHINE_PLATFORM:MNetBSD-*-*) && empty(MACHINE_PLATFORM:MNetBSD-*-powerpc)) || \
|
||||
!empty(MACHINE_PLATFORM:MDarwin-*-*) || \
|
||||
!empty(MACHINE_PLATFORM:MSunOS-*-*)
|
||||
!empty(MACHINE_PLATFORM:MDarwin-*-*)
|
||||
PLIST.ocaml-nat= yes
|
||||
. endif
|
||||
.endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
$NetBSD: distinfo,v 1.129 2019/08/27 06:23:50 jaapb Exp $
|
||||
$NetBSD: distinfo,v 1.130 2019/10/01 09:07:33 maya Exp $
|
||||
|
||||
SHA1 (ocaml-4.08.1.tar.gz) = f89ae7513ee4f064c7db92066f9dd4ac085634e2
|
||||
RMD160 (ocaml-4.08.1.tar.gz) = a8c0b80d9b6ff52c9a5725eec3ce64adffd81ca6
|
||||
|
@ -9,7 +9,7 @@ SHA1 (patch-Makefile.common.in) = bc44846bfa941520b43538189dbc5637c342ef0a
|
|||
SHA1 (patch-asmcomp_amd64_emit.mlp) = 1bc44434fbe1821d3aa2eed1a6b0938258586851
|
||||
SHA1 (patch-asmcomp_asmlink.ml) = db2b387ea17f41a62c2bce53b91f945d5e29a82f
|
||||
SHA1 (patch-asmrun_amd64.S) = 68d8f3ba1c1ad951e688539b4659aee71a527222
|
||||
SHA1 (patch-configure) = 6e204c6feea752c182043ecde52e421f60173e11
|
||||
SHA1 (patch-configure) = 3b43429065b093174bb89329a8f5ed16ac46fc6d
|
||||
SHA1 (patch-driver_compenv.ml) = 27c68072bd73c9c00d2b3093d8c6498f192ca3d3
|
||||
SHA1 (patch-driver_main.ml) = 69a6f761ded38e0721a7aed1416a9f19a288d991
|
||||
SHA1 (patch-driver_main_args.ml) = 4c6a6ec25f433974f9aab99b4f2ac9c884bb3b04
|
||||
|
@ -21,6 +21,7 @@ SHA1 (patch-ocamldoc_Makefile) = 7f0a90ca7849447b93ae4b3fcbc58901de1e996f
|
|||
SHA1 (patch-ocamldoc_odoc__messages.ml) = 77f650a5f34f40b9648a8d5091e9aa31efb5734b
|
||||
SHA1 (patch-otherlibs_Makefile.otherlibs.common) = 2eb71de7bd659c763fb7efdf10af1812e135c904
|
||||
SHA1 (patch-otherlibs_systhreads_Makefile) = d6f7818487c156b101b6a78f0dc2824d57453e50
|
||||
SHA1 (patch-otherlibs_systhreads_st__stubs.c) = 36320714e92f2a3ad52135e4b7c66ffd286717f0
|
||||
SHA1 (patch-otherlibs_threads_Makefile) = 3ccc89021d808967bc958d295515ceca1c39c81d
|
||||
SHA1 (patch-runtime_Makefile) = 37b8e9b8d121b9066ccd38ce18a31f8d25369152
|
||||
SHA1 (patch-tools_Makefile) = e891408b43672b164a28f213713b7b211227a4af
|
||||
|
|
|
@ -1,10 +1,15 @@
|
|||
$NetBSD: patch-configure,v 1.37 2019/08/24 10:54:23 jaapb Exp $
|
||||
$NetBSD: patch-configure,v 1.38 2019/10/01 09:07:33 maya Exp $
|
||||
|
||||
All kinds of OS-specific changes to configure
|
||||
Honor LDFLAGS.
|
||||
|
||||
Add SunOS -lnsl -lsocket
|
||||
Recognise SunOS/amd64 as amd64
|
||||
Recognise SunOS as having shared libraries
|
||||
|
||||
--- configure.orig 2019-03-01 15:13:45.000000000 +0000
|
||||
+++ configure
|
||||
@@ -13379,7 +13379,7 @@ sharedlib_cflags=''
|
||||
@@ -13311,7 +13311,7 @@ sharedlib_cflags=''
|
||||
mksharedlib='shared-libs-not-available'
|
||||
rpath=''
|
||||
mksharedlibrpath=''
|
||||
|
@ -13,7 +18,24 @@ Honor LDFLAGS.
|
|||
|
||||
if test x"$enable_shared" != "xno"; then :
|
||||
case $host in #(
|
||||
@@ -13475,6 +13475,8 @@ fi ;; #(
|
||||
@@ -13347,9 +13335,14 @@ esac ;; #(
|
||||
rpath="-Wl,-rpath,"
|
||||
mksharedlibrpath="-Wl,-rpath,"
|
||||
natdynlinkopts="-Wl,-E"
|
||||
- shared_libraries_supported=true ;; #(
|
||||
+ shared_libraries_supported=true
|
||||
+ *-*-solaris* ;; #(
|
||||
*) :
|
||||
- ;;
|
||||
+ sharedlib_cflags="-fPIC"
|
||||
+ mksharedlib="$CC -shared"
|
||||
+ rpath="-Wl,-rpath,"
|
||||
+ mksharedlibrpath="-Wl,-rpath,"
|
||||
+ shared_libraries_supported=true ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
@@ -13415,6 +13415,8 @@ fi ;; #(
|
||||
natdynlink=true ;; #(
|
||||
aarch64-*-linux*) :
|
||||
natdynlink=true ;; #(
|
||||
|
@ -22,7 +44,7 @@ Honor LDFLAGS.
|
|||
*) :
|
||||
;;
|
||||
esac
|
||||
@@ -13526,6 +13528,8 @@ case $host in #(
|
||||
@@ -13466,6 +13468,8 @@ case $host in #(
|
||||
arch=i386; system=beos ;; #(
|
||||
i[3456]86-*-cygwin) :
|
||||
arch=i386; system=cygwin ;; #(
|
||||
|
@ -31,7 +53,7 @@ Honor LDFLAGS.
|
|||
i[3456]86-*-darwin*) :
|
||||
if $arch64; then :
|
||||
arch=amd64
|
||||
@@ -13570,6 +13574,10 @@ fi; system=elf ;; #(
|
||||
@@ -13510,6 +13514,10 @@ fi; system=elf ;; #(
|
||||
arch=arm; model=armv6; system=linux_eabi ;; #(
|
||||
armv6*-*-freebsd*) :
|
||||
arch=arm; model=armv6; system=freebsd ;; #(
|
||||
|
@ -42,16 +64,21 @@ Honor LDFLAGS.
|
|||
earmv6*-*-netbsd*) :
|
||||
arch=arm; model=armv6; system=netbsd ;; #(
|
||||
earmv7*-*-netbsd*) :
|
||||
@@ -13602,6 +13610,8 @@ fi; system=elf ;; #(
|
||||
@@ -13544,8 +13552,12 @@ fi; system=elf ;; #(
|
||||
arch=amd64; system=mingw64 ;; #(
|
||||
aarch64-*-linux*) :
|
||||
arch=arm64; system=linux ;; #(
|
||||
+ aarch64-*-netbsd*) :
|
||||
+ arch=arm64; system=netbsd ;; #(
|
||||
x86_64-*-cygwin*) :
|
||||
arch=amd64; system=cygwin
|
||||
- arch=amd64; system=cygwin
|
||||
+ arch=amd64; system=cygwin ;; #(
|
||||
+ x86_64-*-solaris*) :
|
||||
+ arch=amd64; system=solaris
|
||||
;; #(
|
||||
@@ -13932,7 +13942,7 @@ fi
|
||||
*) :
|
||||
;;
|
||||
@@ -13884,7 +13896,7 @@ fi
|
||||
# for the moment, to be backward-compatible
|
||||
|
||||
case $host in #(
|
||||
|
@ -60,3 +87,13 @@ Honor LDFLAGS.
|
|||
;; #(
|
||||
*) :
|
||||
has_c99_float_ops=true
|
||||
@@ -14085,6 +14097,9 @@ case $host in #(
|
||||
*-*-mingw32|*-pc-windows) :
|
||||
cclibs="$cclibs -lws2_32"
|
||||
sockets=true ;; #(
|
||||
+ *-*-solaris*) :
|
||||
+ cclibs="$cclibs -lnsl -lsocket"
|
||||
+ sockets=true ;; #(
|
||||
*) :
|
||||
|
||||
ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
|
||||
|
|
17
lang/ocaml/patches/patch-otherlibs_systhreads_st__stubs.c
Normal file
17
lang/ocaml/patches/patch-otherlibs_systhreads_st__stubs.c
Normal file
|
@ -0,0 +1,17 @@
|
|||
$NetBSD: patch-otherlibs_systhreads_st__stubs.c,v 1.1 2019/10/01 09:07:33 maya Exp $
|
||||
|
||||
Make the POSIX sigwait visible on SmartOS
|
||||
|
||||
--- otherlibs/systhreads/st_stubs.c.orig 2019-08-05 17:32:44.000000000 +0000
|
||||
+++ otherlibs/systhreads/st_stubs.c
|
||||
@@ -15,6 +15,9 @@
|
||||
|
||||
#define CAML_INTERNALS
|
||||
|
||||
+/* Needed for sigwait */
|
||||
+#define _XOPEN_SOURCE 500
|
||||
+
|
||||
#include "caml/alloc.h"
|
||||
#include "caml/backtrace.h"
|
||||
#include "caml/callback.h"
|
||||
|
Loading…
Reference in a new issue