Hello community,

here is the log from the commit of package ocaml for openSUSE:Factory checked 
in at 2020-02-26 15:01:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ocaml (Old)
 and      /work/SRC/openSUSE:Factory/.ocaml.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ocaml"

Wed Feb 26 15:01:50 2020 rev:74 rq:779019 version:4.05.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/ocaml/ocaml.changes      2019-11-30 
10:36:26.500178962 +0100
+++ /work/SRC/openSUSE:Factory/.ocaml.new.26092/ocaml.changes   2020-02-26 
15:01:56.240818984 +0100
@@ -1,0 +2,20 @@
+Thu Feb 20 20:20:20 UTC 2020 - [email protected]
+
+- Require current ocaml-rpm-macros
+- Update options for ocaml() Provides/Requires to specify also
+  OCAMLLIB, which is required for ocamlobjinfo and cmx (bsc#1154874)
+- Remove disabling of _lto_cflags, RPM_OPT_FLAGS are not used
+- Use ocaml_standard_library macro instead of _libdir/ocaml
+- Actually make use of 
ocaml-configure-Allow-user-defined-C-compiler-flags.patch
+  and use '-Werror=implicit-function-declaration -Werror=return-type'
+  in built-in CFLAGS for libraries and applications.
+- Add ocaml-assert.patch, backport from 4.06, found by new CFLAGS
+- Add a few desirable patches from 4.05 branch:
+  ocaml-Fixes-for-out-of-range-Ialloc.patch
+  ocaml-In-caml_executable_name-wrong-test-on-the-return-cod.patch
+  ocaml-MPR-7591-frametable-not-8-aligned-on-x86-64-port.patch
+  ocaml-byterun-do-not-alias-function-arguments-to-sigprocma.patch
+- Remove backup files from ocaml-fix_aarch64_build.patch
+- Record absolute path to gcc, cmdline is part of ocamlx() hash
+
+-------------------------------------------------------------------

New:
----
  ocaml-Fixes-for-out-of-range-Ialloc.patch
  ocaml-In-caml_executable_name-wrong-test-on-the-return-cod.patch
  ocaml-MPR-7591-frametable-not-8-aligned-on-x86-64-port.patch
  ocaml-assert.patch
  ocaml-byterun-do-not-alias-function-arguments-to-sigprocma.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ocaml.spec ++++++
--- /var/tmp/diff_new_pack.mwyt8X/_old  2020-02-26 15:01:57.080820660 +0100
+++ /var/tmp/diff_new_pack.mwyt8X/_new  2020-02-26 15:01:57.088820676 +0100
@@ -18,12 +18,16 @@
 #
 
 
-%define _lto_cflags %{nil}
 %define ocaml_base_version 4.05
 #
 # This ensures that the find_provides/find_requires calls ocamlobjinfo 
correctly.
-%global __ocaml_requires_opts -c -f "%{buildroot}%{_bindir}/ocamlrun 
%{buildroot}%{_bindir}/ocamlobjinfo.byte"
-%global __ocaml_provides_opts -f "%{buildroot}%{_bindir}/ocamlrun 
%{buildroot}%{_bindir}/ocamlobjinfo.byte"
+%global __ocaml_requires_opts \
+       -c \
+       -f "%{_bindir}/env OCAMLLIB=%{buildroot}%{ocaml_standard_library} 
%{buildroot}%{_bindir}/ocamlrun %{buildroot}%{_bindir}/ocamlobjinfo.byte" \
+       %{nil}
+%global __ocaml_provides_opts \
+       -f "%{_bindir}/env OCAMLLIB=%{buildroot}%{ocaml_standard_library} 
%{buildroot}%{_bindir}/ocamlrun %{buildroot}%{_bindir}/ocamlobjinfo.byte" \
+       %{nil}
 %bcond_with ocaml_make_testsuite
 
 Name:           ocaml
@@ -35,10 +39,15 @@
 Url:            http://www.ocaml.org
 Source0:        
http://caml.inria.fr/pub/distrib/ocaml-%{ocaml_base_version}/ocaml-%{version}.tar.xz
 Source2:        rpmlintrc
+Patch0:         ocaml-MPR-7591-frametable-not-8-aligned-on-x86-64-port.patch
 Patch1:         ocamldoc-man-th.patch
+Patch2:         ocaml-Fixes-for-out-of-range-Ialloc.patch
+Patch3:         
ocaml-In-caml_executable_name-wrong-test-on-the-return-cod.patch
 # FIX-UPSTREAM pass RPM_OPT_FLAGS to build
 Patch4:         ocaml-configure-Allow-user-defined-C-compiler-flags.patch
 Patch5:         ocaml-3.08.3-gcc4.patch
+Patch6:         
ocaml-byterun-do-not-alias-function-arguments-to-sigprocma.patch
+Patch7:         ocaml-assert.patch
 Patch8:         ocaml-4.05.0-CVE-2018-9838.patch
 # FIX-UPSTREAM backport 'AArch64 GOT fixed' - 
https://github.com/ocaml/ocaml/pull/1330
 Patch9:         ocaml-fix_aarch64_build.patch
@@ -47,14 +56,14 @@
 BuildRequires:  ncurses-devel
 BuildRequires:  pkgconfig
 BuildRequires:  pkgconfig(x11)
-BuildRequires:  ocaml-rpm-macros >= 20191101
+BuildRequires:  ocaml-rpm-macros >= 20200220
 Requires:       ncurses-devel
 Requires:       ocaml(runtime) = %{version}-%{release}
 Obsoletes:      ocaml-docs
 Provides:       ocaml(compiler) = %{ocaml_base_version}
 Provides:       ocaml(ocaml_base_version) = %{ocaml_base_version}
 %if %{ocaml_native_compiler}
-Requires:       gcc
+Requires:       %(type -p gcc | xargs readlink -f)
 Provides:       ocaml(ocaml.opt) = %{ocaml_base_version}
 %endif
 
@@ -151,9 +160,12 @@
 %else
 make_target='world'
 %endif
+env \
+CFLAGS='-Werror=implicit-function-declaration -Werror=return-type' \
 ./configure -bindir %{_bindir} \
-            -libdir %{_libdir}/ocaml \
+            -libdir %{ocaml_standard_library} \
             -no-cplugins \
+            -cc "$(type -p gcc | xargs readlink -f)" \
             -mandir %{_mandir}
 
 make_target+=" -j1"
@@ -417,7 +429,7 @@
        files='files.ocaml.META'
        ;;
        esac
-       d=%{_libdir}/ocaml/${ocamlfind}
+       d=%{ocaml_standard_library}/${ocamlfind}
        f=${d}/META
        mkdir -vp %{buildroot}${d}
        mv "${META}" %{buildroot}${f}
@@ -432,95 +444,95 @@
 %license LICENSE
 %{_bindir}/*
 %{_mandir}/*/*
-%{_libdir}/ocaml/*.a
+%{ocaml_standard_library}/*.a
 %if %{ocaml_native_compiler}
-%{_libdir}/ocaml/*.cmxs
-%{_libdir}/ocaml/*.cmxa
-%{_libdir}/ocaml/*.cmx
-%{_libdir}/ocaml/*.o
+%{ocaml_standard_library}/*.cmxs
+%{ocaml_standard_library}/*.cmxa
+%{ocaml_standard_library}/*.cmx
+%{ocaml_standard_library}/*.o
 %endif
-%{_libdir}/ocaml/*.mli
-%{_libdir}/ocaml/libcamlrun_shared.so
+%{ocaml_standard_library}/*.mli
+%{ocaml_standard_library}/libcamlrun_shared.so
 %if %{ocaml_native_compiler}
-%{_libdir}/ocaml/libasmrun_shared.so
+%{ocaml_standard_library}/libasmrun_shared.so
 %endif
-%{_libdir}/ocaml/vmthreads/*.mli
-%{_libdir}/ocaml/vmthreads/*.a
+%{ocaml_standard_library}/vmthreads/*.mli
+%{ocaml_standard_library}/vmthreads/*.a
 %if %{ocaml_native_compiler}
-%{_libdir}/ocaml/threads/*.a
-%{_libdir}/ocaml/threads/*.cmxa
-%{_libdir}/ocaml/threads/*.cmx
+%{ocaml_standard_library}/threads/*.a
+%{ocaml_standard_library}/threads/*.cmxa
+%{ocaml_standard_library}/threads/*.cmx
 %endif
-%{_libdir}/ocaml/caml
-%{_libdir}/ocaml/Makefile.config
-%{_libdir}/ocaml/VERSION
-%{_libdir}/ocaml/extract_crc
-%{_libdir}/ocaml/camlheader
-%{_libdir}/ocaml/camlheader_ur
-%{_libdir}/ocaml/expunge
-%{_libdir}/ocaml/ld.conf
-%{_libdir}/ocaml/objinfo_helper
-%exclude %{_libdir}/ocaml/graphicsX11.mli
+%{ocaml_standard_library}/caml
+%{ocaml_standard_library}/Makefile.config
+%{ocaml_standard_library}/VERSION
+%{ocaml_standard_library}/extract_crc
+%{ocaml_standard_library}/camlheader
+%{ocaml_standard_library}/camlheader_ur
+%{ocaml_standard_library}/expunge
+%{ocaml_standard_library}/ld.conf
+%{ocaml_standard_library}/objinfo_helper
+%exclude %{ocaml_standard_library}/graphicsX11.mli
 %exclude %{_bindir}/ocamlrun
 %exclude %{_bindir}/ocamldoc*
-%exclude %{_libdir}/ocaml/ocamldoc
+%exclude %{ocaml_standard_library}/ocamldoc
 
 %files runtime
 %{_bindir}/ocamlrun
-%dir %{_libdir}/ocaml
-%{_libdir}/ocaml/*.cmo
-%{_libdir}/ocaml/*.cmi
-%{_libdir}/ocaml/*.cmt
-%{_libdir}/ocaml/*.cmti
-%{_libdir}/ocaml/*.cma
-%{_libdir}/ocaml/stublibs
-%dir %{_libdir}/ocaml/vmthreads
-%{_libdir}/ocaml/vmthreads/*.cmi
-%{_libdir}/ocaml/vmthreads/*.cma
-%{_libdir}/ocaml/vmthreads/*.cmti
-%dir %{_libdir}/ocaml/threads
-%{_libdir}/ocaml/threads/*.cmi
-%{_libdir}/ocaml/threads/*.cma
-%{_libdir}/ocaml/threads/*.cmti
-%exclude %{_libdir}/ocaml/graphicsX11.cmi
-%exclude %{_libdir}/ocaml/topdirs.cmi
-%exclude %{_libdir}/ocaml/topdirs.cmt
-%exclude %{_libdir}/ocaml/topdirs.cmti
+%dir %{ocaml_standard_library}
+%{ocaml_standard_library}/*.cmo
+%{ocaml_standard_library}/*.cmi
+%{ocaml_standard_library}/*.cmt
+%{ocaml_standard_library}/*.cmti
+%{ocaml_standard_library}/*.cma
+%{ocaml_standard_library}/stublibs
+%dir %{ocaml_standard_library}/vmthreads
+%{ocaml_standard_library}/vmthreads/*.cmi
+%{ocaml_standard_library}/vmthreads/*.cma
+%{ocaml_standard_library}/vmthreads/*.cmti
+%dir %{ocaml_standard_library}/threads
+%{ocaml_standard_library}/threads/*.cmi
+%{ocaml_standard_library}/threads/*.cma
+%{ocaml_standard_library}/threads/*.cmti
+%exclude %{ocaml_standard_library}/graphicsX11.cmi
+%exclude %{ocaml_standard_library}/topdirs.cmi
+%exclude %{ocaml_standard_library}/topdirs.cmt
+%exclude %{ocaml_standard_library}/topdirs.cmti
 %doc Changes
 %license LICENSE
 
 %files x11
-%{_libdir}/ocaml/graphicsX11.cmi
-%{_libdir}/ocaml/graphicsX11.mli
+%{ocaml_standard_library}/graphicsX11.cmi
+%{ocaml_standard_library}/graphicsX11.mli
 
 %files source
-%{_libdir}/ocaml/*.ml
+%{ocaml_standard_library}/*.ml
 
 %files ocamldoc -f files.ocamldoc.META
 %{_bindir}/ocamldoc*
-%{_libdir}/ocaml/ocamldoc
+%{ocaml_standard_library}/ocamldoc
 %doc ocamldoc/Changes.txt
 
 %files compiler-libs
-%dir %{_libdir}/ocaml
-%{_libdir}/ocaml/topdirs.cmi
-%{_libdir}/ocaml/topdirs.cmt
-%{_libdir}/ocaml/topdirs.cmti
-%{_libdir}/ocaml/compiler-libs/*.cma
-%{_libdir}/ocaml/compiler-libs/*.cmi
-%{_libdir}/ocaml/compiler-libs/*.cmo
-%{_libdir}/ocaml/compiler-libs/*.cmt
-%{_libdir}/ocaml/compiler-libs/*.cmti
+%dir %{ocaml_standard_library}
+%{ocaml_standard_library}/topdirs.cmi
+%{ocaml_standard_library}/topdirs.cmt
+%{ocaml_standard_library}/topdirs.cmti
+%{ocaml_standard_library}/compiler-libs/*.cma
+%{ocaml_standard_library}/compiler-libs/*.cmi
+%{ocaml_standard_library}/compiler-libs/*.cmo
+%{ocaml_standard_library}/compiler-libs/*.cmt
+%{ocaml_standard_library}/compiler-libs/*.cmti
 
 %files compiler-libs-devel -f files.compiler-libs.META
-%dir %{_libdir}/ocaml/compiler-libs
+%dir %{ocaml_standard_library}/compiler-libs
 %if %{ocaml_native_compiler}
-%{_libdir}/ocaml/compiler-libs/*.a
-%{_libdir}/ocaml/compiler-libs/*.o
-%{_libdir}/ocaml/compiler-libs/*.cmx
-%{_libdir}/ocaml/compiler-libs/*.cmxa
+%{ocaml_standard_library}/compiler-libs/*.a
+%{ocaml_standard_library}/compiler-libs/*.o
+%{ocaml_standard_library}/compiler-libs/*.cmx
+%{ocaml_standard_library}/compiler-libs/*.cmxa
 %endif
-%{_libdir}/ocaml/compiler-libs/*.mli
+%{ocaml_standard_library}/compiler-libs/*.mli
 
 %if %{with ocaml_make_testsuite}
 %check

++++++ ocaml-Fixes-for-out-of-range-Ialloc.patch ++++++
>From 664f0763d37f85e2ec53d6394251b5948dcfa727 Mon Sep 17 00:00:00 2001
From: Mark Shinwell <[email protected]>
Date: Mon, 31 Jul 2017 14:37:47 +0100
Subject: Fixes for out-of-range Ialloc

Cherry-pick of GPR#1271 which was merged on trunk.

Fixes for Ialloc instructions allocating more than Max_young_wosize words in 
the minor heap

Out-of-range Ialloc instructions cause various problems, see in particular GPR 
#1250.
---
 Changes                                     |   5 +
 asmcomp/cmmgen.ml                           |  38 ++--
 asmcomp/selectgen.ml                        |   3 +-
 testsuite/tests/basic-more/pr1271.ml        | 288 ++++++++++++++++++++++++++++
 testsuite/tests/basic-more/pr1271.reference |   2 +
 5 files changed, 317 insertions(+), 19 deletions(-)
 create mode 100644 testsuite/tests/basic-more/pr1271.ml
 create mode 100644 testsuite/tests/basic-more/pr1271.reference

diff --git a/asmcomp/cmmgen.ml b/asmcomp/cmmgen.ml
index 4ac4b40c6..2120d3985 100644
--- a/asmcomp/cmmgen.ml
+++ b/asmcomp/cmmgen.ml
@@ -1641,29 +1641,31 @@ let rec transl env e =
       List.iter (fun f -> Queue.add f functions) fundecls;
       Cconst_symbol lbl
   | Uclosure(fundecls, clos_vars) ->
-      let block_size =
-        fundecls_size fundecls + List.length clos_vars in
       let rec transl_fundecls pos = function
           [] ->
             List.map (transl env) clos_vars
         | f :: rem ->
             Queue.add f functions;
-            let header =
-              if pos = 0
-              then alloc_closure_header block_size f.dbg
-              else alloc_infix_header pos f.dbg in
-            if f.arity = 1 || f.arity = 0 then
-              header ::
-              Cconst_symbol f.label ::
-              int_const f.arity ::
-              transl_fundecls (pos + 3) rem
-            else
-              header ::
-              Cconst_symbol(curry_function f.arity) ::
-              int_const f.arity ::
-              Cconst_symbol f.label ::
-              transl_fundecls (pos + 4) rem in
-      Cop(Calloc, transl_fundecls 0 fundecls, Debuginfo.none)
+            let without_header =
+              if f.arity = 1 || f.arity = 0 then
+                Cconst_symbol f.label ::
+                int_const f.arity ::
+                transl_fundecls (pos + 3) rem
+              else
+                Cconst_symbol(curry_function f.arity) ::
+                int_const f.arity ::
+                Cconst_symbol f.label ::
+                transl_fundecls (pos + 4) rem
+            in
+            if pos = 0 then without_header
+            else (alloc_infix_header pos f.dbg) :: without_header
+      in
+      let dbg =
+        match fundecls with
+        | [] -> Debuginfo.none
+        | fundecl::_ -> fundecl.dbg
+      in
+      make_alloc dbg Obj.closure_tag (transl_fundecls 0 fundecls)
   | Uoffset(arg, offset) ->
       (* produces a valid Caml value, pointing just after an infix header *)
       let ptr = transl env arg in
diff --git a/asmcomp/selectgen.ml b/asmcomp/selectgen.ml
index 7cd8cd5c3..1158fc0d0 100644
--- a/asmcomp/selectgen.ml
+++ b/asmcomp/selectgen.ml
@@ -738,7 +738,8 @@ method emit_expr (env:environment) exp =
                   loc_arg (Proc.loc_external_results rd) in
               self#insert_move_results loc_res rd stack_ofs;
               Some rd
-          | Ialloc { words = _; spacetime_index; label_after_call_gc; } ->
+          | Ialloc { words; spacetime_index; label_after_call_gc; } ->
+              assert (words <= Config.max_young_wosize);
               let rd = self#regs_for typ_val in
               let size = size_expr env (Ctuple new_args) in
               let op =
++++++ ocaml-In-caml_executable_name-wrong-test-on-the-return-cod.patch ++++++
>From 44c67eb438b5dabbc4caa130303d1bcda6488b00 Mon Sep 17 00:00:00 2001
From: Xavier Leroy <[email protected]>
Date: Fri, 25 Aug 2017 17:56:45 +0200
Subject: In caml_executable_name(), wrong test on the return code of
 readlink()

Follow-up to PR#795 "More robust determination of full path to current 
executable"
---
 byterun/unix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/byterun/unix.c b/byterun/unix.c
index a5c5ed457..9aa89c96f 100644
--- a/byterun/unix.c
+++ b/byterun/unix.c
@@ -374,7 +374,7 @@ char * caml_executable_name(void)
     name = caml_stat_alloc(namelen + 1);
     retcode = readlink("/proc/self/exe", name, namelen);
     if (retcode == -1) { caml_stat_free(name); return NULL; }
-    if (retcode <= namelen) break;
+    if (retcode < namelen) break;
     caml_stat_free(name);
     if (namelen >= 1024*1024) return NULL; /* avoid runaway and overflow */
     namelen *= 2;
++++++ ocaml-MPR-7591-frametable-not-8-aligned-on-x86-64-port.patch ++++++
>From 22dbcdfb921b19d171134de90984805622877e55 Mon Sep 17 00:00:00 2001
From: Xavier Leroy <[email protected]>
Date: Sat, 22 Jul 2017 16:32:23 -0400
Subject: MPR#7591: frametable not 8-aligned on x86-64 port

Cherry-pick of 7077b60 from trunk.
---
 Changes                | 7 +++++++
 asmcomp/amd64/emit.mlp | 3 ++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/asmcomp/amd64/emit.mlp b/asmcomp/amd64/emit.mlp
index c3f8692a8..75a785f74 100644
--- a/asmcomp/amd64/emit.mlp
+++ b/asmcomp/amd64/emit.mlp
@@ -1065,8 +1065,9 @@ let end_assembly() =
 
   D.data ();
   emit_global_label "data_end";
-  D.long (const 0);
+  D.qword (const 0);
 
+  D.align 8;                            (* PR#7591 *)
   emit_global_label "frametable";
 
   let setcnt = ref 0 in
++++++ ocaml-assert.patch ++++++
part of commit adcb4497968dbdc1b0db97998488ad20c02fe225 from 4.06
--- a/byterun/caml/minor_gc.h
+++ b/byterun/caml/minor_gc.h
@@ -99,7 +99,7 @@ static inline void add_to_ephe_ref_table
   ephe_ref = tbl->ptr++;
   ephe_ref->ephe = ar;
   ephe_ref->offset = offset;
-  Assert(ephe_ref->offset < Wosize_val(ephe_ref->ephe));
+  CAMLassert(ephe_ref->offset < Wosize_val(ephe_ref->ephe));
 }
 
 static inline void add_to_custom_table (struct caml_custom_table *tbl, value v,
++++++ ocaml-byterun-do-not-alias-function-arguments-to-sigprocma.patch ++++++
>From b35e3d48bc392f764e1edc99ce6a1b1a68358ed4 Mon Sep 17 00:00:00 2001
From: Anil Madhavapeddy <[email protected]>
Date: Wed, 2 May 2018 09:44:10 +0100
Subject: byterun: do not alias function arguments to sigprocmask

Recent gcc versions (e.g. as found in Fedora 28) check that
restrict-qualified parameters do not alias each other in
function calls. One such example that triggers a compile
error is sigprocmask in the bytecode runtime.

The error this changeset fixes is:

```
signals.c: In function 'caml_execute_signal':
signals.c:152:33: error: passing argument 3 to restrict-qualified parameter 
aliases with argument 2 [-Werror=restrict]
   sigprocmask(SIG_BLOCK, &sigs, &sigs);
```

(cherry picked from commit ebcc2f8594138a5ba6b020083fc42d57a914433f)
---
 Changes           | 2 ++
 byterun/signals.c | 8 ++++----
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/byterun/signals.c b/byterun/signals.c
index 6f1811f26..3dc36e494 100644
--- a/byterun/signals.c
+++ b/byterun/signals.c
@@ -144,12 +144,12 @@ void caml_execute_signal(int signal_number, int 
in_signal_handler)
   void* saved_spacetime_trie_node_ptr;
 #endif
 #ifdef POSIX_SIGNALS
-  sigset_t sigs;
+  sigset_t nsigs, sigs;
   /* Block the signal before executing the handler, and record in sigs
      the original signal mask */
-  sigemptyset(&sigs);
-  sigaddset(&sigs, signal_number);
-  sigprocmask(SIG_BLOCK, &sigs, &sigs);
+  sigemptyset(&nsigs);
+  sigaddset(&nsigs, signal_number);
+  sigprocmask(SIG_BLOCK, &nsigs, &sigs);
 #endif
 #if defined(NATIVE_CODE) && defined(WITH_SPACETIME)
   /* We record the signal handler's execution separately, in the same
++++++ ocaml-fix_aarch64_build.patch ++++++
++++ 7352 lines (skipped)
++++ between /work/SRC/openSUSE:Factory/ocaml/ocaml-fix_aarch64_build.patch
++++ and 
/work/SRC/openSUSE:Factory/.ocaml.new.26092/ocaml-fix_aarch64_build.patch


Reply via email to