pkgsrc-WIP-changes archive

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

Synchronised 4.11.1 with pkgsrc, reinstated Solaris patches



Module Name:	pkgsrc-wip
Committed By:	Jaap Boender <jaapb%NetBSD.org@localhost>
Pushed By:	jaapb
Date:		Tue Dec 8 12:12:01 2020 +0100
Changeset:	c77cab4bfc65b32019876b633c7b9d39c1ea8395

Modified Files:
	ocaml/Makefile
	ocaml/buildlink3.mk
	ocaml/distinfo
	ocaml/patches/patch-Makefile
	ocaml/patches/patch-configure
Added Files:
	ocaml/patches/patch-check-linker-version_sh
	ocaml/patches/patch-otherlibs_systhreads_st__stubs.c
	ocaml/patches/patch-runtime_amd64.S
	ocaml/patches/patch-tools_ocamlmklib.ml
Removed Files:
	ocaml/patches/patch-asmrun_amd64.S
	ocaml/patches/patch-tools_ocamlmklib

Log Message:
Synchronised 4.11.1 with pkgsrc, reinstated Solaris patches

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

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

diffstat:
 ocaml/Makefile                                     |  2 +-
 ocaml/buildlink3.mk                                |  2 +-
 ocaml/distinfo                                     | 10 ++--
 ocaml/patches/patch-Makefile                       |  3 ++
 ocaml/patches/patch-asmrun_amd64.S                 | 15 ------
 ocaml/patches/patch-check-linker-version_sh        | 19 +++++++
 ocaml/patches/patch-configure                      | 58 ++++++++++++++++++----
 .../patches/patch-otherlibs_systhreads_st__stubs.c | 16 ++++++
 ocaml/patches/patch-runtime_amd64.S                | 15 ++++++
 ocaml/patches/patch-tools_ocamlmklib               | 52 -------------------
 ocaml/patches/patch-tools_ocamlmklib.ml            | 52 +++++++++++++++++++
 11 files changed, 161 insertions(+), 83 deletions(-)

diffs:
diff --git a/ocaml/Makefile b/ocaml/Makefile
index 010aebafc9..04b9c174bf 100644
--- a/ocaml/Makefile
+++ b/ocaml/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.122 2019/01/07 18:52:23 jaapb Exp $
+# $NetBSD: Makefile,v 1.137 2020/12/08 08:53:16 he Exp $
 
 .include "Makefile.common"
 
diff --git a/ocaml/buildlink3.mk b/ocaml/buildlink3.mk
index 84b16e2244..28e924beee 100644
--- a/ocaml/buildlink3.mk
+++ b/ocaml/buildlink3.mk
@@ -7,7 +7,7 @@ OCAML_BUILDLINK3_MK:=
 
 BUILDLINK_API_DEPENDS.ocaml+=	ocaml>=4.11.1
 BUILDLINK_ABI_DEPENDS.ocaml+=	ocaml>=4.11.1
-BUILDLINK_PKGSRCDIR.ocaml?=	../../lang/ocaml
+BUILDLINK_PKGSRCDIR.ocaml?=	../../wip/ocaml
 #BUILDLINK_DEPMETHOD.ocaml?=	build
 
 BUILDLINK_PASSTHRU_DIRS+=	${BUILDLINK_PREFIX.ocaml}/lib/ocaml
diff --git a/ocaml/distinfo b/ocaml/distinfo
index 7840ea68b8..db1d572937 100644
--- a/ocaml/distinfo
+++ b/ocaml/distinfo
@@ -4,19 +4,21 @@ SHA1 (ocaml-4.11.1.tar.gz) = a3f3d74a43a3d0054f0d0162522499f7d8958560
 RMD160 (ocaml-4.11.1.tar.gz) = 6bdd83aeab8a074cfeffa475fe2db72cbca2d6cf
 SHA512 (ocaml-4.11.1.tar.gz) = 7adc40ab1c4086861619ce7280c75d0d200c398f8a7c2c89b0569a34b4deac8c6857b645340a525f656523cb92c4f73c1329e757b6ed41ea080e9cd540e6cb7b
 Size (ocaml-4.11.1.tar.gz) = 5062453 bytes
-SHA1 (patch-Makefile) = 151fa9e965093dce653e874288c739f8e9253157
+SHA1 (patch-Makefile) = bd0451b5240b087c98747d13f9884d30722a91a8
 SHA1 (patch-Makefile.common.in) = 37d880f7125040fd4a125ff0e24615811ce9c827
 SHA1 (patch-asmcomp_amd64_emit.mlp) = c2b90f50bc3c4bf9817916bdd455a8bfc03cb69b
-SHA1 (patch-asmrun_amd64.S) = d4c33cb14c107ed03bf6a3704bbfe7c2799a048e
-SHA1 (patch-configure) = 01297bb47f876f76181cfb83db71f8897459ea96
+SHA1 (patch-check-linker-version_sh) = c90242556207242ac58499d7f42519a10aedcca4
+SHA1 (patch-configure) = 833ce290f4670a015deba680cb105214f074128a
 SHA1 (patch-lex_Makefile) = 7f1ad4d5852a9a38b9c33ca33728236cc457fa09
 SHA1 (patch-man_Makefile) = b780c026aef5f7e6b22b142fce3ec87ef9d2ab22
 SHA1 (patch-ocamldoc_Makefile) = 0a3c536d1cd9f811a1ef1d7155036b8ddbcf4f4f
 SHA1 (patch-ocamldoc_odoc__messages.ml) = 77f650a5f34f40b9648a8d5091e9aa31efb5734b
 SHA1 (patch-otherlibs_Makefile.otherlibs.common) = 05f14ad2635bfd2ded98ef38ac6e7578b5cfc08e
 SHA1 (patch-otherlibs_systhreads_Makefile) = ff2cf90527bda37474097bb576bccbf7329c4f1d
+SHA1 (patch-otherlibs_systhreads_st__stubs.c) = 3c0aa73f0e128646c01ed3855ee9c5645d5fa3f1
 SHA1 (patch-runtime_Makefile) = 6c70b68791e4c074179aa27dfafb398646b59dcb
+SHA1 (patch-runtime_amd64.S) = d4c33cb14c107ed03bf6a3704bbfe7c2799a048e
 SHA1 (patch-testsuite_tests_lib-systhreads_testyield.ml) = 0f6d35e030de168c6f4aeb126055065ed47878aa
 SHA1 (patch-tools_Makefile) = 69f92a8615ed6f9b33f27546c6a25a1f24995e55
-SHA1 (patch-tools_ocamlmklib) = 9a9c0e3b473f7ba4127fe120cf6dbbdbb3c957f2
+SHA1 (patch-tools_ocamlmklib.ml) = 9a9c0e3b473f7ba4127fe120cf6dbbdbb3c957f2
 SHA1 (patch-yacc_Makefile) = 3d8962a2d447aa7e88e59151d66e2080f7fad1fb
diff --git a/ocaml/patches/patch-Makefile b/ocaml/patches/patch-Makefile
index 55274a31e2..469490273f 100644
--- a/ocaml/patches/patch-Makefile
+++ b/ocaml/patches/patch-Makefile
@@ -1,5 +1,8 @@
 $NetBSD$
 
+Use BSD_INSTALL_* instead of mkdir
+Honor LDFLAGS
+
 --- Makefile.orig	2020-09-01 12:47:58.000000000 +0000
 +++ Makefile
 @@ -61,7 +61,7 @@ INCLUDES=-I utils -I parsing -I typing -
diff --git a/ocaml/patches/patch-asmrun_amd64.S b/ocaml/patches/patch-asmrun_amd64.S
deleted file mode 100644
index fae198405d..0000000000
--- a/ocaml/patches/patch-asmrun_amd64.S
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-asmrun_amd64.S,v 1.1 2018/07/18 00:09:12 joerg Exp $
-
-Fix attributes and entry size for the .rodata mergable constant section
-
---- runtime/amd64.S.orig	2018-07-17 21:24:20.027817665 +0000
-+++ runtime/amd64.S
-@@ -724,7 +724,7 @@ G(caml_system__spacetime_shapes):
- #elif defined(SYS_mingw64) || defined(SYS_cygwin)
-         .section .rdata,"dr"
- #else
--        .section    .rodata.cst8,"a",@progbits
-+        .section    .rodata.cst8,"aM",@progbits,8
- #endif
-         .globl  G(caml_negf_mask)
-         .align  SIXTEEN_ALIGN
diff --git a/ocaml/patches/patch-check-linker-version_sh b/ocaml/patches/patch-check-linker-version_sh
new file mode 100644
index 0000000000..2728a4c97b
--- /dev/null
+++ b/ocaml/patches/patch-check-linker-version_sh
@@ -0,0 +1,19 @@
+$NetBSD: patch-check-linker-version_sh,v 1.1 2020/05/23 20:33:52 rillig Exp $
+
+Fix bashisms.
+
+--- testsuite/tests/unwind/check-linker-version.sh.orig	2020-03-18 15:02:03.000000000 +0000
++++ testsuite/tests/unwind/check-linker-version.sh	2020-05-02 15:40:01.333410019 +0000
+@@ -3,10 +3,10 @@
+ LDFULL="`ld -v 2>&1`"
+ LD="`echo $LDFULL | grep -o \"ld64-[0-9]*\"`"
+ LDVER="`echo $LD | sed \"s/ld64-//\"`"
+-if [[ -z "$LD" ]]; then
++if [ -z "$LD" ]; then
+   echo "unknown linker: pattern ld64-[0-9]* not found in 'ld -v' output";
+   test_result=${TEST_SKIP};
+-elif [[ $LDVER -lt 224 ]]; then
++elif [ $LDVER -lt 224 ]; then
+   echo "ld version is $LDVER, only 224 or above are supported";
+   test_result=${TEST_SKIP};
+ else
diff --git a/ocaml/patches/patch-configure b/ocaml/patches/patch-configure
index 288bb14c27..ddecc9815a 100644
--- a/ocaml/patches/patch-configure
+++ b/ocaml/patches/patch-configure
@@ -1,5 +1,12 @@
 $NetBSD$
 
+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	2020-09-01 12:47:58.000000000 +0000
 +++ configure
 @@ -13476,7 +13476,7 @@ sharedlib_cflags=''
@@ -7,11 +14,28 @@ $NetBSD$
  rpath=''
  mksharedlibrpath=''
 -natdynlinkopts=""
-+natdynlinkopts="-L/usr/lib -R/usr/lib -R/usr/pkg/lib"
++natdynlinkopts="-L/usr/lib -R/usr/lib -R${PREFIX}/lib"
  
  if test x"$enable_shared" != "xno"; then :
    case $host in #(
-@@ -13562,6 +13562,8 @@ if test x"$enable_shared" != "xno"; then
+@@ -13512,9 +13512,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
+ 
+@@ -13562,6 +13567,8 @@ if test x"$enable_shared" != "xno"; then
      natdynlink=true ;; #(
    i[3456]86-*-netbsd*) :
      natdynlink=true ;; #(
@@ -20,7 +44,7 @@ $NetBSD$
    x86_64-*-netbsd*) :
      natdynlink=true ;; #(
    i386-*-gnu0.3) :
-@@ -13572,12 +13574,16 @@ if test x"$enable_shared" != "xno"; then
+@@ -13572,12 +13579,16 @@ if test x"$enable_shared" != "xno"; then
      natdynlink=true ;; #(
    arm*-*-freebsd*) :
      natdynlink=true ;; #(
@@ -37,7 +61,7 @@ $NetBSD$
    riscv*-*-linux*) :
      natdynlink=true ;; #(
    *) :
-@@ -13649,6 +13655,8 @@ case $host in #(
+@@ -13649,6 +13660,8 @@ case $host in #(
      arch=i386; system=beos ;; #(
    i[3456]86-*-cygwin) :
      arch=i386; system=cygwin ;; #(
@@ -46,7 +70,7 @@ $NetBSD$
    i[3456]86-*-gnu*) :
      arch=i386; system=gnu ;; #(
    i[3456]86-*-mingw32) :
-@@ -13665,6 +13673,8 @@ case $host in #(
+@@ -13665,6 +13678,8 @@ case $host in #(
  else
    model=ppc
  fi; system=elf ;; #(
@@ -55,7 +79,7 @@ $NetBSD$
    s390x*-*-linux*) :
      arch=s390x; model=z10; system=elf ;; #(
    armv6*-*-linux-gnueabihf) :
-@@ -13683,6 +13693,10 @@ fi; system=elf ;; #(
+@@ -13683,6 +13698,10 @@ fi; system=elf ;; #(
      arch=arm; model=armv6; system=linux_eabi ;; #(
    armv6*-*-freebsd*) :
      arch=arm; model=armv6; system=freebsd ;; #(
@@ -66,7 +90,7 @@ $NetBSD$
    earmv6*-*-netbsd*) :
      arch=arm; model=armv6; system=netbsd ;; #(
    earmv7*-*-netbsd*) :
-@@ -13719,6 +13733,8 @@ fi; system=elf ;; #(
+@@ -13719,8 +13738,12 @@ fi; system=elf ;; #(
      arch=arm64; system=linux ;; #(
    aarch64-*-freebsd*) :
      arch=arm64; system=freebsd ;; #(
@@ -74,18 +98,22 @@ $NetBSD$
 +    arch=arm64; system=netbsd ;; #(
    x86_64-*-cygwin*) :
      arch=amd64; system=cygwin ;; #(
++  x86_64-*-solaris*) :
++    arch=amd64; system=solaris ;; #(
    riscv64-*-linux*) :
-@@ -13947,6 +13963,9 @@ esac ;; #(
+     arch=riscv; model=riscv64; system=linux
+  ;; #(
+@@ -13947,6 +13970,9 @@ esac ;; #(
    *) :
       ;;
  esac ;; #(
-+  power,netbsd) :
++  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
+@@ -14028,7 +14054,7 @@ fi
  # for the moment, to be backward-compatible
  
  case $host in #(
@@ -94,3 +122,13 @@ $NetBSD$
       ;; #(
    *) :
      has_c99_float_ops=true
+@@ -14317,6 +14343,9 @@ case $host in #(
+   *-*-mingw32|*-pc-windows) :
+     cclibs="$cclibs -lws2_32"
+     sockets=true ;; #(
++  *-*-solaris*) :
++    cclibs="$cclibs -lnsl -lsocket"
++    sockets=true ;; #(
+   *-*-haiku) :
+     cclibs="$cclibs -lnetwork"
+     sockets=true ;; #(
diff --git a/ocaml/patches/patch-otherlibs_systhreads_st__stubs.c b/ocaml/patches/patch-otherlibs_systhreads_st__stubs.c
new file mode 100644
index 0000000000..5d33a00c40
--- /dev/null
+++ b/ocaml/patches/patch-otherlibs_systhreads_st__stubs.c
@@ -0,0 +1,16 @@
+$NetBSD$
+
+Make the POSIX sigwait visible on SmartOS
+
+--- otherlibs/systhreads/st_stubs.c.orig	2020-09-01 12:47:58.000000000 +0000
++++ otherlibs/systhreads/st_stubs.c
+@@ -15,6 +15,9 @@
+ 
+ #define CAML_INTERNALS
+ 
++/* Needed for sigwait */
++#define _POSIX_PTHREAD_SEMANTICS
++
+ #include "caml/alloc.h"
+ #include "caml/backtrace.h"
+ #include "caml/callback.h"
diff --git a/ocaml/patches/patch-runtime_amd64.S b/ocaml/patches/patch-runtime_amd64.S
new file mode 100644
index 0000000000..fae198405d
--- /dev/null
+++ b/ocaml/patches/patch-runtime_amd64.S
@@ -0,0 +1,15 @@
+$NetBSD: patch-asmrun_amd64.S,v 1.1 2018/07/18 00:09:12 joerg Exp $
+
+Fix attributes and entry size for the .rodata mergable constant section
+
+--- runtime/amd64.S.orig	2018-07-17 21:24:20.027817665 +0000
++++ runtime/amd64.S
+@@ -724,7 +724,7 @@ G(caml_system__spacetime_shapes):
+ #elif defined(SYS_mingw64) || defined(SYS_cygwin)
+         .section .rdata,"dr"
+ #else
+-        .section    .rodata.cst8,"a",@progbits
++        .section    .rodata.cst8,"aM",@progbits,8
+ #endif
+         .globl  G(caml_negf_mask)
+         .align  SIXTEEN_ALIGN
diff --git a/ocaml/patches/patch-tools_ocamlmklib b/ocaml/patches/patch-tools_ocamlmklib
deleted file mode 100644
index fd96442196..0000000000
--- a/ocaml/patches/patch-tools_ocamlmklib
+++ /dev/null
@@ -1,52 +0,0 @@
-$NetBSD$
-
-Add ELF mode support to ocamlmklib
-
---- tools/ocamlmklib.ml.orig	2019-02-08 14:34:11.000000000 +0000
-+++ tools/ocamlmklib.ml
-@@ -43,6 +43,7 @@ and c_objs = ref []         (* .o, .a, .
- and caml_libs = ref []      (* -cclib to pass to ocamlc, ocamlopt *)
- and caml_opts = ref []      (* -ccopt to pass to ocamlc, ocamlopt *)
- and dynlink = ref supports_shared_libraries
-+and elfmode = ref false     (* do not add C link lib path to run-time path *)
- and failsafe = ref false    (* whether to fall back on static build only *)
- and c_libs = ref []         (* libs to pass to mksharedlib and ocamlc -cclib *)
- and c_Lopts = ref []      (* options to pass to mksharedlib and ocamlc -cclib *)
-@@ -110,6 +111,8 @@ let parse_arguments argv =
-       c_objs := s :: !c_objs
-     else if s = "-cclib" then
-       caml_libs := next_arg s :: "-cclib" :: !caml_libs
-+		else if starts_with s "-Wl,-z" then
-+			c_libs := s :: !c_libs
-     else if s = "-ccopt" then
-       caml_opts := next_arg s :: "-ccopt" :: !caml_opts
-     else if s = "-custom" then
-@@ -136,8 +139,9 @@ let parse_arguments argv =
-       c_libs := s :: !c_libs
-     else if starts_with s "-L" then
-      (c_Lopts := s :: !c_Lopts;
--      let l = chop_prefix s "-L" in
--      if not (Filename.is_relative l) then rpath := l :: !rpath)
-+		 if not !elfmode then
-+     (let l = chop_prefix s "-L" in
-+      if not (Filename.is_relative l) then rpath := l :: !rpath))
-     else if s = "-ocamlcflags" then
-       ocamlc_opts := next_arg s :: !ocamlc_opts
-     else if s = "-ocamlc" then
-@@ -152,6 +156,8 @@ let parse_arguments argv =
-       output_c := next_arg s
-     else if s = "-dllpath" || s = "-R" || s = "-rpath" then
-       rpath := next_arg s :: !rpath
-+		else if s = "-elfmode" then
-+		  elfmode := true
-     else if starts_with s "-R" then
-       rpath := chop_prefix s "-R" :: !rpath
-     else if s = "-Wl,-rpath" then
-@@ -200,6 +206,7 @@ Usage: ocamlmklib [options] <.cmo|.cma|.
- \n  -custom        Disable dynamic loading\
- \n  -g             Build with debug information\
- \n  -dllpath <dir> Add <dir> to the run-time search path for DLLs\
-+\n  -elfmode       Do not add link-time search path to run-time path\
- \n  -F<dir>        Specify a framework directory (MacOSX)\
- \n  -framework <name>    Use framework <name> (MacOSX)\
- \n  -help          Print this help message and exit\
diff --git a/ocaml/patches/patch-tools_ocamlmklib.ml b/ocaml/patches/patch-tools_ocamlmklib.ml
new file mode 100644
index 0000000000..fd96442196
--- /dev/null
+++ b/ocaml/patches/patch-tools_ocamlmklib.ml
@@ -0,0 +1,52 @@
+$NetBSD$
+
+Add ELF mode support to ocamlmklib
+
+--- tools/ocamlmklib.ml.orig	2019-02-08 14:34:11.000000000 +0000
++++ tools/ocamlmklib.ml
+@@ -43,6 +43,7 @@ and c_objs = ref []         (* .o, .a, .
+ and caml_libs = ref []      (* -cclib to pass to ocamlc, ocamlopt *)
+ and caml_opts = ref []      (* -ccopt to pass to ocamlc, ocamlopt *)
+ and dynlink = ref supports_shared_libraries
++and elfmode = ref false     (* do not add C link lib path to run-time path *)
+ and failsafe = ref false    (* whether to fall back on static build only *)
+ and c_libs = ref []         (* libs to pass to mksharedlib and ocamlc -cclib *)
+ and c_Lopts = ref []      (* options to pass to mksharedlib and ocamlc -cclib *)
+@@ -110,6 +111,8 @@ let parse_arguments argv =
+       c_objs := s :: !c_objs
+     else if s = "-cclib" then
+       caml_libs := next_arg s :: "-cclib" :: !caml_libs
++		else if starts_with s "-Wl,-z" then
++			c_libs := s :: !c_libs
+     else if s = "-ccopt" then
+       caml_opts := next_arg s :: "-ccopt" :: !caml_opts
+     else if s = "-custom" then
+@@ -136,8 +139,9 @@ let parse_arguments argv =
+       c_libs := s :: !c_libs
+     else if starts_with s "-L" then
+      (c_Lopts := s :: !c_Lopts;
+-      let l = chop_prefix s "-L" in
+-      if not (Filename.is_relative l) then rpath := l :: !rpath)
++		 if not !elfmode then
++     (let l = chop_prefix s "-L" in
++      if not (Filename.is_relative l) then rpath := l :: !rpath))
+     else if s = "-ocamlcflags" then
+       ocamlc_opts := next_arg s :: !ocamlc_opts
+     else if s = "-ocamlc" then
+@@ -152,6 +156,8 @@ let parse_arguments argv =
+       output_c := next_arg s
+     else if s = "-dllpath" || s = "-R" || s = "-rpath" then
+       rpath := next_arg s :: !rpath
++		else if s = "-elfmode" then
++		  elfmode := true
+     else if starts_with s "-R" then
+       rpath := chop_prefix s "-R" :: !rpath
+     else if s = "-Wl,-rpath" then
+@@ -200,6 +206,7 @@ Usage: ocamlmklib [options] <.cmo|.cma|.
+ \n  -custom        Disable dynamic loading\
+ \n  -g             Build with debug information\
+ \n  -dllpath <dir> Add <dir> to the run-time search path for DLLs\
++\n  -elfmode       Do not add link-time search path to run-time path\
+ \n  -F<dir>        Specify a framework directory (MacOSX)\
+ \n  -framework <name>    Use framework <name> (MacOSX)\
+ \n  -help          Print this help message and exit\


Home | Main Index | Thread Index | Old Index