diff options
author | he <he@pkgsrc.org> | 2017-07-11 17:15:01 +0000 |
---|---|---|
committer | he <he@pkgsrc.org> | 2017-07-11 17:15:01 +0000 |
commit | cc0f3df65d67b44e9b02a5ce68054b3a6e5ac5ff (patch) | |
tree | 027e8fcd4f8f23a90c00580c4ff51f760c19452b /lang/ocaml | |
parent | 118bf1da933b11e78094715cd72a1510eebf9898 (diff) | |
download | pkgsrc-cc0f3df65d67b44e9b02a5ce68054b3a6e5ac5ff.tar.gz |
Add the required glue to make this work again on NetBSD/powerpc.
Pkgsrc changes:
* Add required macros for accessing ucontext for NetBSD/powerpc
* Omit files from PLIST.opt which are in PLIST.natdynlink.
So far macppc doesn't do "natdynlink", tests are failing.
* Adapt Makefile to features enabled on NetBSD/powerpc.
* Bump PKGREVISION.
The self-test results are nearly the same as on NetBSD/i386, with one
test failing, difference is one unexpected failure related to native
dynlink which I thought I had not enabled, and which obviously needs
more attention since it tries to reference a Linux linker script.
...
Summary:
637 tests passed
13 tests skipped
1 tests failed
1 unexpected errors
652 tests considered
List of failed tests:
tests/tool-ocamldoc-man/Inline_records.mli
List of unexpected errors:
tests/lib-dynlink-native
...
Diffstat (limited to 'lang/ocaml')
-rw-r--r-- | lang/ocaml/Makefile | 7 | ||||
-rw-r--r-- | lang/ocaml/PLIST.opt | 9 | ||||
-rw-r--r-- | lang/ocaml/distinfo | 5 | ||||
-rw-r--r-- | lang/ocaml/patches/patch-asmrun_signals__osdep.h | 42 | ||||
-rw-r--r-- | lang/ocaml/patches/patch-configure | 3 |
5 files changed, 51 insertions, 15 deletions
diff --git a/lang/ocaml/Makefile b/lang/ocaml/Makefile index 2af3a46e6a9..6b167c2a384 100644 --- a/lang/ocaml/Makefile +++ b/lang/ocaml/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.108 2017/03/27 12:54:59 jperkin Exp $ +# $NetBSD: Makefile,v 1.109 2017/07/11 17:15:01 he Exp $ .include "Makefile.common" -#PKGREVISION= 2 +PKGREVISION= 1 CONFIGURE_ENV+= disable_x11=yes @@ -34,7 +34,6 @@ BUILD_TARGET+= opt opt.opt PLIST_SRC+= ${PKGDIR}/PLIST.opt . if empty(MACHINE_PLATFORM:MDarwin-*-powerpc) && \ empty(MACHINE_PLATFORM:MSunOS-*-i386) && \ - empty(MACHINE_PLATFORM:MNetBSD-*-powerpc) && \ empty(MACHINE_PLATFORM:MNetBSD-*-arm) && \ empty(MACHINE_PLATFORM:MNetBSD-*-sparc) PLIST_SRC+= ${PKGDIR}/PLIST.prof @@ -47,7 +46,7 @@ PLIST_SRC+= ${PKGDIR}/PLIST.prof . if !empty(MACHINE_PLATFORM:MLinux-*-*) || \ !empty(MACHINE_PLATFORM:MFreeBSD-*-*) || \ !empty(MACHINE_PLATFORM:MDragonFly-*-*) || \ - !empty(MACHINE_PLATFORM:MNetBSD-*-*) || \ + (!empty(MACHINE_PLATFORM:MNetBSD-*-*) && empty(MACHINE_PLATFORM:MNetBSD-*-powerpc)) || \ !empty(MACHINE_PLATFORM:MDarwin-*-*) || \ !empty(MACHINE_PLATFORM:MSunOS-*-*) PLIST_SRC+= ${PKGDIR}/PLIST.natdynlink diff --git a/lang/ocaml/PLIST.opt b/lang/ocaml/PLIST.opt index 50d16d8fbce..e1176f2da6b 100644 --- a/lang/ocaml/PLIST.opt +++ b/lang/ocaml/PLIST.opt @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST.opt,v 1.27 2017/03/27 11:51:30 jperkin Exp $ +@comment $NetBSD: PLIST.opt,v 1.28 2017/07/11 17:15:01 he Exp $ bin/ocamlc.opt bin/ocamlcp.opt bin/ocamldep.opt @@ -19,7 +19,6 @@ lib/ocaml/big_int.cmx lib/ocaml/bigarray.a lib/ocaml/bigarray.cmx lib/ocaml/bigarray.cmxa -lib/ocaml/bigarray.cmxs lib/ocaml/buffer.cmx lib/ocaml/bytes.cmx lib/ocaml/bytesLabels.cmx @@ -185,9 +184,6 @@ lib/ocaml/compiler-libs/x86_masm.cmx lib/ocaml/compiler-libs/x86_proc.cmx lib/ocaml/complex.cmx lib/ocaml/digest.cmx -lib/ocaml/dynlink.a -lib/ocaml/dynlink.cmx -lib/ocaml/dynlink.cmxa lib/ocaml/ephemeron.cmx lib/ocaml/filename.cmx lib/ocaml/format.cmx @@ -220,7 +216,6 @@ lib/ocaml/nativeint.cmx lib/ocaml/num.cmx lib/ocaml/nums.a lib/ocaml/nums.cmxa -lib/ocaml/nums.cmxs lib/ocaml/obj.cmx lib/ocaml/ocamldoc/odoc.cmx lib/ocaml/ocamldoc/odoc_analyse.cmx @@ -292,7 +287,6 @@ lib/ocaml/stdlib.cmxa lib/ocaml/str.a lib/ocaml/str.cmx lib/ocaml/str.cmxa -lib/ocaml/str.cmxs lib/ocaml/stream.cmx lib/ocaml/string.cmx lib/ocaml/stringLabels.cmx @@ -308,7 +302,6 @@ lib/ocaml/uchar.cmx lib/ocaml/unix.a lib/ocaml/unix.cmx lib/ocaml/unix.cmxa -lib/ocaml/unix.cmxs lib/ocaml/unixLabels.cmx lib/ocaml/vmthreads/libvmthreads.a lib/ocaml/weak.cmx diff --git a/lang/ocaml/distinfo b/lang/ocaml/distinfo index 421ad129ef1..3215a5953df 100644 --- a/lang/ocaml/distinfo +++ b/lang/ocaml/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.104 2017/07/11 09:52:11 jaapb Exp $ +$NetBSD: distinfo,v 1.105 2017/07/11 17:15:01 he Exp $ SHA1 (ocaml-4.04.2.tar.gz) = 24281675ea90c9234e323d556f1d4cd7bdab8ec1 RMD160 (ocaml-4.04.2.tar.gz) = 3d8f78cd544815233f814a0e24eba8d3c948b190 @@ -7,8 +7,9 @@ Size (ocaml-4.04.2.tar.gz) = 3561930 bytes SHA1 (patch-Makefile) = 426d2aa080922fb6f034a76b8009f2fcbbe7a693 SHA1 (patch-asmcomp_asmlink.ml) = db2b387ea17f41a62c2bce53b91f945d5e29a82f SHA1 (patch-asmrun_Makefile) = 923b46ebf5fb56693b8335787846dafda936b34c +SHA1 (patch-asmrun_signals__osdep.h) = 1b990aad8e99692f0799e2d3dc61df2f4d1c8f6a SHA1 (patch-byterun_Makefile) = b9b14b097904fbde4b738b89461991411e985ae1 -SHA1 (patch-configure) = b3004e40d2337c50c49337f2c7964d469ba99e5c +SHA1 (patch-configure) = 291e703a6a2147b760330f4623a049cceb2543e9 SHA1 (patch-debugger_Makefile.shared) = f0aac2e10b7ccf2e8e43bbbd3fd3e59e4dc4eeae SHA1 (patch-driver_compenv.ml) = 658e315bb08f8a1093f11c8474ac1e4ad73c8306 SHA1 (patch-driver_main.ml) = 69a6f761ded38e0721a7aed1416a9f19a288d991 diff --git a/lang/ocaml/patches/patch-asmrun_signals__osdep.h b/lang/ocaml/patches/patch-asmrun_signals__osdep.h new file mode 100644 index 00000000000..2b0a75fc471 --- /dev/null +++ b/lang/ocaml/patches/patch-asmrun_signals__osdep.h @@ -0,0 +1,42 @@ +$NetBSD: patch-asmrun_signals__osdep.h,v 1.1 2017/07/11 17:15:02 he Exp $ + +Provide necessary glue to do this on NetBSD/powerpc. + +--- asmrun/signals_osdep.h.orig 2016-11-04 16:08:24.000000000 +0000 ++++ asmrun/signals_osdep.h +@@ -154,6 +154,26 @@ + #define CONTEXT_YOUNG_PTR (context->uc_mcontext.gregs[REG_R15]) + #define CONTEXT_FAULTING_ADDRESS ((char *) info->si_addr) + ++/****************** PowerPC, NetBSD */ ++ ++#elif defined(TARGET_power) && defined (__NetBSD__) ++ ++ #include <ucontext.h> ++ #define DECLARE_SIGNAL_HANDLER(name) \ ++ static void name(int sig, siginfo_t * info, ucontext_t * context) ++ ++ #define SET_SIGACT(sigact,name) \ ++ sigact.sa_sigaction = (void (*)(int,siginfo_t *,void *)) (name); \ ++ sigact.sa_flags = SA_SIGINFO ++ ++ #define CONTEXT_PC (_UC_MACHINE_PC(context)) ++ #define CONTEXT_EXCEPTION_POINTER (context->uc_mcontext.__gregs[_REG_R29]) ++ #define CONTEXT_YOUNG_PTR (context->uc_mcontext.__gregs[_REG_R31]) ++ #define CONTEXT_SP (_UC_MACHINE_SP(context)) ++ #define CONTEXT_FAULTING_ADDRESS ((char *) info->si_addr) ++ ++/* #define CONTEXT_YOUNG_LIMIT (CONTEXT_STATE.CONTEXT_REG(r30)) */ ++ + /****************** I386, Linux */ + + #elif defined(TARGET_i386) && defined(SYS_linux_elf) +@@ -287,7 +307,7 @@ + + /****************** PowerPC, ELF (Linux) */ + +-#elif defined(TARGET_power) && defined(SYS_elf) ++#elif defined(TARGET_power) && defined(SYS_elf) && !defined(__NetBSD__) + + #define DECLARE_SIGNAL_HANDLER(name) \ + static void name(int sig, struct sigcontext * context) diff --git a/lang/ocaml/patches/patch-configure b/lang/ocaml/patches/patch-configure index c9012f13ed3..dc615a069c2 100644 --- a/lang/ocaml/patches/patch-configure +++ b/lang/ocaml/patches/patch-configure @@ -1,6 +1,7 @@ -$NetBSD: patch-configure,v 1.22 2017/03/27 12:54:59 jperkin Exp $ +$NetBSD: patch-configure,v 1.23 2017/07/11 17:15:02 he Exp $ All kinds of OS-specific changes to configure + --- configure.orig 2016-11-04 16:08:24.000000000 +0000 +++ configure @@ -726,7 +726,10 @@ if test $with_sharedlibs = "yes"; then |