--- /dev/null
+From: =?utf-8?q?St=C3=A9phane_Glondu?= <glondu@debian.org>
+Date: Sun, 1 Mar 2026 21:32:31 +0100
+Subject: Compile utils/config.{cmi,cmx} with -opaque
+
+The goal is to stabilize compiler-libs ABI.
+---
+ Makefile | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/Makefile b/Makefile
+index 4ce5da6..c9d4300 100644
+--- a/Makefile
++++ b/Makefile
+@@ -2546,6 +2546,12 @@ endif
+ %.cmx: %.ml
+ $(V_OCAMLOPT)$(COMPILE_NATIVE_MODULE) -c $<
+
++utils/config.cmi: utils/config.mli
++ $(V_OCAMLC)$(CAMLC) $(OC_COMMON_COMPFLAGS) -I $(@D) $(INCLUDES) -opaque -c $<
++
++utils/config.cmx: utils/config.ml
++ $(V_OCAMLOPT)$(COMPILE_NATIVE_MODULE) -opaque -c $<
++
+ partialclean::
+ for d in utils parsing typing bytecomp asmcomp middle_end file_formats \
+ lambda middle_end/closure middle_end/flambda \
Use-CCLINKFLAGS-for-linking-all-executables-and-shar.patch
Mark-test_compact_manydomains-as-multicore.patch
Increase-the-amount-of-data-written-to-a-pipe-in-a-test.patch
+Compile-utils-config.-cmi-cmx-with-opaque.patch
install-stamp:
# Install OCaml
$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
+# Remove config.cmx so that it is not part of compiler-libs ABI
+ rm -f debian/tmp$(OCAML_STDLIB_DIR)/compiler-libs/config.cmx
ifeq (,$(DEB_TEST_BUILD_PREFIX))
# Remove Debian-specific file
rm -f debian/tmp$(OCAML_STDLIB_DIR)/ld.conf