From b9ad1470ddc57de61f802db82b77ae03dc40ec5b Mon Sep 17 00:00:00 2001 From: he Date: Tue, 1 Dec 2020 23:16:44 +0000 Subject: Add support for building ocaml on NetBSD/powerpc. On NetBSD 8.x, there will be issues with shared library support, due to missing support for ADDR16_LO, ADDR16_HI and ADDR16_HA relocations, available in newer code. There are however other issues, text relocations, and apparent missing REL24 relocation support(?!?). The testyield.ml test appears to not terminate, only two of the 4(?) threads ever get any CPU time, so has to be killed to complete the selftests. Test result: 2438 tests passed 36 tests skipped 12 tests failed 108 tests not started (parent test skipped or failed) 8 unexpected errors 2602 tests considered --- lang/ocaml/distinfo | 4 ++-- lang/ocaml/patches/patch-configure | 42 +++++++++++++++++++++++++++++++------- 2 files changed, 37 insertions(+), 9 deletions(-) (limited to 'lang') diff --git a/lang/ocaml/distinfo b/lang/ocaml/distinfo index e2d37a59510..0e6a7fefa4d 100644 --- a/lang/ocaml/distinfo +++ b/lang/ocaml/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.136 2020/05/23 20:33:51 rillig Exp $ +$NetBSD: distinfo,v 1.137 2020/12/01 23:16:44 he Exp $ SHA1 (ocaml-4.09.1.tar.gz) = b4e7140e977c0fae5182074dd93b3c1b74f49ee7 RMD160 (ocaml-4.09.1.tar.gz) = 377e956327bac18a37f9e77b2558e9474fd07481 @@ -9,7 +9,7 @@ SHA1 (patch-Makefile.common.in) = fbf3dc0614073ed5ac9b220211a837f69a4ffcaf SHA1 (patch-asmcomp_amd64_emit.mlp) = c2b90f50bc3c4bf9817916bdd455a8bfc03cb69b SHA1 (patch-asmrun_amd64.S) = d4c33cb14c107ed03bf6a3704bbfe7c2799a048e SHA1 (patch-check-linker-version_sh) = c90242556207242ac58499d7f42519a10aedcca4 -SHA1 (patch-configure) = 311b18383bcc88f2a67d83d4b0c6e35344bd2d0d +SHA1 (patch-configure) = dafa708f7ad063612cb93fa1089d49a6059d1e9f SHA1 (patch-lex_Makefile) = 18d1b8272ffb3e3a58c26d8a2494aaae6942426a SHA1 (patch-man_Makefile) = b780c026aef5f7e6b22b142fce3ec87ef9d2ab22 SHA1 (patch-ocamldoc_Makefile) = ca4997636f7a6a382bbcb7be365526e94be4534a diff --git a/lang/ocaml/patches/patch-configure b/lang/ocaml/patches/patch-configure index df92307895a..0302b9c7ac5 100644 --- a/lang/ocaml/patches/patch-configure +++ b/lang/ocaml/patches/patch-configure @@ -1,4 +1,4 @@ -$NetBSD: patch-configure,v 1.41 2020/01/14 19:53:35 jaapb Exp $ +$NetBSD: patch-configure,v 1.42 2020/12/01 23:16:44 he Exp $ All kinds of OS-specific changes to configure Honor LDFLAGS. @@ -9,7 +9,7 @@ Recognise SunOS as having shared libraries --- configure.orig 2019-09-11 14:40:30.000000000 +0000 +++ configure -@@ -13281,7 +13281,7 @@ sharedlib_cflags='' +@@ -13306,7 +13306,7 @@ sharedlib_cflags='' mksharedlib='shared-libs-not-available' rpath='' mksharedlibrpath='' @@ -18,7 +18,16 @@ Recognise SunOS as having shared libraries if test x"$enable_shared" != "xno"; then : case $host in #( -@@ -13383,6 +13383,8 @@ if test x"$enable_shared" != "xno"; then +@@ -13392,6 +13392,8 @@ if test x"$enable_shared" != "xno"; then + natdynlink=true ;; #( + i[3456]86-*-netbsd*) : + natdynlink=true ;; #( ++ powerpc-*-netbsd*) : ++ natdynlink=true ;; #( + x86_64-*-netbsd*) : + natdynlink=true ;; #( + i386-*-gnu0.3) : +@@ -13408,6 +13410,8 @@ if test x"$enable_shared" != "xno"; then natdynlink=true ;; #( aarch64-*-freebsd*) : natdynlink=true ;; #( @@ -27,7 +36,7 @@ Recognise SunOS as having shared libraries *) : ;; esac -@@ -13434,6 +13436,8 @@ case $host in #( +@@ -13459,6 +13463,8 @@ case $host in #( arch=i386; system=beos ;; #( i[3456]86-*-cygwin) : arch=i386; system=cygwin ;; #( @@ -36,7 +45,16 @@ Recognise SunOS as having shared libraries i[3456]86-*-gnu*) : arch=i386; system=gnu ;; #( i[3456]86-*-mingw32) : -@@ -13468,6 +13472,10 @@ fi; system=elf ;; #( +@@ -13475,6 +13481,8 @@ case $host in #( + else + model=ppc + fi; system=elf ;; #( ++ powerpc-*-netbsd*) : ++ arch=power; model=ppc; system=netbsd ;; #( + s390x*-*-linux*) : + arch=s390x; model=z10; system=elf ;; #( + armv6*-*-linux-gnueabihf) : +@@ -13493,6 +13501,10 @@ fi; system=elf ;; #( arch=arm; model=armv6; system=linux_eabi ;; #( armv6*-*-freebsd*) : arch=arm; model=armv6; system=freebsd ;; #( @@ -47,7 +65,7 @@ Recognise SunOS as having shared libraries earmv6*-*-netbsd*) : arch=arm; model=armv6; system=netbsd ;; #( earmv7*-*-netbsd*) : -@@ -13504,6 +13512,8 @@ fi; system=elf ;; #( +@@ -13529,6 +13541,8 @@ fi; system=elf ;; #( arch=arm64; system=linux ;; #( aarch64-*-freebsd*) : arch=arm64; system=freebsd ;; #( @@ -56,7 +74,17 @@ Recognise SunOS as having shared libraries x86_64-*-cygwin*) : arch=amd64; system=cygwin ;; #( -@@ -13788,7 +13798,7 @@ fi +@@ -13730,6 +13744,9 @@ esac ;; #( + *) : + ;; + esac ;; #( ++ power,netbsd) : ++ default_as="${toolpref}as -mppc" ++ default_aspp="${toolpref}gcc -c" ;; #( + s390x,elf) : + default_as="${toolpref}as -m 64 -march=$model" + default_aspp="${toolpref}gcc -c -Wa,-march=$model" ;; #( +@@ -13813,7 +13830,7 @@ fi # for the moment, to be backward-compatible case $host in #( -- cgit v1.2.3