Disable package note misfeature

This commit is contained in:
Richard W.M. Jones 2022-01-26 16:29:56 +00:00
parent 999a7e734e
commit b249a82b37
5 changed files with 43 additions and 4 deletions

View File

@ -1,7 +1,7 @@
From 23f2e84d360208759c7d82b7ff795770ce6cf0b2 Mon Sep 17 00:00:00 2001 From 23f2e84d360208759c7d82b7ff795770ce6cf0b2 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com> From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 24 Jun 2014 10:00:15 +0100 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.
--- ---
utils/config.mlp | 4 ++-- utils/config.mlp | 4 ++--

View File

@ -1,7 +1,7 @@
From 9966786a7389dc6621f2bc2dce7c690c5a38b67d Mon Sep 17 00:00:00 2001 From 9966786a7389dc6621f2bc2dce7c690c5a38b67d Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com> From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 29 May 2012 20:44:18 +0100 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 | 4 ++++ configure.ac | 4 ++++

View File

@ -1,7 +1,7 @@
From 5eff09224929f8fa1a2e19f9a15befd3a4a395ea Mon Sep 17 00:00:00 2001 From 5eff09224929f8fa1a2e19f9a15befd3a4a395ea Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com> From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Fri, 26 Apr 2019 16:16:29 +0100 Date: Fri, 26 Apr 2019 16:16:29 +0100
Subject: [PATCH 3/3] configure: Remove incorrect assumption about Subject: [PATCH 3/4] configure: Remove incorrect assumption about
cross-compiling. cross-compiling.
See https://github.com/ocaml/ocaml/issues/8647#issuecomment-487094390 See https://github.com/ocaml/ocaml/issues/8647#issuecomment-487094390

View File

@ -0,0 +1,31 @@
From acb5dbaa8f8ece825a48814024404a1a6c5ba7b2 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Wed, 26 Jan 2022 15:47:02 +0000
Subject: [PATCH 4/4] configure: Only use OC_* for building executables
Fedora >= 36 fills LD_FLAGS with lots of cruft, particularly stuff for
"package notes" which contains build paths.
In any case it seems pointless having both the OC_* variables and also
including the regular CFLAGS/LDFLAGS. Give me full control over what
ocamlopt uses.
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 07c005f09..19fe3fd1b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -43,7 +43,7 @@ libraries_man_section=3
# at the moment they are not taken into account on Windows, because
# flexlink, which is used to build executables on this platform, can
# not handle them.
-mkexe="\$(CC) \$(OC_CFLAGS) \$(CFLAGS) \$(OC_LDFLAGS) \$(LDFLAGS)"
+mkexe="\$(CC) \$(OC_CFLAGS) \$(OC_LDFLAGS)"
# Flags for building executable files with debugging symbols
mkexedebugflag="-g"
--
2.32.0

View File

@ -1,3 +1,6 @@
# Don't add -Wl,-dT,<build dir>
%undefine _package_note_flags
# OCaml has a bytecode backend that works on anything with a C # OCaml has a bytecode backend that works on anything with a C
# compiler, and a native code backend available on a subset of # compiler, and a native code backend available on a subset of
# architectures. A further subset of architectures support native # architectures. A further subset of architectures support native
@ -31,7 +34,7 @@
Name: ocaml Name: ocaml
Version: 4.13.1 Version: 4.13.1
Release: 2%{?dist} Release: 3%{?dist}
Summary: OCaml compiler and programming environment Summary: OCaml compiler and programming environment
@ -59,6 +62,7 @@ Source0: https://github.com/ocaml/ocaml/archive/%%{version}.tar.gz
Patch0001: 0001-Don-t-add-rpaths-to-libraries.patch Patch0001: 0001-Don-t-add-rpaths-to-libraries.patch
Patch0002: 0002-configure-Allow-user-defined-C-compiler-flags.patch Patch0002: 0002-configure-Allow-user-defined-C-compiler-flags.patch
Patch0003: 0003-configure-Remove-incorrect-assumption-about-cross-co.patch Patch0003: 0003-configure-Remove-incorrect-assumption-about-cross-co.patch
Patch0004: 0004-configure-Only-use-OC_-for-building-executables.patch
BuildRequires: make BuildRequires: make
BuildRequires: git BuildRequires: git
@ -368,6 +372,10 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/ocaml/eventlog_metadata
%changelog %changelog
* Wed Jan 26 2022 Richard W.M. Jones <rjones@redhat.com> - 4.13.1-3
- Disable package note misfeature
- Remove duplicate flags from mkexe
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.13.1-2 * Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.13.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild