From: Stephane Glondu Date: Thu, 3 Sep 2020 13:10:30 +0000 (+0200) Subject: Renumber patches X-Git-Tag: archive/raspbian/4.11.1-5+rpi1~1^2~22 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=ed14802c43fe1f6674239533b9b5db9731c733c1;p=ocaml.git Renumber patches --- diff --git a/debian/patches/0001-Don-t-use-rpath.patch b/debian/patches/0001-Don-t-use-rpath.patch new file mode 100644 index 00000000..7bc167d5 --- /dev/null +++ b/debian/patches/0001-Don-t-use-rpath.patch @@ -0,0 +1,24 @@ +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 d5bb84c..ab3ca2b 100644 +--- a/tools/ocamlmklib.ml ++++ b/tools/ocamlmklib.ml +@@ -58,6 +58,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-Put-manpages-in-section-3o-instead-of-3.patch b/debian/patches/0002-Put-manpages-in-section-3o-instead-of-3.patch new file mode 100644 index 00000000..8588c8d6 --- /dev/null +++ b/debian/patches/0002-Put-manpages-in-section-3o-instead-of-3.patch @@ -0,0 +1,21 @@ +From: Julien Cristau +Date: Tue, 19 May 2009 17:24:52 +0200 +Subject: Put manpages in section 3o instead of 3 + +--- + ocamldoc/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ocamldoc/Makefile b/ocamldoc/Makefile +index 6b7093b..026d409 100644 +--- a/ocamldoc/Makefile ++++ b/ocamldoc/Makefile +@@ -416,7 +416,7 @@ stdlib_man/Stdlib.3o: $(OCAMLDOC) $(DOC_ALL) + $(OCAMLDOC_RUN) -man -d stdlib_man -nostdlib \ + -hide Stdlib -lib Stdlib $(DOC_ALL_INCLUDES) \ + -pp "$(AWK) -v ocamldoc=true -f $(SRC)/stdlib/expand_module_aliases.awk" \ +- -t "OCaml library" -man-mini \ ++ -t "OCaml library" -man-mini -man-section 3o \ + $(DOC_ALL_TEXT:%=-text %) \ + $(DOC_ALL_MLIS) + diff --git a/debian/patches/0003-Don-t-use-rpath.patch b/debian/patches/0003-Don-t-use-rpath.patch deleted file mode 100644 index 7bc167d5..00000000 --- a/debian/patches/0003-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 d5bb84c..ab3ca2b 100644 ---- a/tools/ocamlmklib.ml -+++ b/tools/ocamlmklib.ml -@@ -58,6 +58,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/0003-Use-CCLINKFLAGS-for-linking-all-executables-and-shar.patch b/debian/patches/0003-Use-CCLINKFLAGS-for-linking-all-executables-and-shar.patch new file mode 100644 index 00000000..9a9d1a39 --- /dev/null +++ b/debian/patches/0003-Use-CCLINKFLAGS-for-linking-all-executables-and-shar.patch @@ -0,0 +1,45 @@ +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: <2019-07-22> +--- + configure.ac | 3 +++ + tools/Makefile | 2 +- + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index aa5f26f..069fe96 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -831,6 +831,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/tools/Makefile b/tools/Makefile +index dbad0b7..b4adcff 100644 +--- a/tools/Makefile ++++ b/tools/Makefile +@@ -276,7 +276,7 @@ DEF_SYMBOL_PREFIX = '-Dsymbol_prefix="_"' + endif + + objinfo_helper$(EXE): objinfo_helper.$(O) +- $(CC) $(BFD_LDFLAGS) $(OC_CFLAGS) $(OUTPUTEXE)$@ $< $(BFD_LDLIBS) ++ $(CC) $(BFD_LDFLAGS) $(OC_CFLAGS) $(OUTPUTEXE)$@ $< $(BFD_LDLIBS) $(CCLINKFLAGS) + + objinfo_helper.$(O): $(ROOTDIR)/runtime/caml/s.h + 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 new file mode 100644 index 00000000..f7a6aa2f --- /dev/null +++ b/debian/patches/0004-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/0004-Put-manpages-in-section-3o-instead-of-3.patch b/debian/patches/0004-Put-manpages-in-section-3o-instead-of-3.patch deleted file mode 100644 index 8588c8d6..00000000 --- a/debian/patches/0004-Put-manpages-in-section-3o-instead-of-3.patch +++ /dev/null @@ -1,21 +0,0 @@ -From: Julien Cristau -Date: Tue, 19 May 2009 17:24:52 +0200 -Subject: Put manpages in section 3o instead of 3 - ---- - ocamldoc/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/ocamldoc/Makefile b/ocamldoc/Makefile -index 6b7093b..026d409 100644 ---- a/ocamldoc/Makefile -+++ b/ocamldoc/Makefile -@@ -416,7 +416,7 @@ stdlib_man/Stdlib.3o: $(OCAMLDOC) $(DOC_ALL) - $(OCAMLDOC_RUN) -man -d stdlib_man -nostdlib \ - -hide Stdlib -lib Stdlib $(DOC_ALL_INCLUDES) \ - -pp "$(AWK) -v ocamldoc=true -f $(SRC)/stdlib/expand_module_aliases.awk" \ -- -t "OCaml library" -man-mini \ -+ -t "OCaml library" -man-mini -man-section 3o \ - $(DOC_ALL_TEXT:%=-text %) \ - $(DOC_ALL_MLIS) - diff --git a/debian/patches/0005-Check-for-definition-of-AT_SECURE-before-using-it.patch b/debian/patches/0005-Check-for-definition-of-AT_SECURE-before-using-it.patch deleted file mode 100644 index f7a6aa2f..00000000 --- a/debian/patches/0005-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/0005-read_main_debug_info-do-not-die-in-custom-executable.patch b/debian/patches/0005-read_main_debug_info-do-not-die-in-custom-executable.patch new file mode 100644 index 00000000..a9c21783 --- /dev/null +++ b/debian/patches/0005-read_main_debug_info-do-not-die-in-custom-executable.patch @@ -0,0 +1,24 @@ +From: Stephane Glondu +Date: Thu, 30 Jan 2020 13:06:08 +0100 +Subject: read_main_debug_info: do not die in -custom executables + +This fatal error occurred with some executables linked with -custom +(with the Debian-specific patch), notably ppx preprocessors during the +build of ppxlib. +--- + runtime/backtrace_byt.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/runtime/backtrace_byt.c b/runtime/backtrace_byt.c +index 28fe44c..88e10fc 100644 +--- a/runtime/backtrace_byt.c ++++ b/runtime/backtrace_byt.c +@@ -378,7 +378,7 @@ static void read_main_debug_info(struct debug_info *di) + + fd = caml_attempt_open(&exec_name, &trail, 1); + if (fd < 0){ +- caml_fatal_error ("executable program file not found"); ++ /* caml_fatal_error ("executable program file not found"); */ + CAMLreturn0; + } + 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 new file mode 100644 index 00000000..9c306374 --- /dev/null +++ b/debian/patches/0006-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 069fe96..ab1e188 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1018,6 +1018,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 "$host_alias"], [toolpref="${host_alias}-"], [toolpref=""]) diff --git a/debian/patches/0006-read_main_debug_info-do-not-die-in-custom-executable.patch b/debian/patches/0006-read_main_debug_info-do-not-die-in-custom-executable.patch deleted file mode 100644 index a9c21783..00000000 --- a/debian/patches/0006-read_main_debug_info-do-not-die-in-custom-executable.patch +++ /dev/null @@ -1,24 +0,0 @@ -From: Stephane Glondu -Date: Thu, 30 Jan 2020 13:06:08 +0100 -Subject: read_main_debug_info: do not die in -custom executables - -This fatal error occurred with some executables linked with -custom -(with the Debian-specific patch), notably ppx preprocessors during the -build of ppxlib. ---- - runtime/backtrace_byt.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/runtime/backtrace_byt.c b/runtime/backtrace_byt.c -index 28fe44c..88e10fc 100644 ---- a/runtime/backtrace_byt.c -+++ b/runtime/backtrace_byt.c -@@ -378,7 +378,7 @@ static void read_main_debug_info(struct debug_info *di) - - fd = caml_attempt_open(&exec_name, &trail, 1); - if (fd < 0){ -- caml_fatal_error ("executable program file not found"); -+ /* caml_fatal_error ("executable program file not found"); */ - CAMLreturn0; - } - diff --git a/debian/patches/0008-Disable-DT_TEXTREL-warnings-on-Linux-i386.patch b/debian/patches/0008-Disable-DT_TEXTREL-warnings-on-Linux-i386.patch deleted file mode 100644 index 9c306374..00000000 --- a/debian/patches/0008-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 069fe96..ab1e188 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1018,6 +1018,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 "$host_alias"], [toolpref="${host_alias}-"], [toolpref=""]) diff --git a/debian/patches/0013-Use-CCLINKFLAGS-for-linking-all-executables-and-shar.patch b/debian/patches/0013-Use-CCLINKFLAGS-for-linking-all-executables-and-shar.patch deleted file mode 100644 index 9a9d1a39..00000000 --- a/debian/patches/0013-Use-CCLINKFLAGS-for-linking-all-executables-and-shar.patch +++ /dev/null @@ -1,45 +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: <2019-07-22> ---- - configure.ac | 3 +++ - tools/Makefile | 2 +- - 2 files changed, 4 insertions(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index aa5f26f..069fe96 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -831,6 +831,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/tools/Makefile b/tools/Makefile -index dbad0b7..b4adcff 100644 ---- a/tools/Makefile -+++ b/tools/Makefile -@@ -276,7 +276,7 @@ DEF_SYMBOL_PREFIX = '-Dsymbol_prefix="_"' - endif - - objinfo_helper$(EXE): objinfo_helper.$(O) -- $(CC) $(BFD_LDFLAGS) $(OC_CFLAGS) $(OUTPUTEXE)$@ $< $(BFD_LDLIBS) -+ $(CC) $(BFD_LDFLAGS) $(OC_CFLAGS) $(OUTPUTEXE)$@ $< $(BFD_LDLIBS) $(CCLINKFLAGS) - - objinfo_helper.$(O): $(ROOTDIR)/runtime/caml/s.h - diff --git a/debian/patches/series b/debian/patches/series index c9d9fc17..138f0ddd 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,6 +1,6 @@ -0003-Don-t-use-rpath.patch -0004-Put-manpages-in-section-3o-instead-of-3.patch -0013-Use-CCLINKFLAGS-for-linking-all-executables-and-shar.patch -0005-Check-for-definition-of-AT_SECURE-before-using-it.patch -0006-read_main_debug_info-do-not-die-in-custom-executable.patch -0008-Disable-DT_TEXTREL-warnings-on-Linux-i386.patch +0001-Don-t-use-rpath.patch +0002-Put-manpages-in-section-3o-instead-of-3.patch +0003-Use-CCLINKFLAGS-for-linking-all-executables-and-shar.patch +0004-Check-for-definition-of-AT_SECURE-before-using-it.patch +0005-read_main_debug_info-do-not-die-in-custom-executable.patch +0006-Disable-DT_TEXTREL-warnings-on-Linux-i386.patch