+++ /dev/null
-From: Stefano Zacchiroli <zack@debian.org>
-Date: Tue, 19 May 2009 17:24:14 +0200
-Subject: Don't use rpath
-
----
- tools/ocamlmklib.ml | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/tools/ocamlmklib.ml b/tools/ocamlmklib.ml
-index 1cf8ef9..37c7f41 100644
---- a/tools/ocamlmklib.ml
-+++ b/tools/ocamlmklib.ml
-@@ -55,6 +55,11 @@ and rpath = ref [] (* rpath options *)
- and debug = ref false (* -g option *)
- and verbose = ref false
-
-+(* Debian specific: inhibit rpath *)
-+let byteccrpath = ""
-+and nativeccrpath = ""
-+and mksharedlibrpath = ""
-+
- let starts_with s pref =
- String.length s >= String.length pref &&
- String.sub s 0 (String.length pref) = pref
Forwarded: no
Last-Update: <2021-12-21>
---
- configure.ac | 3 +++
- 1 file changed, 3 insertions(+)
+ configure.ac | 4 ++++
+ 1 file changed, 4 insertions(+)
diff --git a/configure.ac b/configure.ac
-index ebb8bbd..d27d47b 100644
+index 0c9d638..c62f23d 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -987,6 +987,9 @@ AS_IF([test x"$enable_shared" != "xno"],
- natdynlinkopts="-Wl,-E"
- supports_shared_libraries=true])])
+@@ -1249,6 +1249,10 @@ AS_CASE([$host],
+ [oc_ldflags="$oc_ldflags -Wl,-z,nobtcfi"
+ natdynlinkopts="$natdynlinkopts -Wl,-z,nobtcfi"])
++# Use CCLINKFLAGS for linking all executables and shared libraries
++
+mksharedlib="$mksharedlib $CCLINKFLAGS"
+mkexe="$mkexe $CCLINKFLAGS"
-+
- AS_IF([test -z "$mkmaindll"], [mkmaindll=$mksharedlib])
# Configure native dynlink
+
Forwarded: https://github.com/ocaml/ocaml/pull/8842
---
- otherlibs/unix/envir.c | 2 +-
+ otherlibs/unix/envir_unix.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/otherlibs/unix/envir.c b/otherlibs/unix/envir.c
-index 3ad4b9c..bdc4193 100644
---- a/otherlibs/unix/envir.c
-+++ b/otherlibs/unix/envir.c
-@@ -39,7 +39,7 @@ CAMLprim value unix_environment_unsafe(value unit)
+diff --git a/otherlibs/unix/envir_unix.c b/otherlibs/unix/envir_unix.c
+index cef6cb0..977db1c 100644
+--- a/otherlibs/unix/envir_unix.c
++++ b/otherlibs/unix/envir_unix.c
+@@ -39,7 +39,7 @@ CAMLprim value caml_unix_environment_unsafe(value unit)
static char **secure_environ(void)
{
1 file changed, 10 insertions(+)
diff --git a/configure.ac b/configure.ac
-index d27d47b..48b438a 100644
+index c62f23d..d5d432a 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -1199,6 +1199,16 @@ AS_CASE([$arch],
- [common_cflags="-no-pie $common_cflags"],
- [])])
+@@ -1502,6 +1502,16 @@ AS_CASE([$arch],
+ # Alpine and other musl-based Linux distributions
+ [common_cflags="-no-pie $common_cflags"])])
+# Disable DT_TEXTREL warnings on Linux i386
+# See https://github.com/ocaml/ocaml/issues/9800
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/driver/main_args.ml b/driver/main_args.ml
-index 60db017..a46e50e 100644
+index 732dea3..65239ce 100644
--- a/driver/main_args.ml
+++ b/driver/main_args.ml
-@@ -2005,7 +2005,6 @@ third-party libraries such as Lwt, but with a different API."
+@@ -1903,7 +1903,6 @@ third-party libraries such as Lwt, but with a different API."
include Core
include Compiler
let _compat_32 = set bytecode_compatible_32
let _dcamlprimc = set keep_camlprimc_file
let _dinstr = set dump_instr
let _dllib s = Compenv.defer (ProcessDLLs (Misc.rev_split_words s))
-@@ -2024,6 +2023,15 @@ third-party libraries such as Lwt, but with a different API."
+@@ -1922,6 +1921,15 @@ third-party libraries such as Lwt, but with a different API."
let _use_runtime s = use_runtime := s
let _v () = Compenv.print_version_and_library "compiler"
let _vmthread () = Compenv.fatal vmthread_removed_message
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/autogen b/tools/autogen
-index 69cc910..41be702 100755
+index cd9f6d2..7fd2f92 100755
--- a/tools/autogen
+++ b/tools/autogen
@@ -16,7 +16,7 @@
1 file changed, 1 insertion(+)
diff --git a/api_docgen/ocamldoc/Makefile b/api_docgen/ocamldoc/Makefile
-index 6af89ab..d4f84ae 100644
+index 5b1f894..71f5a70 100644
--- a/api_docgen/ocamldoc/Makefile
+++ b/api_docgen/ocamldoc/Makefile
-@@ -62,6 +62,7 @@ build/libref/%.odoc: build/%.mld | build/libref
+@@ -61,6 +61,7 @@ build/libref/%.odoc: build/%.mld | build/libref
ALL_COMPILED_DOC=$(ALL_DOC:%=build/%.odoc)
build/man/Stdlib.3o: $(ALL_COMPILED_DOC) | build/man
- $(OCAMLDOC_RUN) -man -d build/man -man-mini \
+ $(V_OCAMLDOC)$(OCAMLDOC_RUN) -man -d build/man -man-mini \
+ -man-section 3o \
-nostdlib -hide Stdlib -lib Stdlib -t "OCaml library" \
$(addprefix -load , $(ALL_COMPILED_DOC))
Bug-Debian: https://bugs.debian.org/1030785
Forwarded: not-needed
---
- configure.ac | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
+ configure.ac | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
-index 48b438a..20f0873 100644
+index d5d432a..467099f 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -37,7 +37,7 @@ CONFIGURE_ARGS="$*"
- # 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) \$(filter-out -fdebug-prefix-map=% -ffile-prefix-map=%,\$(CFLAGS)) \$(OC_LDFLAGS) \$(LDFLAGS)"
-
- # Flags for building executable files with debugging symbols
- mkexedebugflag="-g"
-@@ -1980,7 +1980,7 @@ AS_IF([test x"$DEFAULT_STRING" = "xunsafe"],
+@@ -36,7 +36,7 @@ CONFIGURE_ARGS="$*"
+ # rely on $CFLAGS because these cannot be processed by flexlink (and are not
+ # passed)
+ mkexe_cmd='$(CC)'
+-mkexe_cflags='$(OC_CFLAGS) $(CFLAGS)'
++mkexe_cflags='$(OC_CFLAGS) $(filter-out -fdebug-prefix-map=% -ffile-prefix-map=%,\$(CFLAGS))'
+ mkexe_extra_flags=''
+ mkexe_via_cc_extra_cmd=''
+ mkexe_ldflags_prefix=''
+@@ -2555,7 +2555,7 @@ AS_IF([test "$ccomptype" != "msvc"],
oc_cflags="$common_cflags $internal_cflags"
oc_cppflags="$common_cppflags $internal_cppflags"
--ocamlc_cflags="$common_cflags $sharedlib_cflags \$(CFLAGS)"
-+ocamlc_cflags="$common_cflags $sharedlib_cflags \$(filter-out -fdebug-prefix-map=% -ffile-prefix-map=%,\$(CFLAGS))"
- ocamlc_cppflags="$common_cppflags \$(CPPFLAGS)"
- cclibs="$cclibs $mathlib"
+-ocamlc_cflags="$ocamlc_cflags $common_cflags $sharedlib_cflags $CFLAGS"
++ocamlc_cflags="$ocamlc_cflags $common_cflags $sharedlib_cflags $(printf "%s" "$CFLAGS" | sed -r -e 's/-fdebug-prefix-map=\S+//' -e 's/-ffile-prefix-map=\S+//')"
+ ocamlc_cppflags="$common_cppflags $CPPFLAGS"
+ AS_CASE([$host],
+@@ -2652,7 +2652,7 @@ AC_CONFIG_COMMANDS_PRE([
+ mkexe_exp="$mkexe_cmd_exp"
+ AS_IF([test -n "$mkexe_cflags"],
+ [mkexe="$mkexe $mkexe_cflags"
+- mkexe_exp="$mkexe_exp $common_cflags $CFLAGS"])
++ mkexe_exp="$mkexe_exp $common_cflags $(printf "%s" "$CFLAGS" | sed -r -e 's/-fdebug-prefix-map=\S+//' -e 's/-ffile-prefix-map=\S+//')"])
+ AS_IF([test -n "$mkexe_extra_flags"],
+ [mkexe="$mkexe $mkexe_extra_flags"
+ mkexe_exp="$mkexe_exp $mkexe_extra_flags"])
--- /dev/null
+From: =?utf-8?q?St=C3=A9phane_Glondu?= <glondu@debian.org>
+Date: Wed, 12 Jun 2024 13:09:53 +0200
+Subject: Fix call to test in configure.ac
+
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 467099f..a8e4222 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2690,7 +2690,7 @@ ${mkdll_ldflags}"
+ ],[
+ mkdll_ldflags='$(OC_DLL_LDFLAGS) $(LDFLAGS)'
+ mkdll_ldflags_exp="${oc_dll_ldflags}"
+- AS_IF([test -n ${LDFLAGS}],
++ AS_IF([test -n "${LDFLAGS}"],
+ [mkdll_ldflags_exp="$mkdll_ldflags_exp $LDFLAGS"])
+ mkexe_ldflags="\$(OC_LDFLAGS) \$(LDFLAGS)"
+ mkexe_ldflags_exp="${oc_ldflags} ${LDFLAGS}"
-0001-Don-t-use-rpath.patch
0002-Use-CCLINKFLAGS-for-linking-all-executables-and-shar.patch
0003-Check-for-definition-of-AT_SECURE-before-using-it.patch
0004-Disable-DT_TEXTREL-warnings-on-Linux-i386.patch
0006-Do-not-error-on-warnings-in-autoconf.patch
0007-Put-manpages-in-section-3o-instead-of-3.patch
0008-Filter-out-f-debug-file-prefix-map-from-ocamlc_cflag.patch
+0008-Fix-call-to-test-in-configure.ac.patch