pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Pull over the NetBSD/powerpc adaptations from main pkgsrc.



Module Name:	pkgsrc-wip
Committed By:	Havard Eidnes <he%NetBSD.org@localhost>
Pushed By:	he
Date:		Tue Dec 8 11:30:05 2020 +0100
Changeset:	eb52654fd209df40e792691a602f0656269a12d0

Modified Files:
	ocaml/distinfo
	ocaml/patches/patch-configure
Added Files:
	ocaml/patches/patch-testsuite_tests_lib-systhreads_testyield.ml

Log Message:
Pull over the NetBSD/powerpc adaptations from main pkgsrc.

Also, limit the number of threads in the testyield.ml test to 2,
because NetBSD apparently only ever schedules 2 of the 4 threads.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=eb52654fd209df40e792691a602f0656269a12d0

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 ocaml/distinfo                                     |  3 +-
 ocaml/patches/patch-configure                      | 38 +++++++++++++++++++---
 ...tch-testsuite_tests_lib-systhreads_testyield.ml | 18 ++++++++++
 3 files changed, 53 insertions(+), 6 deletions(-)

diffs:
diff --git a/ocaml/distinfo b/ocaml/distinfo
index 668789752d..7840ea68b8 100644
--- a/ocaml/distinfo
+++ b/ocaml/distinfo
@@ -8,7 +8,7 @@ SHA1 (patch-Makefile) = 151fa9e965093dce653e874288c739f8e9253157
 SHA1 (patch-Makefile.common.in) = 37d880f7125040fd4a125ff0e24615811ce9c827
 SHA1 (patch-asmcomp_amd64_emit.mlp) = c2b90f50bc3c4bf9817916bdd455a8bfc03cb69b
 SHA1 (patch-asmrun_amd64.S) = d4c33cb14c107ed03bf6a3704bbfe7c2799a048e
-SHA1 (patch-configure) = f86569cae9cc99f380073dfdf6797f2ae118bfc5
+SHA1 (patch-configure) = 01297bb47f876f76181cfb83db71f8897459ea96
 SHA1 (patch-lex_Makefile) = 7f1ad4d5852a9a38b9c33ca33728236cc457fa09
 SHA1 (patch-man_Makefile) = b780c026aef5f7e6b22b142fce3ec87ef9d2ab22
 SHA1 (patch-ocamldoc_Makefile) = 0a3c536d1cd9f811a1ef1d7155036b8ddbcf4f4f
@@ -16,6 +16,7 @@ SHA1 (patch-ocamldoc_odoc__messages.ml) = 77f650a5f34f40b9648a8d5091e9aa31efb573
 SHA1 (patch-otherlibs_Makefile.otherlibs.common) = 05f14ad2635bfd2ded98ef38ac6e7578b5cfc08e
 SHA1 (patch-otherlibs_systhreads_Makefile) = ff2cf90527bda37474097bb576bccbf7329c4f1d
 SHA1 (patch-runtime_Makefile) = 6c70b68791e4c074179aa27dfafb398646b59dcb
+SHA1 (patch-testsuite_tests_lib-systhreads_testyield.ml) = 0f6d35e030de168c6f4aeb126055065ed47878aa
 SHA1 (patch-tools_Makefile) = 69f92a8615ed6f9b33f27546c6a25a1f24995e55
 SHA1 (patch-tools_ocamlmklib) = 9a9c0e3b473f7ba4127fe120cf6dbbdbb3c957f2
 SHA1 (patch-yacc_Makefile) = 3d8962a2d447aa7e88e59151d66e2080f7fad1fb
diff --git a/ocaml/patches/patch-configure b/ocaml/patches/patch-configure
index 2071fdf225..288bb14c27 100644
--- a/ocaml/patches/patch-configure
+++ b/ocaml/patches/patch-configure
@@ -11,7 +11,16 @@ $NetBSD$
  
  if test x"$enable_shared" != "xno"; then :
    case $host in #(
-@@ -13572,12 +13572,16 @@ if test x"$enable_shared" != "xno"; then
+@@ -13562,6 +13562,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) :
+@@ -13572,12 +13574,16 @@ if test x"$enable_shared" != "xno"; then
      natdynlink=true ;; #(
    arm*-*-freebsd*) :
      natdynlink=true ;; #(
@@ -28,7 +37,7 @@ $NetBSD$
    riscv*-*-linux*) :
      natdynlink=true ;; #(
    *) :
-@@ -13649,6 +13653,8 @@ case $host in #(
+@@ -13649,6 +13655,8 @@ case $host in #(
      arch=i386; system=beos ;; #(
    i[3456]86-*-cygwin) :
      arch=i386; system=cygwin ;; #(
@@ -37,7 +46,16 @@ $NetBSD$
    i[3456]86-*-gnu*) :
      arch=i386; system=gnu ;; #(
    i[3456]86-*-mingw32) :
-@@ -13683,6 +13689,10 @@ fi; system=elf ;; #(
+@@ -13665,6 +13673,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) :
+@@ -13683,6 +13693,10 @@ fi; system=elf ;; #(
      arch=arm; model=armv6; system=linux_eabi ;; #(
    armv6*-*-freebsd*) :
      arch=arm; model=armv6; system=freebsd ;; #(
@@ -48,7 +66,7 @@ $NetBSD$
    earmv6*-*-netbsd*) :
      arch=arm; model=armv6; system=netbsd ;; #(
    earmv7*-*-netbsd*) :
-@@ -13719,6 +13729,8 @@ fi; system=elf ;; #(
+@@ -13719,6 +13733,8 @@ fi; system=elf ;; #(
      arch=arm64; system=linux ;; #(
    aarch64-*-freebsd*) :
      arch=arm64; system=freebsd ;; #(
@@ -57,7 +75,17 @@ $NetBSD$
    x86_64-*-cygwin*) :
      arch=amd64; system=cygwin ;; #(
    riscv64-*-linux*) :
-@@ -14028,7 +14040,7 @@ fi
+@@ -13947,6 +13963,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" ;; #(
+@@ -14028,7 +14047,7 @@ fi
  # for the moment, to be backward-compatible
  
  case $host in #(
diff --git a/ocaml/patches/patch-testsuite_tests_lib-systhreads_testyield.ml b/ocaml/patches/patch-testsuite_tests_lib-systhreads_testyield.ml
new file mode 100644
index 0000000000..f53fc3ac39
--- /dev/null
+++ b/ocaml/patches/patch-testsuite_tests_lib-systhreads_testyield.ml
@@ -0,0 +1,18 @@
+$NetBSD$
+
+On NetBSD, the "thread scheduler" appears to just schedule two
+threads out of 4 when all they in essence to is "yield", and not
+do round-robin scheduling, causing the test to loop.  Reduce the
+number of threads in the test to 2.
+
+--- testsuite/tests/lib-systhreads/testyield.ml.orig	2020-09-01 12:47:58.000000000 +0000
++++ testsuite/tests/lib-systhreads/testyield.ml
+@@ -8,7 +8,7 @@
+    *** native
+ *)
+ 
+-let threads = 4
++let threads = 2
+ 
+ let are_ready = ref 0
+ 


Home | Main Index | Thread Index | Old Index