From: Stéphane Glondu Date: Wed, 12 Jun 2024 06:34:09 +0000 (+0200) Subject: Refresh patches X-Git-Tag: archive/raspbian/5.2.0-2+rpi1^2~51 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1a5892c407ce2c30ad043ce88d2d35366c6d46d5;p=ocaml.git Refresh patches - remove rpath patch, which is no longer adequate - add a patch to fix a call to test in configure.ac --- diff --git a/debian/patches/0001-Don-t-use-rpath.patch b/debian/patches/0001-Don-t-use-rpath.patch deleted file mode 100644 index 3140fe94..00000000 --- a/debian/patches/0001-Don-t-use-rpath.patch +++ /dev/null @@ -1,24 +0,0 @@ -From: Stefano Zacchiroli -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 diff --git a/debian/patches/0002-Use-CCLINKFLAGS-for-linking-all-executables-and-shar.patch b/debian/patches/0002-Use-CCLINKFLAGS-for-linking-all-executables-and-shar.patch index 2b302460..1765bb91 100644 --- a/debian/patches/0002-Use-CCLINKFLAGS-for-linking-all-executables-and-shar.patch +++ b/debian/patches/0002-Use-CCLINKFLAGS-for-linking-all-executables-and-shar.patch @@ -12,20 +12,21 @@ Bug-Debian: https://bugs.debian.org/702349 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 + diff --git a/debian/patches/0003-Check-for-definition-of-AT_SECURE-before-using-it.patch b/debian/patches/0003-Check-for-definition-of-AT_SECURE-before-using-it.patch index f7a6aa2f..fdbb2721 100644 --- a/debian/patches/0003-Check-for-definition-of-AT_SECURE-before-using-it.patch +++ b/debian/patches/0003-Check-for-definition-of-AT_SECURE-before-using-it.patch @@ -6,14 +6,14 @@ This fixes compilation on kfreebsd-*. 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) { diff --git a/debian/patches/0004-Disable-DT_TEXTREL-warnings-on-Linux-i386.patch b/debian/patches/0004-Disable-DT_TEXTREL-warnings-on-Linux-i386.patch index a39bdb4e..4109c6c6 100644 --- a/debian/patches/0004-Disable-DT_TEXTREL-warnings-on-Linux-i386.patch +++ b/debian/patches/0004-Disable-DT_TEXTREL-warnings-on-Linux-i386.patch @@ -8,12 +8,12 @@ Bug: https://github.com/ocaml/ocaml/issues/9800 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 diff --git a/debian/patches/0005-Trigger-output-complete-exe-on-custom-with-an-enviro.patch b/debian/patches/0005-Trigger-output-complete-exe-on-custom-with-an-enviro.patch index 3c72e994..d1d5df3e 100644 --- a/debian/patches/0005-Trigger-output-complete-exe-on-custom-with-an-enviro.patch +++ b/debian/patches/0005-Trigger-output-complete-exe-on-custom-with-an-enviro.patch @@ -7,10 +7,10 @@ Subject: Trigger -output-complete-exe on -custom with an environment variable 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 @@ -18,7 +18,7 @@ index 60db017..a46e50e 100644 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 diff --git a/debian/patches/0006-Do-not-error-on-warnings-in-autoconf.patch b/debian/patches/0006-Do-not-error-on-warnings-in-autoconf.patch index 2f46a01b..63c1c651 100644 --- a/debian/patches/0006-Do-not-error-on-warnings-in-autoconf.patch +++ b/debian/patches/0006-Do-not-error-on-warnings-in-autoconf.patch @@ -8,7 +8,7 @@ Bug-Debian: https://bugs.debian.org/978875 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 @@ diff --git a/debian/patches/0007-Put-manpages-in-section-3o-instead-of-3.patch b/debian/patches/0007-Put-manpages-in-section-3o-instead-of-3.patch index 3a1c7009..e7475409 100644 --- a/debian/patches/0007-Put-manpages-in-section-3o-instead-of-3.patch +++ b/debian/patches/0007-Put-manpages-in-section-3o-instead-of-3.patch @@ -7,13 +7,13 @@ Subject: Put manpages in section 3o instead of 3 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)) diff --git a/debian/patches/0008-Filter-out-f-debug-file-prefix-map-from-ocamlc_cflag.patch b/debian/patches/0008-Filter-out-f-debug-file-prefix-map-from-ocamlc_cflag.patch index ceadbe10..07723d36 100644 --- a/debian/patches/0008-Filter-out-f-debug-file-prefix-map-from-ocamlc_cflag.patch +++ b/debian/patches/0008-Filter-out-f-debug-file-prefix-map-from-ocamlc_cflag.patch @@ -5,28 +5,37 @@ Subject: Filter out -f{debug,file}-prefix-map= from ocamlc_cflags and mkexe 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"]) diff --git a/debian/patches/0008-Fix-call-to-test-in-configure.ac.patch b/debian/patches/0008-Fix-call-to-test-in-configure.ac.patch new file mode 100644 index 00000000..d4f3a476 --- /dev/null +++ b/debian/patches/0008-Fix-call-to-test-in-configure.ac.patch @@ -0,0 +1,21 @@ +From: =?utf-8?q?St=C3=A9phane_Glondu?= +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}" diff --git a/debian/patches/series b/debian/patches/series index 56079e3b..da8df5a1 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -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 @@ -6,3 +5,4 @@ 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