From: Stephane Glondu Date: Tue, 21 Dec 2021 13:06:03 +0000 (+0100) Subject: Renumber patches X-Git-Tag: archive/raspbian/4.13.1-3+rpi1~2^2~24 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=22c1fa33ea9d5d9830650d827e90d3a83c9ccd22;p=ocaml.git Renumber patches --- 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 new file mode 100644 index 00000000..589f4648 --- /dev/null +++ b/debian/patches/0002-Use-CCLINKFLAGS-for-linking-all-executables-and-shar.patch @@ -0,0 +1,31 @@ +From: Torok Edwin +Date: Wed, 15 Jul 2015 16:33:23 +0300 +Subject: Use CCLINKFLAGS for linking all executables and shared libraries + +This allows packagers to set additional linker flags for executables and shared +libraries created by OCaml, and for the OCaml tools themselves. +OCaml code can be linked with various C stubs and C libraries that would +benefit from using hardening link flags, such as -Wl,-z,relro. + +Origin: other +Bug-Debian: https://bugs.debian.org/702349 +Forwarded: no +Last-Update: <2021-12-21> +--- + configure.ac | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 3698c7c..ac8a080 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -984,6 +984,9 @@ AS_IF([test x"$enable_shared" != "xno"], + natdynlinkopts="-Wl,-E" + shared_libraries_supported=true])]) + ++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 new file mode 100644 index 00000000..f7a6aa2f --- /dev/null +++ b/debian/patches/0003-Check-for-definition-of-AT_SECURE-before-using-it.patch @@ -0,0 +1,24 @@ +From: Stephane Glondu +Date: Wed, 24 Jul 2019 09:08:39 +0200 +Subject: Check for definition of AT_SECURE before using it + +This fixes compilation on kfreebsd-*. + +Forwarded: https://github.com/ocaml/ocaml/pull/8842 +--- + otherlibs/unix/envir.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) + + static char **secure_environ(void) + { +-#ifdef HAS_GETAUXVAL ++#if defined(HAS_GETAUXVAL) && defined(AT_SECURE) + if (!getauxval(AT_SECURE)) + return environ; + else diff --git a/debian/patches/0003-Use-CCLINKFLAGS-for-linking-all-executables-and-shar.patch b/debian/patches/0003-Use-CCLINKFLAGS-for-linking-all-executables-and-shar.patch deleted file mode 100644 index 589f4648..00000000 --- a/debian/patches/0003-Use-CCLINKFLAGS-for-linking-all-executables-and-shar.patch +++ /dev/null @@ -1,31 +0,0 @@ -From: Torok Edwin -Date: Wed, 15 Jul 2015 16:33:23 +0300 -Subject: Use CCLINKFLAGS for linking all executables and shared libraries - -This allows packagers to set additional linker flags for executables and shared -libraries created by OCaml, and for the OCaml tools themselves. -OCaml code can be linked with various C stubs and C libraries that would -benefit from using hardening link flags, such as -Wl,-z,relro. - -Origin: other -Bug-Debian: https://bugs.debian.org/702349 -Forwarded: no -Last-Update: <2021-12-21> ---- - configure.ac | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/configure.ac b/configure.ac -index 3698c7c..ac8a080 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -984,6 +984,9 @@ AS_IF([test x"$enable_shared" != "xno"], - natdynlinkopts="-Wl,-E" - shared_libraries_supported=true])]) - -+mksharedlib="$mksharedlib $CCLINKFLAGS" -+mkexe="$mkexe $CCLINKFLAGS" -+ - AS_IF([test -z "$mkmaindll"], [mkmaindll=$mksharedlib]) - - # Configure native dynlink diff --git a/debian/patches/0004-Check-for-definition-of-AT_SECURE-before-using-it.patch b/debian/patches/0004-Check-for-definition-of-AT_SECURE-before-using-it.patch deleted file mode 100644 index f7a6aa2f..00000000 --- a/debian/patches/0004-Check-for-definition-of-AT_SECURE-before-using-it.patch +++ /dev/null @@ -1,24 +0,0 @@ -From: Stephane Glondu -Date: Wed, 24 Jul 2019 09:08:39 +0200 -Subject: Check for definition of AT_SECURE before using it - -This fixes compilation on kfreebsd-*. - -Forwarded: https://github.com/ocaml/ocaml/pull/8842 ---- - otherlibs/unix/envir.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) - - static char **secure_environ(void) - { --#ifdef HAS_GETAUXVAL -+#if defined(HAS_GETAUXVAL) && defined(AT_SECURE) - if (!getauxval(AT_SECURE)) - return environ; - else 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 new file mode 100644 index 00000000..82672813 --- /dev/null +++ b/debian/patches/0004-Disable-DT_TEXTREL-warnings-on-Linux-i386.patch @@ -0,0 +1,30 @@ +From: Stephane Glondu +Date: Wed, 29 Jul 2020 16:22:39 +0200 +Subject: Disable DT_TEXTREL warnings on Linux i386 + +Bug: https://github.com/ocaml/ocaml/issues/9800 +--- + configure.ac | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/configure.ac b/configure.ac +index ac8a080..9ac019f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1183,6 +1183,16 @@ AS_CASE([$arch], + [common_cflags="-no-pie $common_cflags"], + [])]) + ++# Disable DT_TEXTREL warnings on Linux i386 ++# See https://github.com/ocaml/ocaml/issues/9800 ++ ++AS_CASE([$host], ++ [i?86-*-linux-*], ++ [common_cflags="-Wl,-z,notext $common_cflags" ++ mksharedlib="$mksharedlib -Wl,-z,notext" ++ mkmaindll="$mkmaindll -Wl,-z,notext"], ++ []) ++ + # Assembler + + AS_IF([test -n "$target_alias"], 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 new file mode 100644 index 00000000..186d4c61 --- /dev/null +++ b/debian/patches/0005-Trigger-output-complete-exe-on-custom-with-an-enviro.patch @@ -0,0 +1,36 @@ +From: Stephane Glondu +Date: Thu, 3 Sep 2020 15:21:10 +0200 +Subject: Trigger -output-complete-exe on -custom with an environment variable + +--- + driver/main_args.ml | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/driver/main_args.ml b/driver/main_args.ml +index 3c6faac..a208056 100644 +--- a/driver/main_args.ml ++++ b/driver/main_args.ml +@@ -1976,7 +1976,6 @@ third-party libraries such as Lwt, but with a different API." + include Core + include Compiler + let _compat_32 = set bytecode_compatible_32 +- let _custom = set custom_runtime + let _dcamlprimc = set keep_camlprimc_file + let _dinstr = set dump_instr + let _dllib s = Compenv.defer (ProcessDLLs (Misc.rev_split_words s)) +@@ -1995,6 +1994,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 ++ let _custom () = ++ if ++ match Sys.getenv_opt "OCAML_CUSTOM_USE_OUTPUT_COMPLETE_EXE" with ++ | None | Some "" -> false ++ | Some _ -> true ++ then ++ _output_complete_exe () ++ else ++ set custom_runtime () + end + + end diff --git a/debian/patches/0006-Disable-DT_TEXTREL-warnings-on-Linux-i386.patch b/debian/patches/0006-Disable-DT_TEXTREL-warnings-on-Linux-i386.patch deleted file mode 100644 index 82672813..00000000 --- a/debian/patches/0006-Disable-DT_TEXTREL-warnings-on-Linux-i386.patch +++ /dev/null @@ -1,30 +0,0 @@ -From: Stephane Glondu -Date: Wed, 29 Jul 2020 16:22:39 +0200 -Subject: Disable DT_TEXTREL warnings on Linux i386 - -Bug: https://github.com/ocaml/ocaml/issues/9800 ---- - configure.ac | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/configure.ac b/configure.ac -index ac8a080..9ac019f 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1183,6 +1183,16 @@ AS_CASE([$arch], - [common_cflags="-no-pie $common_cflags"], - [])]) - -+# Disable DT_TEXTREL warnings on Linux i386 -+# See https://github.com/ocaml/ocaml/issues/9800 -+ -+AS_CASE([$host], -+ [i?86-*-linux-*], -+ [common_cflags="-Wl,-z,notext $common_cflags" -+ mksharedlib="$mksharedlib -Wl,-z,notext" -+ mkmaindll="$mkmaindll -Wl,-z,notext"], -+ []) -+ - # Assembler - - AS_IF([test -n "$target_alias"], 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 new file mode 100644 index 00000000..1ab0494c --- /dev/null +++ b/debian/patches/0006-Do-not-error-on-warnings-in-autoconf.patch @@ -0,0 +1,22 @@ +From: Stephane Glondu +Date: Thu, 25 Nov 2021 15:01:11 +0100 +Subject: Do not error on warnings in autoconf + +Bug-Debian: https://bugs.debian.org/978875 +--- + tools/autogen | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tools/autogen b/tools/autogen +index 5341451..7ac2349 100755 +--- a/tools/autogen ++++ b/tools/autogen +@@ -16,7 +16,7 @@ + # Remove the autom4te.cache directory to make sure we start in a clean state + rm -rf autom4te.cache + +-${1-autoconf} --force --warnings=all,error ++${1-autoconf} --force --warnings=all + + # Allow pre-processing of configure arguments for Git check-outs + # The sed call removes dra27's copyright on the whole configure script... diff --git a/debian/patches/0007-Trigger-output-complete-exe-on-custom-with-an-enviro.patch b/debian/patches/0007-Trigger-output-complete-exe-on-custom-with-an-enviro.patch deleted file mode 100644 index 186d4c61..00000000 --- a/debian/patches/0007-Trigger-output-complete-exe-on-custom-with-an-enviro.patch +++ /dev/null @@ -1,36 +0,0 @@ -From: Stephane Glondu -Date: Thu, 3 Sep 2020 15:21:10 +0200 -Subject: Trigger -output-complete-exe on -custom with an environment variable - ---- - driver/main_args.ml | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) - -diff --git a/driver/main_args.ml b/driver/main_args.ml -index 3c6faac..a208056 100644 ---- a/driver/main_args.ml -+++ b/driver/main_args.ml -@@ -1976,7 +1976,6 @@ third-party libraries such as Lwt, but with a different API." - include Core - include Compiler - let _compat_32 = set bytecode_compatible_32 -- let _custom = set custom_runtime - let _dcamlprimc = set keep_camlprimc_file - let _dinstr = set dump_instr - let _dllib s = Compenv.defer (ProcessDLLs (Misc.rev_split_words s)) -@@ -1995,6 +1994,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 -+ let _custom () = -+ if -+ match Sys.getenv_opt "OCAML_CUSTOM_USE_OUTPUT_COMPLETE_EXE" with -+ | None | Some "" -> false -+ | Some _ -> true -+ then -+ _output_complete_exe () -+ else -+ set custom_runtime () - end - - end diff --git a/debian/patches/0009-Do-not-error-on-warnings-in-autoconf.patch b/debian/patches/0009-Do-not-error-on-warnings-in-autoconf.patch deleted file mode 100644 index 1ab0494c..00000000 --- a/debian/patches/0009-Do-not-error-on-warnings-in-autoconf.patch +++ /dev/null @@ -1,22 +0,0 @@ -From: Stephane Glondu -Date: Thu, 25 Nov 2021 15:01:11 +0100 -Subject: Do not error on warnings in autoconf - -Bug-Debian: https://bugs.debian.org/978875 ---- - tools/autogen | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tools/autogen b/tools/autogen -index 5341451..7ac2349 100755 ---- a/tools/autogen -+++ b/tools/autogen -@@ -16,7 +16,7 @@ - # Remove the autom4te.cache directory to make sure we start in a clean state - rm -rf autom4te.cache - --${1-autoconf} --force --warnings=all,error -+${1-autoconf} --force --warnings=all - - # Allow pre-processing of configure arguments for Git check-outs - # The sed call removes dra27's copyright on the whole configure script... diff --git a/debian/patches/series b/debian/patches/series index ade6c922..599d5b6e 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,6 +1,6 @@ 0001-Don-t-use-rpath.patch -0003-Use-CCLINKFLAGS-for-linking-all-executables-and-shar.patch -0004-Check-for-definition-of-AT_SECURE-before-using-it.patch -0006-Disable-DT_TEXTREL-warnings-on-Linux-i386.patch -0007-Trigger-output-complete-exe-on-custom-with-an-enviro.patch -0009-Do-not-error-on-warnings-in-autoconf.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 +0005-Trigger-output-complete-exe-on-custom-with-an-enviro.patch +0006-Do-not-error-on-warnings-in-autoconf.patch