From 4f34985ad8b10ed92e98b7115d7fedff1948bee9 Mon Sep 17 00:00:00 2001 From: Richard W.M. Jones Date: Dec 18 2023 11:07:28 +0000 Subject: Add s390x code generation fix https://github.com/ocaml/ocaml/issues/12829 --- diff --git a/0001-Don-t-add-rpaths-to-libraries.patch b/0001-Don-t-add-rpaths-to-libraries.patch index 92f75dd..b0cb61b 100644 --- a/0001-Don-t-add-rpaths-to-libraries.patch +++ b/0001-Don-t-add-rpaths-to-libraries.patch @@ -1,7 +1,7 @@ From 799bf9088c131fc71626a48e9987e4d44a2f0194 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 24 Jun 2014 10:00:15 +0100 -Subject: [PATCH 1/3] Don't add rpaths to libraries. +Subject: [PATCH 1/4] 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 d2d6a4b..d3d927d 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 f2b875e8201efed22267136096b1e5df97f99f84 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 29 May 2012 20:44:18 +0100 -Subject: [PATCH 2/3] configure: Allow user defined C compiler flags. +Subject: [PATCH 2/4] configure: Allow user defined C compiler flags. --- configure.ac | 8 ++++++-- diff --git a/0003-Update-framepointers-tests-to-avoid-false-positive-w.patch b/0003-Update-framepointers-tests-to-avoid-false-positive-w.patch index 80e51e0..4ee59a8 100644 --- a/0003-Update-framepointers-tests-to-avoid-false-positive-w.patch +++ b/0003-Update-framepointers-tests-to-avoid-false-positive-w.patch @@ -1,7 +1,7 @@ From ba44a9c29771aacf44222a2ff63e7bd6034dd92c Mon Sep 17 00:00:00 2001 From: Fabrice Buoro Date: Fri, 10 Mar 2023 09:36:22 -0700 -Subject: [PATCH 3/3] Update framepointers tests to avoid false positive with +Subject: [PATCH 3/4] Update framepointers tests to avoid false positive with inlined C functions --- diff --git a/0004-Fix-s390x-stack-reallocation-code-in-PIC-mode.patch b/0004-Fix-s390x-stack-reallocation-code-in-PIC-mode.patch new file mode 100644 index 0000000..16c63f9 --- /dev/null +++ b/0004-Fix-s390x-stack-reallocation-code-in-PIC-mode.patch @@ -0,0 +1,26 @@ +From 81d3fb3e20afede32298e4d3e78bcebf6a22858a Mon Sep 17 00:00:00 2001 +From: Vincent Laviron +Date: Fri, 15 Dec 2023 10:00:52 +0100 +Subject: [PATCH 4/4] Fix s390x stack reallocation code in PIC mode + +(cherry picked from commit c40a955c029a203d0d7f05718e297e66987ec87f) +--- + asmcomp/s390x/emit.mlp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/asmcomp/s390x/emit.mlp b/asmcomp/s390x/emit.mlp +index 35ade079f6..0212cf3b00 100644 +--- a/asmcomp/s390x/emit.mlp ++++ b/asmcomp/s390x/emit.mlp +@@ -751,7 +751,7 @@ let fundecl fundecl = + ` lay %r15, -8(%r15)\n`; + ` stg %r14, 0(%r15)\n`; + ` lgfi %r12, {emit_int s}\n`; +- ` brasl %r14, {emit_symbol "caml_call_realloc_stack"}\n`; ++ emit_call "caml_call_realloc_stack"; + ` lg %r14, 0(%r15)\n`; + ` la %r15, 8(%r15)\n`; + ` brcl 15, {emit_label ret}\n` +-- +2.43.0 + diff --git a/ocaml.spec b/ocaml.spec index 92dcff1..4de70ea 100644 --- a/ocaml.spec +++ b/ocaml.spec @@ -43,7 +43,7 @@ ExcludeArch: %{ix86} Name: ocaml Version: 5.1.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: OCaml compiler and programming environment @@ -77,6 +77,10 @@ Patch: 0002-configure-Allow-user-defined-C-compiler-flags.patch # https://github.com/ocaml/ocaml/pull/11594 Patch: 0003-Update-framepointers-tests-to-avoid-false-positive-w.patch +# https://github.com/ocaml/ocaml/issues/12829 +# https://github.com/ocaml/ocaml/pull/12831 +Patch: 0004-Fix-s390x-stack-reallocation-code-in-PIC-mode.patch + BuildRequires: make BuildRequires: git BuildRequires: gcc @@ -466,6 +470,10 @@ hardlink -t $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs %changelog +* Mon Dec 18 2023 Richard W.M. Jones - 5.1.1-2 +- Add s390x code generation fix + https://github.com/ocaml/ocaml/issues/12829 + * Mon Dec 11 2023 Richard W.M. Jones - 5.1.1-1 - New upstream version 5.1.1 (RHBZ#2239227)