public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/ocaml] rawhide: New upstream version 5.5.0 (RHBZ#2442622)
@ 2026-07-09 14:36 Jerry James
  0 siblings, 0 replies; only message in thread
From: Jerry James @ 2026-07-09 14:36 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/ocaml
            Branch : rawhide
            Commit : b015f12145879ed9da0317639500d50b601deedf
            Author : Jerry James <loganjerry@gmail.com>
            Date   : 2026-07-09T08:36:23-06:00
            Stats  : +26/-250 in 5 file(s)
            URL    : https://src.fedoraproject.org/rpms/ocaml/c/b015f12145879ed9da0317639500d50b601deedf?branch=rawhide

            Log:
            New upstream version 5.5.0 (RHBZ#2442622)

- Drop upstreamed fix for arm64 frame pointers
- Reenable LTO
- Move ld.conf, libasmrun, and libcamlrun to ocaml-runtime
- Drop hardlink dependency; rpm now does this by default
- Drop unused utilx-linux dependency

---
diff --git a/0001-Don-t-add-rpaths-to-libraries.patch b/0001-Don-t-add-rpaths-to-libraries.patch
index 03c90a8..6bf857a 100644
--- a/0001-Don-t-add-rpaths-to-libraries.patch
+++ b/0001-Don-t-add-rpaths-to-libraries.patch
@@ -1,7 +1,7 @@
 From 04e523e937625bf30d775681c11e00f6dc6fc00a Mon Sep 17 00:00:00 2001
 From: "Richard W.M. Jones" <rjones@redhat.com>
 Date: Tue, 24 Jun 2014 10:00:15 +0100
-Subject: [PATCH 1/3] Don't add rpaths to libraries.
+Subject: [PATCH 1/2] Don't add rpaths to libraries.
 
 ---
  configure.ac | 2 --

diff --git a/0002-configure-Allow-user-defined-C-compiler-flags.patch b/0002-configure-Allow-user-defined-C-compiler-flags.patch
index 6a6b5f7..74de99b 100644
--- a/0002-configure-Allow-user-defined-C-compiler-flags.patch
+++ b/0002-configure-Allow-user-defined-C-compiler-flags.patch
@@ -1,7 +1,7 @@
 From ef549c9a97838331877b139f407269db2a0fc691 Mon Sep 17 00:00:00 2001
 From: "Richard W.M. Jones" <rjones@redhat.com>
 Date: Tue, 29 May 2012 20:44:18 +0100
-Subject: [PATCH 2/3] configure: Allow user defined C compiler flags.
+Subject: [PATCH 2/2] configure: Allow user defined C compiler flags.
 
 ---
  configure.ac | 6 +++++-
@@ -11,18 +11,7 @@ diff --git a/configure.ac b/configure.ac
 index fb60c7c14c..f6a493ccf5 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -997,6 +997,10 @@ AS_CASE([$ocaml_cc_vendor],
-     internal_cflags="$cc_warnings"],
-   [common_cflags="-O"])
- 
-+# Allow CFLAGS and LDFLAGS to be added.
-+common_cflags="$common_cflags $CFLAGS"
-+cclibs="$cclibs $LDFLAGS"
-+
- # Enable SSE2 on x86 mingw to avoid using 80-bit registers.
- AS_CASE([$target],
-   [i686-w64-mingw32*],
-@@ -2904,7 +2908,7 @@ AC_CONFIG_COMMANDS_PRE([
+@@ -3243,7 +3243,7 @@ AC_CONFIG_COMMANDS_PRE([
        [mkexedebugflag="${mkexe_ldflags_prefix}${mkexedebugflag}"])
      mkdll_ldflags=""
      AS_IF([test -n "${LDFLAGS}"],

diff --git a/0003-Merge-pull-request-14589-from-xavierleroy-arm64-addi.patch b/0003-Merge-pull-request-14589-from-xavierleroy-arm64-addi.patch
deleted file mode 100644
index 887ddcd..0000000
--- a/0003-Merge-pull-request-14589-from-xavierleroy-arm64-addi.patch
+++ /dev/null
@@ -1,207 +0,0 @@
-From c2923703d02c6389b6c4594541569bf628e706b1 Mon Sep 17 00:00:00 2001
-From: Xavier Leroy <xavierleroy@users.noreply.github.com>
-Date: Thu, 26 Feb 2026 13:43:07 +0100
-Subject: [PATCH 3/3] Merge pull request #14589 from xavierleroy/arm64-addimm
-
-Fix arm64 additions with large immediates
-
-(cherry picked from commit 4fafb9669b9a5c898b2dda0ae851b2a0e6429c43)
-(cherry picked from commit 6cda6d8a928ada5dd0f58de229d3cb193cfdff53)
----
- Changes                |  6 +++
- asmcomp/arm64/emit.mlp | 84 ++++++++++++++++++++----------------------
- 2 files changed, 45 insertions(+), 45 deletions(-)
-
-diff --git a/Changes b/Changes
-index be999a8cc4..4ad8737bb0 100644
---- a/Changes
-+++ b/Changes
-@@ -1,3 +1,9 @@
-+### Bug fixes:
-+
-+- #14574, #14577, #14589: Fix wrong assembly code generated for ARM64
-+  with frame pointer support.
-+  (Xavier Leroy, review by Vincent Laviron, report by Richard Jones)
-+
- OCaml 5.4.1 (17 February 2026)
- ------------------------------
- 
-diff --git a/asmcomp/arm64/emit.mlp b/asmcomp/arm64/emit.mlp
-index c821310638..3f64eebc05 100644
---- a/asmcomp/arm64/emit.mlp
-+++ b/asmcomp/arm64/emit.mlp
-@@ -54,9 +54,11 @@ let emit_label_type lbl ty =
- 
- (* Output a pseudo-register *)
- 
--let emit_reg = function
--    {loc = Reg r} -> emit_string (register_name r)
--  | _ -> fatal_error "Emit.emit_reg"
-+let reg_name = function
-+  | {loc = Reg r} -> register_name r
-+  | _ -> fatal_error "Emit.reg_name"
-+
-+let emit_reg l = emit_string (reg_name l)
- 
- (* Likewise, but with the 32-bit name of the register *)
- 
-@@ -249,16 +251,28 @@ let is_immediate_float bits =
-   let mant = Int64.logand bits 0xF_FFFF_FFFF_FFFFL in
-   exp >= -3 && exp <= 4 && Int64.logand mant 0xF_0000_0000_0000L = mant
- 
-+(* Set [rd] to [rs + n]. *)
-+
-+let emit_addimm_gen rd rs n =
-+  let insn = if n >= 0 then "add" else "sub" in
-+  let n = abs n in
-+  if n <= 0xFFF then
-+    `	{emit_string insn}	{emit_string rd}, {emit_string rs}, #{emit_int n}\n`
-+  else begin
-+    assert (n <= 0xFFF_FFF);
-+    let nl = n land 0xFFF and nh = n land 0xFFF_000 in
-+    `	{emit_string insn}	{emit_string rd}, {emit_string rs}, #{emit_int nh}\n`;
-+    if nl <> 0 then
-+    `	{emit_string insn}	{emit_string rd}, {emit_string rd}, #{emit_int nl}\n`
-+  end
-+
- (* Adjust sp (up or down) by the given byte amount *)
- 
- let emit_stack_adjustment n =
--  let instr = if n < 0 then "sub" else "add" in
--  let m = abs n in
--  assert (m < 0x1_000_000);
--  let ml = m land 0xFFF and mh = m land 0xFFF_000 in
--  if mh <> 0 then `	{emit_string instr}	sp, sp, #{emit_int mh}\n`;
--  if ml <> 0 then `	{emit_string instr}	sp, sp, #{emit_int ml}\n`;
--  if n <> 0 then cfi_adjust_cfa_offset (-n)
-+  if n <> 0 then begin
-+    emit_addimm_gen "sp" "sp" n;
-+    cfi_adjust_cfa_offset (-n)
-+  end
- 
- (* Deallocate the stack frame and reload the return address
-    before a return or tail call *)
-@@ -278,29 +292,11 @@ let output_epilogue env f =
- 
- (* Output add-immediate / sub-immediate / cmp-immediate instructions *)
- 
--let rec emit_addimm rd rs n =
--  if n < 0 then emit_subimm rd rs (-n)
--  else if n <= 0xFFF then
--    `	add	{emit_reg rd}, {emit_reg rs}, #{emit_int n}\n`
--  else begin
--    assert (n <= 0xFFF_FFF);
--    let nl = n land 0xFFF and nh = n land 0xFFF_000 in
--    `	add	{emit_reg rd}, {emit_reg rs}, #{emit_int nh}\n`;
--    if nl <> 0 then
--    `	add	{emit_reg rd}, {emit_reg rd}, #{emit_int nl}\n`
--  end
-+let emit_addimm rd rs n =
-+  emit_addimm_gen (reg_name rd) (reg_name rs) n
- 
--and emit_subimm rd rs n =
--  if n < 0 then emit_addimm rd rs (-n)
--  else if n <= 0xFFF then
--    `	sub	{emit_reg rd}, {emit_reg rs}, #{emit_int n}\n`
--  else begin
--    assert (n <= 0xFFF_FFF);
--    let nl = n land 0xFFF and nh = n land 0xFFF_000 in
--    `	sub	{emit_reg rd}, {emit_reg rs}, #{emit_int nh}\n`;
--    if nl <> 0 then
--      `	sub	{emit_reg rd}, {emit_reg rd}, #{emit_int nl}\n`
--  end
-+let emit_subimm rd rs n =
-+  emit_addimm rd rs (-n)
- 
- let emit_cmpimm rs n =
-   if n >= 0
-@@ -440,9 +436,7 @@ module Size = struct
-   let addsub_size n =
-     let m = abs n in
-     assert (m < 0x1_000_000);
--    let ml = m land 0xFFF and mh = m land 0xFFF_000 in
--    max 1 ((if mh <> 0 then 1 else 0) +
--           (if ml <> 0 then 1 else 0))
-+    if m <= 0xFFF then 1 else if m land 0xFFF = 0 then 1 else 2
- 
-   let stack_adj_size n =
-     (* see emit_stack_adjustment *)
-@@ -451,7 +445,9 @@ module Size = struct
-   let prologue_size f =
-     let stk = initial_stack_offset f in
-     (if stk > 0 then stack_adj_size (-stk) else 0)
--    + (if f.fun_frame_required then (if fp then 2 else 1) else 0)
-+    + (if f.fun_frame_required
-+       then if fp then 1 + addsub_size (stk - 16) else 1
-+       else 0)
- 
-   let epilogue_size f =
-     let stk = initial_stack_offset f in
-@@ -491,7 +487,7 @@ module Size = struct
-       and pre_store =
-         match memory_chunk, assignment, macosx, addressing_mode with
-         | (Word_int | Word_val), true, true, Iindexed 0 -> 0
--        | (Word_int | Word_val), true, true, _ -> 1  (* Compute dest address *)
-+        | (Word_int | Word_val), true, true, Iindexed n -> addsub_size n (* Compute dest address *)
-         | (Word_int | Word_val), true, false, _ -> 1 (* Barrier instruction *)
-         | _ -> 0
-       and store = match memory_chunk with Single -> 2 | _ -> 1 in
-@@ -553,7 +549,7 @@ module Size = struct
-         + begin match lbl1 with None -> 0 | Some _ -> 1 end
-         + begin match lbl2 with None -> 0 | Some _ -> 1 end
-     | Lswitch jumptbl -> 3 + Array.length jumptbl
--    | Lentertrap -> if fp then 1 else 0
-+    | Lentertrap -> if fp then 2 (* over-approximation *) else 0
-     | Ladjust_trap_depth _ -> 0
-     | Lpushtrap _ -> 3
-     | Lpoptrap -> 1
-@@ -694,9 +690,7 @@ let emit_stlr src base addr =
-   let dest_reg =
-     match addr with
-     | Iindexed 0 -> base
--    | Iindexed ofs ->
--        `	add	{emit_reg reg_tmp1}, {emit_reg base}, #{emit_int ofs}\n`;
--        reg_tmp1
-+    | Iindexed ofs -> emit_addimm reg_tmp1 base ofs; reg_tmp1
-     | Ibased _ -> assert false (* Ibased is not emitted under macOS *)
-   in
-   `	stlr	{emit_reg src}, [{emit_reg dest_reg}]\n`
-@@ -721,7 +715,7 @@ let emit_instr env i =
-       if n > 0 then begin
-           emit_stack_adjustment (-n);
-           if env.f.fun_frame_required && fp then
--            `	add	x29,  sp, #{emit_int (n-16)}\n`;
-+            emit_addimm_gen "x29" "sp" (n - 16)
-       end
-     | Lop(Imove | Ispill | Ireload) ->
-         let src = i.arg.(0) and dst = i.res.(0) in
-@@ -1080,7 +1074,7 @@ let emit_instr env i =
-     | Lentertrap ->
-        if fp then begin
-          let delta = (frame_size env) - 16 (* return address + frame pointer *) in
--         `	add	x29, sp, #{emit_int delta}\n`
-+         emit_addimm_gen "x29" "sp" delta
-        end
-     | Ladjust_trap_depth { delta_traps } ->
-         (* each trap occupies 16 bytes on the stack *)
-@@ -1119,7 +1113,7 @@ let emit_instr_debug env i =
-   `{emit_label lbl}:\n`;
-   emit_instr env i;
-   let sz = Size.instr_size env.f i.desc * 4 in
--  `	.ifne (. - {emit_label lbl}) - {emit_int sz}\n`;
-+  `	.ifgt (. - {emit_label lbl}) - {emit_int sz}\n`;
-   `	.error \"Emit.instr_size: instruction length mismatch\"\n`;
-   `	.endif\n`
- 
-@@ -1130,7 +1124,7 @@ let rec emit_all env lbl_start acc i =
-      if debug then begin
-        (* acc measures in units of 32-bit instructions *)
-        let sz = acc * 4 in
--       `	.ifne (. - {emit_label lbl_start}) - {emit_int sz}\n`;
-+       `	.ifgt (. - {emit_label lbl_start}) - {emit_int sz}\n`;
-        `	.error \"Emit.instr_size: instruction length mismatch\"\n`;
-        `	.endif\n`;
-        end
--- 
-2.52.0
-

diff --git a/ocaml.spec b/ocaml.spec
index 65557d4..eabeb25 100644
--- a/ocaml.spec
+++ b/ocaml.spec
@@ -1,13 +1,6 @@
 # Don't add -Wl,-dT,<build dir>
 %undefine _package_note_flags
 
-# OCaml 5.1 broke building with LTO.  A file prims.c is generated with
-# primitive function declarations, all with "void" for their parameter
-# list.  This does not match the real definitions, leading to lots of
-# -Wlto-type-mismatch warnings.  These change the output of the tests,
-# leading to many failed tests.  This is still a problem in 5.3.
-%global _lto_cflags %{nil}
-
 # OCaml has a bytecode backend that works on anything with a C
 # compiler, and a native code backend available on a subset of
 # architectures.  A further subset of architectures support native
@@ -32,7 +25,7 @@ ExcludeArch: %{ix86}
 
 # These are all the architectures that the tests run on.  The tests
 # take a long time to run, so don't run them on slow machines.
-%global test_arches aarch64 %{power64} riscv64 s390x x86_64
+%global test_arches %{arm64} %{power64} %{riscv64} s390x %{x86_64}
 # These are the architectures for which the tests must pass otherwise
 # the build will fail.
 #global test_arches_required aarch64 ppc64le x86_64
@@ -45,8 +38,8 @@ ExcludeArch: %{ix86}
 %global rcver %{nil}
 
 Name:           ocaml
-Version:        5.4.1
-Release:        4%{?dist}
+Version:        5.5.0
+Release:        1%{?dist}
 
 Summary:        OCaml compiler and programming environment
 
@@ -78,26 +71,17 @@ Source2:        ocaml_files.py
 Patch:          0001-Don-t-add-rpaths-to-libraries.patch
 Patch:          0002-configure-Allow-user-defined-C-compiler-flags.patch
 
-# Fix for arm64 frame pointers
-# https://github.com/ocaml/ocaml/issues/14574
-# https://github.com/ocaml/ocaml/pull/14589
-# Upstream 6cda6d8a928ada5dd0f58de229d3cb193cfdff53
-Patch:          0003-Merge-pull-request-14589-from-xavierleroy-arm64-addi.patch
-
 BuildRequires:  make
 BuildRequires:  git-core
 BuildRequires:  gcc
 BuildRequires:  autoconf
 BuildRequires:  gawk
-BuildRequires:  hardlink
 BuildRequires:  perl-interpreter
-BuildRequires:  util-linux
-BuildRequires:  /usr/bin/annocheck
+BuildRequires:  annobin-annocheck
 BuildRequires:  pkgconfig(libzstd)
 
 # Documentation requirements
 BuildRequires:  asciidoc
-BuildRequires:  python3-pygments
 
 # ocamlopt runs gcc to link binaries.  Because Fedora includes
 # hardening flags automatically, redhat-rpm-config is also required.
@@ -142,7 +126,6 @@ and a comprehensive library.
 #   and runtime/md5.c
 License:        LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception AND LicenseRef-Fedora-Public-Domain
 Summary:        OCaml runtime environment
-Requires:       util-linux
 Provides:       ocaml(runtime) = %{version}
 
 # Bundles an MD5 implementation in runtime/caml/md5.h and runtime/md5.c
@@ -313,7 +296,10 @@ make -j1 tests ||:
 
 %install
 %make_install
-perl -pi -e "s|^$RPM_BUILD_ROOT||" $RPM_BUILD_ROOT%{_libdir}/ocaml/ld.conf
+
+# OCaml 5.5.0 uses relative paths in ld.conf by default to support relocatable
+# OCaml, which we don't need.  Overwrite ld.conf with the absolute path.
+echo %{_libdir}/ocaml/stublibs > $RPM_BUILD_ROOT%{_libdir}/ocaml/ld.conf
 
 echo %{version} > $RPM_BUILD_ROOT%{_libdir}/ocaml/fedora-ocaml-release
 
@@ -326,9 +312,6 @@ install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{rpmmacrodir}/macros.ocaml-rpm
 mkdir -p $RPM_BUILD_ROOT%{_rpmconfigdir}/redhat
 install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_rpmconfigdir}/redhat
 
-# Link, rather than copy, identical binaries
-hardlink -t $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs
-
 
 %files
 %license LICENSE
@@ -371,7 +354,6 @@ hardlink -t $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs
 %endif
 
 %{_libdir}/ocaml/expunge
-%{_libdir}/ocaml/ld.conf
 %{_libdir}/ocaml/Makefile.config
 
 %{_libdir}/ocaml/*.a
@@ -379,11 +361,9 @@ hardlink -t $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs
 %{_libdir}/ocaml/*.cmxa
 %{_libdir}/ocaml/*.cmx
 %{_libdir}/ocaml/*.o
-%{_libdir}/ocaml/libasmrun_shared.so
 %endif
 %{_libdir}/ocaml/*.mli
 %{_libdir}/ocaml/sys.ml.in
-%{_libdir}/ocaml/libcamlrun_shared.so
 
 %{_libdir}/ocaml/{dynlink,runtime_events,str,threads,unix}/*.mli
 %if %{native_compiler}
@@ -404,12 +384,18 @@ hardlink -t $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs
 %doc README.html Changes
 %license LICENSE
 %{_bindir}/ocamlrun
+%{_bindir}/*ocamlrun-a100
 %{_bindir}/ocamlrund
+%{_bindir}/*ocamlrund-a100
 %{_bindir}/ocamlruni
+%{_bindir}/*ocamlruni-a100
 %dir %{_libdir}/ocaml
+%{_libdir}/ocaml/libasmrun*.so
+%{_libdir}/ocaml/libcamlrun*.so
 %{_libdir}/ocaml/*.cmo
 %{_libdir}/ocaml/*.cmi
 %{_libdir}/ocaml/*.cma
+%{_libdir}/ocaml/ld.conf
 %{_libdir}/ocaml/stublibs
 %dir %{_libdir}/ocaml/dynlink
 %{_libdir}/ocaml/dynlink/META
@@ -469,6 +455,14 @@ hardlink -t $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs
 
 
 %changelog
+* Tue Jun 23 2026 Jerry James <loganjerry@gmail.com> - 5.5.0-1
+- New upstream version 5.5.0 (RHBZ#2442622)
+- Drop upstreamed fix for arm64 frame pointers
+- Reenable LTO
+- Move ld.conf, libasmrun, and libcamlrun to ocaml-runtime
+- Drop hardlink dependency; rpm now does this by default
+- Drop unused utilx-linux dependency
+
 * Thu Feb 26 2026 Richard W.M. Jones <rjones@redhat.com> - 5.4.1-4
 - Backport fix for arm64 frame pointers
 

diff --git a/sources b/sources
index d5a609d..7c0afd0 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (ocaml-5.4.1.tar.gz) = c44bc429bee4a263b107e60a4ab3b0c9c082ba2d784f63704130551676ce5624061ae1aa280688e3222d9a522555b3cb749eef784ab2145d71c0f19cac773383
+SHA512 (ocaml-5.5.0.tar.gz) = bf13c18cd1fc7b2e5e9623024ea8623710f646ff2fbc0f59dab70e4d4318ed8623bdcc3ec59ce37af07af2b767f520dea23fb474c26297b3e858b6c8e080b4e6

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-09 14:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-09 14:36 [rpms/ocaml] rawhide: New upstream version 5.5.0 (RHBZ#2442622) Jerry James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox