summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2017-02-21 14:17:27 +0000
committerAlexis Ballier <aballier@gentoo.org>2017-02-21 14:17:27 +0000
commit5aaf03e1350a3ef46c464194d4d0efa9ee269e51 (patch)
treed885947bed8e87da2c832eac3d35e273cadfaaba /src/patchsets/ocaml
parentAdd patches for ocaml 4.05 (diff)
downloadgentoo-5aaf03e1350a3ef46c464194d4d0efa9ee269e51.tar.gz
gentoo-5aaf03e1350a3ef46c464194d4d0efa9ee269e51.tar.bz2
gentoo-5aaf03e1350a3ef46c464194d4d0efa9ee269e51.zip
Remove outdated ocaml patches
Diffstat (limited to 'src/patchsets/ocaml')
-rw-r--r--src/patchsets/ocaml/3.11.1/010_all_execstacks.patch239
-rw-r--r--src/patchsets/ocaml/3.11.1/020_all_configure.patch42
-rw-r--r--src/patchsets/ocaml/3.11.1/030_all_automagic.patch54
-rw-r--r--src/patchsets/ocaml/3.11.1/040_all_yaccldflags.patch17
-rw-r--r--src/patchsets/ocaml/3.11.1/series4
-rw-r--r--src/patchsets/ocaml/3.12.0/010_all_execstacks.patch240
-rw-r--r--src/patchsets/ocaml/3.12.0/020_all_configure.patch50
-rw-r--r--src/patchsets/ocaml/3.12.0/030_all_automagic.patch54
-rw-r--r--src/patchsets/ocaml/3.12.0/040_all_yaccldflags.patch17
-rw-r--r--src/patchsets/ocaml/3.12.0/050_all_objinfoldflags.patch13
-rw-r--r--src/patchsets/ocaml/3.12.0/060_all_linkorder.patch50
-rw-r--r--src/patchsets/ocaml/3.12.0/series6
-rw-r--r--src/patchsets/ocaml/4.00.0/010_all_execstacks.patch116
-rw-r--r--src/patchsets/ocaml/4.00.0/020_all_configure.patch50
-rw-r--r--src/patchsets/ocaml/4.00.0/040_all_yaccldflags.patch17
-rw-r--r--src/patchsets/ocaml/4.00.0/050_all_objinfoldflags.patch13
-rw-r--r--src/patchsets/ocaml/4.00.0/series4
-rw-r--r--src/patchsets/ocaml/4.00.1/010_all_execstacks.patch116
-rw-r--r--src/patchsets/ocaml/4.00.1/020_all_configure.patch50
-rw-r--r--src/patchsets/ocaml/4.00.1/050_all_objinfoldflags.patch13
-rw-r--r--src/patchsets/ocaml/4.00.1/060_all_tk86.patch24
-rw-r--r--src/patchsets/ocaml/4.00.1/series4
-rw-r--r--src/patchsets/ocaml/4.01.0/010_all_execstacks.patch116
-rw-r--r--src/patchsets/ocaml/4.01.0/020_all_configure.patch50
-rw-r--r--src/patchsets/ocaml/4.01.0/050_all_objinfoldflags.patch13
-rw-r--r--src/patchsets/ocaml/4.01.0/series3
-rw-r--r--src/patchsets/ocaml/4.02.2/010_all_execstacks.patch116
-rw-r--r--src/patchsets/ocaml/4.02.2/020_all_configure.patch50
-rw-r--r--src/patchsets/ocaml/4.02.2/050_all_objinfoldflags.patch13
-rw-r--r--src/patchsets/ocaml/4.02.2/series3
30 files changed, 0 insertions, 1557 deletions
diff --git a/src/patchsets/ocaml/3.11.1/010_all_execstacks.patch b/src/patchsets/ocaml/3.11.1/010_all_execstacks.patch
deleted file mode 100644
index a2c4539ed2..0000000000
--- a/src/patchsets/ocaml/3.11.1/010_all_execstacks.patch
+++ /dev/null
@@ -1,239 +0,0 @@
-Fix the EXEC_STACK in ocaml compiled binaries (#153382)
-
-Index: ocaml-3.11.1/asmcomp/alpha/emit.mlp
-===================================================================
---- ocaml-3.11.1.orig/asmcomp/alpha/emit.mlp
-+++ ocaml-3.11.1/asmcomp/alpha/emit.mlp
-@@ -811,6 +811,11 @@ let data l =
- ` .data\n`;
- List.iter emit_item l
-
-+(* Mark stack as non executable *)
-+let nx_stack() =
-+ if Config.system = "linux" then
-+ ` .section .note.GNU-stack,\"\",%progbits\n`
-+
- (* Beginning / end of an assembly file *)
-
- let begin_assembly() =
-@@ -843,6 +848,7 @@ let begin_assembly() =
- `{emit_symbol lbl_begin}:\n`
-
- let end_assembly () =
-+ nx_stack();
- let lbl_end = Compilenv.make_symbol (Some "code_end") in
- ` .text\n`;
- ` .globl {emit_symbol lbl_end}\n`;
-Index: ocaml-3.11.1/asmrun/alpha.S
-===================================================================
---- ocaml-3.11.1.orig/asmrun/alpha.S
-+++ ocaml-3.11.1/asmrun/alpha.S
-@@ -438,3 +438,7 @@ caml_system__frametable:
- .word -1 /* negative frame size => use callback link */
- .word 0 /* no roots here */
- .align 3
-+
-+#ifdef __ELF__
-+.section .note.GNU-stack,"",%progbits
-+#endif
-Index: ocaml-3.11.1/asmrun/arm.S
-===================================================================
---- ocaml-3.11.1.orig/asmrun/arm.S
-+++ ocaml-3.11.1/asmrun/arm.S
-@@ -342,3 +342,7 @@ caml_system__frametable:
- .short -1 /* negative frame size => use callback link */
- .short 0 /* no roots */
- .align 2
-+
-+#ifdef __ELF__
-+.section .note.GNU-stack,"",%progbits
-+#endif
-Index: ocaml-3.11.1/asmrun/hppa.S
-===================================================================
---- ocaml-3.11.1.orig/asmrun/hppa.S
-+++ ocaml-3.11.1/asmrun/hppa.S
-@@ -532,3 +532,8 @@ G(caml_system__frametable):
- .long L104 + 3 /* return address into callback */
- .short -1 /* negative frame size => use callback link */
- .short 0 /* no roots */
-+
-+#ifdef __ELF__
-+.section .note.GNU-stack,"",%progbits
-+#endif
-+
-Index: ocaml-3.11.1/asmrun/ia64.S
-===================================================================
---- ocaml-3.11.1.orig/asmrun/ia64.S
-+++ ocaml-3.11.1/asmrun/ia64.S
-@@ -528,3 +528,8 @@ caml_system__frametable:
-
- .common caml_saved_bsp#, 8, 8
- .common caml_saved_rnat#, 8, 8
-+
-+#ifdef __ELF__
-+.section .note.GNU-stack,"",%progbits
-+#endif
-+
-Index: ocaml-3.11.1/asmrun/m68k.S
-===================================================================
---- ocaml-3.11.1.orig/asmrun/m68k.S
-+++ ocaml-3.11.1/asmrun/m68k.S
-@@ -242,3 +242,8 @@ _caml_system__frametable:
- .long L107 | return address into callback
- .word -1 | negative frame size => use callback link
- .word 0 | no roots here
-+
-+#ifdef __ELF__
-+.section .note.GNU-stack,"",%progbits
-+#endif
-+
-Index: ocaml-3.11.1/asmrun/power-elf.S
-===================================================================
---- ocaml-3.11.1.orig/asmrun/power-elf.S
-+++ ocaml-3.11.1/asmrun/power-elf.S
-@@ -419,3 +419,7 @@ caml_system__frametable:
- .short -1 /* negative size count => use callback link */
- .short 0 /* no roots here */
-
-+#ifdef __ELF__
-+.section .note.GNU-stack,"",%progbits
-+#endif
-+
-Index: ocaml-3.11.1/asmrun/sparc.S
-===================================================================
---- ocaml-3.11.1.orig/asmrun/sparc.S
-+++ ocaml-3.11.1/asmrun/sparc.S
-@@ -405,3 +405,8 @@ Caml_system__frametable:
- .type Caml_raise_exception, #function
- .type Caml_system__frametable, #object
- #endif
-+
-+#ifdef __ELF__
-+.section .note.GNU-stack,"",%progbits
-+#endif
-+
-Index: ocaml-3.11.1/asmcomp/arm/emit.mlp
-===================================================================
---- ocaml-3.11.1.orig/asmcomp/arm/emit.mlp
-+++ ocaml-3.11.1/asmcomp/arm/emit.mlp
-@@ -642,6 +642,13 @@ let data l =
- ` .data\n`;
- List.iter emit_item l
-
-+(* Mark stack as non executable *)
-+let nx_stack() =
-+ if Config.system = "linux" then
-+ ` .section .note.GNU-stack,\"\",%progbits\n`
-+
-+
-+
- (* Beginning / end of an assembly file *)
-
- let begin_assembly() =
-@@ -658,6 +665,7 @@ let begin_assembly() =
- `{emit_symbol lbl_begin}:\n`
-
- let end_assembly () =
-+ nx_stack();
- let lbl_end = Compilenv.make_symbol (Some "code_end") in
- ` .text\n`;
- ` .global {emit_symbol lbl_end}\n`;
-Index: ocaml-3.11.1/asmcomp/hppa/emit.mlp
-===================================================================
---- ocaml-3.11.1.orig/asmcomp/hppa/emit.mlp
-+++ ocaml-3.11.1/asmcomp/hppa/emit.mlp
-@@ -994,6 +994,12 @@ let data l =
- ` .data\n`;
- List.iter emit_item l
-
-+(* Mark stack as non executable *)
-+let nx_stack() =
-+ if Config.system = "linux" then
-+ ` .section .note.GNU-stack,\"\",%progbits\n`
-+
-+
- (* Beginning / end of an assembly file *)
-
- let begin_assembly() =
-@@ -1022,6 +1028,7 @@ let begin_assembly() =
-
-
- let end_assembly() =
-+ nx_stack();
- ` .code\n`;
- let lbl_end = Compilenv.make_symbol (Some "code_end") in
- declare_global lbl_end;
-Index: ocaml-3.11.1/asmcomp/ia64/emit.mlp
-===================================================================
---- ocaml-3.11.1.orig/asmcomp/ia64/emit.mlp
-+++ ocaml-3.11.1/asmcomp/ia64/emit.mlp
-@@ -1306,6 +1306,11 @@ let data l =
- ` .align 8\n`;
- List.iter emit_item l
-
-+(* Mark stack as non executable *)
-+let nx_stack() =
-+ if Config.system = "linux" then
-+ ` .section .note.GNU-stack,\"\",%progbits\n`
-+
- (* Beginning / end of an assembly file *)
-
- let begin_assembly() =
-@@ -1315,6 +1320,7 @@ let begin_assembly() =
- emit_define_symbol (Compilenv.make_symbol (Some "code_begin"))
-
- let end_assembly () =
-+ nx_stack();
- ` .data\n`;
- emit_define_symbol (Compilenv.make_symbol (Some "data_end"));
- ` .text\n`;
-Index: ocaml-3.11.1/asmcomp/power/emit.mlp
-===================================================================
---- ocaml-3.11.1.orig/asmcomp/power/emit.mlp
-+++ ocaml-3.11.1/asmcomp/power/emit.mlp
-@@ -920,6 +920,12 @@ let data l =
- emit_string data_space;
- List.iter emit_item l
-
-+(* Mark stack as non executable *)
-+let nx_stack() =
-+ if Config.system = "elf" then
-+ ` .section .note.GNU-stack,\"\",%progbits\n`
-+
-+
- (* Beginning / end of an assembly file *)
-
- let begin_assembly() =
-@@ -936,6 +942,7 @@ let begin_assembly() =
- `{emit_symbol lbl_begin}:\n`
-
- let end_assembly() =
-+ nx_stack();
- if pic_externals then
- (* Emit the pointers to external functions *)
- StringSet.iter emit_external !external_functions;
-Index: ocaml-3.11.1/asmcomp/sparc/emit.mlp
-===================================================================
---- ocaml-3.11.1.orig/asmcomp/sparc/emit.mlp
-+++ ocaml-3.11.1/asmcomp/sparc/emit.mlp
-@@ -741,6 +741,12 @@ let data l =
- ` .data\n`;
- List.iter emit_item l
-
-+(* Mark stack as non executable *)
-+let nx_stack() =
-+ if Config.system = "linux" then
-+ ` .section .note.GNU-stack,\"\",%progbits\n`
-+
-+
- (* Beginning / end of an assembly file *)
-
- let begin_assembly() =
-@@ -754,6 +760,7 @@ let begin_assembly() =
- `{emit_symbol lbl_begin}:\n`
-
- let end_assembly() =
-+ nx_stack();
- ` .text\n`;
- let lbl_end = Compilenv.make_symbol (Some "code_end") in
- ` .global {emit_symbol lbl_end}\n`;
diff --git a/src/patchsets/ocaml/3.11.1/020_all_configure.patch b/src/patchsets/ocaml/3.11.1/020_all_configure.patch
deleted file mode 100644
index 59ad1ceeae..0000000000
--- a/src/patchsets/ocaml/3.11.1/020_all_configure.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-The configure script doesn't inherit previous defined variables,
-overwriting previous declarations of bytecccompopts, bytecclinkopts,
-nativecccompopts and nativecclinkopts. Reported upstream as issue 0004267.
-
-Index: ocaml-3.11.1/configure
-===================================================================
---- ocaml-3.11.1.orig/configure
-+++ ocaml-3.11.1/configure
-@@ -239,7 +239,7 @@ esac
- # Configure the bytecode compiler
-
- bytecc="$cc"
--mkexe="\$(BYTECC)"
-+mkexe="\$(BYTECC) \$(BYTECCLINKOPTS)"
- bytecccompopts=""
- bytecclinkopts=""
- dllccompopts=""
-@@ -1516,7 +1516,15 @@ fi
-
- # Final twiddling of compiler options to work around known bugs
-
-+bytecccompopts="$CFLAGS $bytecccompopts"
-+bytecclinkopts="$LDFLAGS $bytecclinkopts"
-+natdynlinkopts="$LDFLAGS $natdynlinkopts"
-+nativeccrawlinkopts="$RAW_LDFLAGS $nativecclinkopts"
-+nativecclinkopts="$LDFLAGS $nativecclinkopts"
-+nativecccompopts="$CFLAGS $nativecccompopts"
- nativeccprofopts="$nativecccompopts"
-+mksharedlib="$mksharedlib $LDFLAGS"
-+mkmaindll="$mkmaindll $LDFLAGS"
- case "$buggycc" in
- gcc.2.96)
- bytecccompopts="$bytecccompopts -fomit-frame-pointer"
-@@ -1564,7 +1572,7 @@ echo "DEBUGGER=$debugger" >> Makefile
- echo "CC_PROFILE=$cc_profile" >> Makefile
- echo "SYSTHREAD_SUPPORT=$systhread_support" >> Makefile
- echo "PARTIALLD=$partialld" >> Makefile
--echo "PACKLD=\$(PARTIALLD) \$(NATIVECCLINKOPTS) -o " >> Makefile
-+echo "PACKLD=\$(PARTIALLD) $nativeccrawlinkopts -o " >> Makefile
- echo "DLLCCCOMPOPTS=$dllccompopts" >> Makefile
- echo "IFLEXDIR=$iflexdir" >> Makefile
- echo "O=o" >> Makefile
diff --git a/src/patchsets/ocaml/3.11.1/030_all_automagic.patch b/src/patchsets/ocaml/3.11.1/030_all_automagic.patch
deleted file mode 100644
index d48b769c2f..0000000000
--- a/src/patchsets/ocaml/3.11.1/030_all_automagic.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-ocaml has automagics on libX11 and gdbm
-http://caml.inria.fr/mantis/view.php?id=4278
-
-Index: ocaml-3.11.1/configure
-===================================================================
---- ocaml-3.11.1.orig/configure
-+++ ocaml-3.11.1/configure
-@@ -33,6 +33,8 @@ x11_include_dir=''
- x11_lib_dir=''
- tk_wanted=yes
- pthread_wanted=yes
-+graph_wanted=yes
-+dbm_wanted=yes
- tk_defs=''
- tk_libs=''
- tk_x11=yes
-@@ -93,6 +95,10 @@ while : ; do
- ;; # Ignored for backward compatibility
- -no-pthread*|--no-pthread*)
- pthread_wanted=no;;
-+ -no-dbm|--no-dbm)
-+ dbm_wanted=no;;
-+ -no-graph|--no-graph)
-+ graph_wanted=no;;
- -no-tk|--no-tk)
- tk_wanted=no;;
- -tkdefs*|--tkdefs*)
-@@ -1318,7 +1324,7 @@ do
- done
-
-
--if test "$x11_include" = "not found" || test "$x11_link" = "not found"
-+if test "$x11_include" = "not found" || test "$x11_link" = "not found" || test "$graph_wanted" = "no"
- then
- echo "X11 not found, the \"graph\" library will not be supported."
- x11_include=""
-@@ -1366,7 +1372,7 @@ for dir in /usr/include /usr/include/db1
- break
- fi
- done
--if test "$dbm_include" = "not found" || test "$dbm_link" = "not found"; then
-+if test "$dbm_include" = "not found" || test "$dbm_link" = "not found" || test "$dbm_wanted" = "no"; then
- echo "NDBM not found, the \"dbm\" library will not be supported."
- else
- echo "NDBM found (in $dbm_include)"
-@@ -1652,7 +1658,7 @@ echo " $otherlibraries"
- echo "Configuration for the \"num\" library:"
- echo " target architecture ...... $bng_arch (asm level $bng_asm_level)"
-
--if test "$x11_include" != "not found" && test "$x11_lib" != "not found"; then
-+if test "$x11_include" != "not found" && test "$x11_lib" != "not found" && test "$graph_wanted" != "no"; then
- echo "Configuration for the \"graph\" library:"
- echo " options for compiling .... $x11_include"
- echo " options for linking ...... $x11_link"
diff --git a/src/patchsets/ocaml/3.11.1/040_all_yaccldflags.patch b/src/patchsets/ocaml/3.11.1/040_all_yaccldflags.patch
deleted file mode 100644
index 8305251768..0000000000
--- a/src/patchsets/ocaml/3.11.1/040_all_yaccldflags.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Respect LDFLAGS for ocamlyacc
-
-http://caml.inria.fr/mantis/view.php?id=4698
-
-Index: ocaml-3.11.1/yacc/Makefile
-===================================================================
---- ocaml-3.11.1.orig/yacc/Makefile
-+++ ocaml-3.11.1/yacc/Makefile
-@@ -25,7 +25,7 @@ OBJS= closure.o error.o lalr.o lr0.o mai
- all: ocamlyacc$(EXE)
-
- ocamlyacc$(EXE): $(OBJS)
-- $(CC) $(CFLAGS) $(CCLINKFLAGS) -o ocamlyacc $(OBJS)
-+ $(CC) $(LDFLAGS) $(CFLAGS) $(CCLINKFLAGS) -o ocamlyacc $(OBJS)
-
- version.h : ../VERSION
- echo "#define OCAML_VERSION \"`head -1 ../VERSION`\"" >version.h
diff --git a/src/patchsets/ocaml/3.11.1/series b/src/patchsets/ocaml/3.11.1/series
deleted file mode 100644
index 95f759189c..0000000000
--- a/src/patchsets/ocaml/3.11.1/series
+++ /dev/null
@@ -1,4 +0,0 @@
-010_all_execstacks.patch
-020_all_configure.patch
-030_all_automagic.patch
-040_all_yaccldflags.patch
diff --git a/src/patchsets/ocaml/3.12.0/010_all_execstacks.patch b/src/patchsets/ocaml/3.12.0/010_all_execstacks.patch
deleted file mode 100644
index 87e30f4028..0000000000
--- a/src/patchsets/ocaml/3.12.0/010_all_execstacks.patch
+++ /dev/null
@@ -1,240 +0,0 @@
-Fix the EXEC_STACK in ocaml compiled binaries (#153382)
-
-Index: ocaml-3.12.0/asmcomp/alpha/emit.mlp
-===================================================================
---- ocaml-3.12.0.orig/asmcomp/alpha/emit.mlp
-+++ ocaml-3.12.0/asmcomp/alpha/emit.mlp
-@@ -811,6 +811,11 @@ let data l =
- ` .data\n`;
- List.iter emit_item l
-
-+(* Mark stack as non executable *)
-+let nx_stack() =
-+ if Config.system = "linux" then
-+ ` .section .note.GNU-stack,\"\",%progbits\n`
-+
- (* Beginning / end of an assembly file *)
-
- let begin_assembly() =
-@@ -843,6 +848,7 @@ let begin_assembly() =
- `{emit_symbol lbl_begin}:\n`
-
- let end_assembly () =
-+ nx_stack();
- let lbl_end = Compilenv.make_symbol (Some "code_end") in
- ` .text\n`;
- ` .globl {emit_symbol lbl_end}\n`;
-Index: ocaml-3.12.0/asmrun/alpha.S
-===================================================================
---- ocaml-3.12.0.orig/asmrun/alpha.S
-+++ ocaml-3.12.0/asmrun/alpha.S
-@@ -438,3 +438,7 @@ caml_system__frametable:
- .word -1 /* negative frame size => use callback link */
- .word 0 /* no roots here */
- .align 3
-+
-+#ifdef __ELF__
-+.section .note.GNU-stack,"",%progbits
-+#endif
-Index: ocaml-3.12.0/asmrun/arm.S
-===================================================================
---- ocaml-3.12.0.orig/asmrun/arm.S
-+++ ocaml-3.12.0/asmrun/arm.S
-@@ -316,3 +316,7 @@ caml_system__frametable:
- .short -1 /* negative frame size => use callback link */
- .short 0 /* no roots */
- .align 2
-+
-+#ifdef __ELF__
-+.section .note.GNU-stack,"",%progbits
-+#endif
-Index: ocaml-3.12.0/asmrun/hppa.S
-===================================================================
---- ocaml-3.12.0.orig/asmrun/hppa.S
-+++ ocaml-3.12.0/asmrun/hppa.S
-@@ -532,3 +532,8 @@ G(caml_system__frametable):
- .long L104 + 3 /* return address into callback */
- .short -1 /* negative frame size => use callback link */
- .short 0 /* no roots */
-+
-+#ifdef __ELF__
-+.section .note.GNU-stack,"",%progbits
-+#endif
-+
-Index: ocaml-3.12.0/asmrun/ia64.S
-===================================================================
---- ocaml-3.12.0.orig/asmrun/ia64.S
-+++ ocaml-3.12.0/asmrun/ia64.S
-@@ -521,3 +521,8 @@ caml_system__frametable:
-
- .common caml_saved_bsp#, 8, 8
- .common caml_saved_rnat#, 8, 8
-+
-+#ifdef __ELF__
-+.section .note.GNU-stack,"",%progbits
-+#endif
-+
-Index: ocaml-3.12.0/asmrun/m68k.S
-===================================================================
---- ocaml-3.12.0.orig/asmrun/m68k.S
-+++ ocaml-3.12.0/asmrun/m68k.S
-@@ -242,3 +242,8 @@ _caml_system__frametable:
- .long L107 | return address into callback
- .word -1 | negative frame size => use callback link
- .word 0 | no roots here
-+
-+#ifdef __ELF__
-+.section .note.GNU-stack,"",%progbits
-+#endif
-+
-Index: ocaml-3.12.0/asmrun/sparc.S
-===================================================================
---- ocaml-3.12.0.orig/asmrun/sparc.S
-+++ ocaml-3.12.0/asmrun/sparc.S
-@@ -405,3 +405,8 @@ Caml_system__frametable:
- .type Caml_raise_exception, #function
- .type Caml_system__frametable, #object
- #endif
-+
-+#ifdef __ELF__
-+.section .note.GNU-stack,"",%progbits
-+#endif
-+
-Index: ocaml-3.12.0/asmcomp/arm/emit.mlp
-===================================================================
---- ocaml-3.12.0.orig/asmcomp/arm/emit.mlp
-+++ ocaml-3.12.0/asmcomp/arm/emit.mlp
-@@ -601,6 +601,13 @@ let data l =
- ` .data\n`;
- List.iter emit_item l
-
-+(* Mark stack as non executable *)
-+let nx_stack() =
-+ if Config.system = "linux" then
-+ ` .section .note.GNU-stack,\"\",%progbits\n`
-+
-+
-+
- (* Beginning / end of an assembly file *)
-
- let begin_assembly() =
-@@ -617,6 +624,7 @@ let begin_assembly() =
- `{emit_symbol lbl_begin}:\n`
-
- let end_assembly () =
-+ nx_stack();
- let lbl_end = Compilenv.make_symbol (Some "code_end") in
- ` .text\n`;
- ` .global {emit_symbol lbl_end}\n`;
-Index: ocaml-3.12.0/asmcomp/hppa/emit.mlp
-===================================================================
---- ocaml-3.12.0.orig/asmcomp/hppa/emit.mlp
-+++ ocaml-3.12.0/asmcomp/hppa/emit.mlp
-@@ -996,6 +996,12 @@ let data l =
- ` .data\n`;
- List.iter emit_item l
-
-+(* Mark stack as non executable *)
-+let nx_stack() =
-+ if Config.system = "linux" then
-+ ` .section .note.GNU-stack,\"\",%progbits\n`
-+
-+
- (* Beginning / end of an assembly file *)
-
- let begin_assembly() =
-@@ -1024,6 +1030,7 @@ let begin_assembly() =
-
-
- let end_assembly() =
-+ nx_stack();
- ` .code\n`;
- let lbl_end = Compilenv.make_symbol (Some "code_end") in
- declare_global lbl_end;
-Index: ocaml-3.12.0/asmcomp/ia64/emit.mlp
-===================================================================
---- ocaml-3.12.0.orig/asmcomp/ia64/emit.mlp
-+++ ocaml-3.12.0/asmcomp/ia64/emit.mlp
-@@ -1306,6 +1306,11 @@ let data l =
- ` .align 8\n`;
- List.iter emit_item l
-
-+(* Mark stack as non executable *)
-+let nx_stack() =
-+ if Config.system = "linux" then
-+ ` .section .note.GNU-stack,\"\",%progbits\n`
-+
- (* Beginning / end of an assembly file *)
-
- let begin_assembly() =
-@@ -1315,6 +1320,7 @@ let begin_assembly() =
- emit_define_symbol (Compilenv.make_symbol (Some "code_begin"))
-
- let end_assembly () =
-+ nx_stack();
- ` .data\n`;
- emit_define_symbol (Compilenv.make_symbol (Some "data_end"));
- ` .text\n`;
-Index: ocaml-3.12.0/asmcomp/power/emit.mlp
-===================================================================
---- ocaml-3.12.0.orig/asmcomp/power/emit.mlp
-+++ ocaml-3.12.0/asmcomp/power/emit.mlp
-@@ -927,6 +927,12 @@ let data l =
- emit_string data_space;
- List.iter emit_item l
-
-+(* Mark stack as non executable *)
-+let nx_stack() =
-+ if Config.system = "elf" then
-+ ` .section .note.GNU-stack,\"\",%progbits\n`
-+
-+
- (* Beginning / end of an assembly file *)
-
- let begin_assembly() =
-@@ -943,6 +949,7 @@ let begin_assembly() =
- `{emit_symbol lbl_begin}:\n`
-
- let end_assembly() =
-+ nx_stack();
- if pic_externals then
- (* Emit the pointers to external functions *)
- StringSet.iter emit_external !external_functions;
-Index: ocaml-3.12.0/asmcomp/sparc/emit.mlp
-===================================================================
---- ocaml-3.12.0.orig/asmcomp/sparc/emit.mlp
-+++ ocaml-3.12.0/asmcomp/sparc/emit.mlp
-@@ -742,6 +742,12 @@ let data l =
- ` .data\n`;
- List.iter emit_item l
-
-+(* Mark stack as non executable *)
-+let nx_stack() =
-+ if Config.system = "linux" then
-+ ` .section .note.GNU-stack,\"\",%progbits\n`
-+
-+
- (* Beginning / end of an assembly file *)
-
- let begin_assembly() =
-@@ -755,6 +761,7 @@ let begin_assembly() =
- `{emit_symbol lbl_begin}:\n`
-
- let end_assembly() =
-+ nx_stack();
- ` .text\n`;
- let lbl_end = Compilenv.make_symbol (Some "code_end") in
- ` .global {emit_symbol lbl_end}\n`;
-Index: ocaml-3.12.0/asmrun/power-elf.S
-===================================================================
---- ocaml-3.12.0.orig/asmrun/power-elf.S
-+++ ocaml-3.12.0/asmrun/power-elf.S
-@@ -418,3 +418,8 @@ caml_system__frametable:
- .long .L105 + 4 /* return address into callback */
- .short -1 /* negative size count => use callback link */
- .short 0 /* no roots here */
-+
-+#ifdef __ELF__
-+.section .note.GNU-stack,"",%progbits
-+#endif
-+
diff --git a/src/patchsets/ocaml/3.12.0/020_all_configure.patch b/src/patchsets/ocaml/3.12.0/020_all_configure.patch
deleted file mode 100644
index 2ae0c49432..0000000000
--- a/src/patchsets/ocaml/3.12.0/020_all_configure.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-The configure script doesn't inherit previous defined variables,
-overwriting previous declarations of bytecccompopts, bytecclinkopts,
-nativecccompopts and nativecclinkopts. Reported upstream as issue 0004267.
-
-Index: ocaml-3.12.0/configure
-===================================================================
---- ocaml-3.12.0.orig/configure
-+++ ocaml-3.12.0/configure
-@@ -241,7 +241,7 @@ esac
- # Configure the bytecode compiler
-
- bytecc="$cc"
--mkexe="\$(BYTECC)"
-+mkexe="\$(BYTECC) \$(BYTECCLINKOPTS)"
- bytecccompopts=""
- bytecclinkopts=""
- dllccompopts=""
-@@ -1582,7 +1582,15 @@ fi
-
- # Final twiddling of compiler options to work around known bugs
-
-+bytecccompopts="$CFLAGS $bytecccompopts"
-+bytecclinkopts="$LDFLAGS $bytecclinkopts"
-+natdynlinkopts="$LDFLAGS $natdynlinkopts"
-+nativeccrawlinkopts="$RAW_LDFLAGS $nativecclinkopts"
-+nativecclinkopts="$LDFLAGS $nativecclinkopts"
-+nativecccompopts="$CFLAGS $nativecccompopts"
- nativeccprofopts="$nativecccompopts"
-+mksharedlib="$mksharedlib $LDFLAGS"
-+mkmaindll="$mkmaindll $LDFLAGS"
- case "$buggycc" in
- gcc.2.96)
- bytecccompopts="$bytecccompopts -fomit-frame-pointer"
-@@ -1618,6 +1626,7 @@ echo "NATIVECC=$nativecc" >> Makefile
- echo "NATIVECCCOMPOPTS=$nativecccompopts" >> Makefile
- echo "NATIVECCPROFOPTS=$nativeccprofopts" >> Makefile
- echo "NATIVECCLINKOPTS=$nativecclinkopts" >> Makefile
-+echo "NATIVECCRAWLINKOPTS=$nativeccrawlinkopts" >> Makefile
- echo "NATIVECCRPATH=$nativeccrpath" >> Makefile
- echo "NATIVECCLIBS=$cclibs $dllib" >> Makefile
- echo "ASM=$as" >> Makefile
-@@ -1630,7 +1639,7 @@ echo "DEBUGGER=$debugger" >> Makefile
- echo "CC_PROFILE=$cc_profile" >> Makefile
- echo "SYSTHREAD_SUPPORT=$systhread_support" >> Makefile
- echo "PARTIALLD=$partialld" >> Makefile
--echo "PACKLD=\$(PARTIALLD) \$(NATIVECCLINKOPTS) -o " \
-+echo "PACKLD=\$(PARTIALLD) \$(NATIVECCRAWLINKOPTS) -o " \
- | sed -e 's/ $/\\ /' >> Makefile
- echo "DLLCCCOMPOPTS=$dllccompopts" >> Makefile
- echo "IFLEXDIR=$iflexdir" >> Makefile
diff --git a/src/patchsets/ocaml/3.12.0/030_all_automagic.patch b/src/patchsets/ocaml/3.12.0/030_all_automagic.patch
deleted file mode 100644
index edf1c31282..0000000000
--- a/src/patchsets/ocaml/3.12.0/030_all_automagic.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-ocaml has automagics on libX11 and gdbm
-http://caml.inria.fr/mantis/view.php?id=4278
-
-Index: ocaml-3.12.0/configure
-===================================================================
---- ocaml-3.12.0.orig/configure
-+++ ocaml-3.12.0/configure
-@@ -33,6 +33,8 @@ x11_include_dir=''
- x11_lib_dir=''
- tk_wanted=yes
- pthread_wanted=yes
-+graph_wanted=yes
-+dbm_wanted=yes
- tk_defs=''
- tk_libs=''
- tk_x11=yes
-@@ -93,6 +95,10 @@ while : ; do
- ;; # Ignored for backward compatibility
- -no-pthread*|--no-pthread*)
- pthread_wanted=no;;
-+ -no-dbm|--no-dbm)
-+ dbm_wanted=no;;
-+ -no-graph|--no-graph)
-+ graph_wanted=no;;
- -no-tk|--no-tk)
- tk_wanted=no;;
- -partialld|--partialld)
-@@ -1372,7 +1378,7 @@ do
- done
-
-
--if test "$x11_include" = "not found" || test "$x11_link" = "not found"
-+if test "$x11_include" = "not found" || test "$x11_link" = "not found" || test "$graph_wanted" = "no"
- then
- echo "X11 not found, the \"graph\" library will not be supported."
- x11_include=""
-@@ -1420,7 +1426,7 @@ for dir in /usr/include /usr/include/db1
- break
- fi
- done
--if test "$dbm_include" = "not found" || test "$dbm_link" = "not found"; then
-+if test "$dbm_include" = "not found" || test "$dbm_link" = "not found" || test "$dbm_wanted" = "no"; then
- echo "NDBM not found, the \"dbm\" library will not be supported."
- else
- echo "NDBM found (in $dbm_include)"
-@@ -1722,7 +1728,7 @@ echo " $otherlibraries"
- echo "Configuration for the \"num\" library:"
- echo " target architecture ...... $bng_arch (asm level $bng_asm_level)"
-
--if test "$x11_include" != "not found" && test "$x11_lib" != "not found"; then
-+if test "$x11_include" != "not found" && test "$x11_lib" != "not found" && test "$graph_wanted" != "no"; then
- echo "Configuration for the \"graph\" library:"
- echo " options for compiling .... $x11_include"
- echo " options for linking ...... $x11_link"
diff --git a/src/patchsets/ocaml/3.12.0/040_all_yaccldflags.patch b/src/patchsets/ocaml/3.12.0/040_all_yaccldflags.patch
deleted file mode 100644
index 872f254e85..0000000000
--- a/src/patchsets/ocaml/3.12.0/040_all_yaccldflags.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Respect LDFLAGS for ocamlyacc
-
-http://caml.inria.fr/mantis/view.php?id=4698
-
-Index: ocaml-3.12.0/yacc/Makefile
-===================================================================
---- ocaml-3.12.0.orig/yacc/Makefile
-+++ ocaml-3.12.0/yacc/Makefile
-@@ -25,7 +25,7 @@ OBJS= closure.o error.o lalr.o lr0.o mai
- all: ocamlyacc$(EXE)
-
- ocamlyacc$(EXE): $(OBJS)
-- $(CC) $(CFLAGS) $(CCLINKFLAGS) -o ocamlyacc $(OBJS)
-+ $(CC) $(LDFLAGS) $(CFLAGS) $(CCLINKFLAGS) -o ocamlyacc $(OBJS)
-
- version.h : ../VERSION
- echo "#define OCAML_VERSION \"`sed -e 1q ../VERSION`\"" >version.h
diff --git a/src/patchsets/ocaml/3.12.0/050_all_objinfoldflags.patch b/src/patchsets/ocaml/3.12.0/050_all_objinfoldflags.patch
deleted file mode 100644
index 3c1ff9f46a..0000000000
--- a/src/patchsets/ocaml/3.12.0/050_all_objinfoldflags.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: ocaml-3.12.0/tools/Makefile.shared
-===================================================================
---- ocaml-3.12.0.orig/tools/Makefile.shared
-+++ ocaml-3.12.0/tools/Makefile.shared
-@@ -229,7 +229,7 @@ beforedepend:: opnames.ml
- # Display info on compiled files
-
- objinfo_helper$(EXE): objinfo_helper.c ../config/s.h
-- $(BYTECC) -o objinfo_helper$(EXE) $(BYTECCCOMPOPTS) \
-+ $(MKEXE) -o objinfo_helper$(EXE) $(BYTECCCOMPOPTS) \
- objinfo_helper.c $(LIBBFD_LINK)
-
- OBJINFO=../utils/misc.cmo ../utils/config.cmo ../bytecomp/bytesections.cmo \
diff --git a/src/patchsets/ocaml/3.12.0/060_all_linkorder.patch b/src/patchsets/ocaml/3.12.0/060_all_linkorder.patch
deleted file mode 100644
index 07176b47c6..0000000000
--- a/src/patchsets/ocaml/3.12.0/060_all_linkorder.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-Always pass the libraries to link as last argument to the linker.
-Should fix build failures with as-needed such as:
-https://bugs.gentoo.org/show_bug.cgi?id=331075
-https://bugs.gentoo.org/show_bug.cgi?id=331377
-
-Index: ocaml-3.12.0/utils/ccomp.ml
-===================================================================
---- ocaml-3.12.0.orig/utils/ccomp.ml
-+++ ocaml-3.12.0/utils/ccomp.ml
-@@ -98,8 +98,18 @@ type link_mode =
- | MainDll
- | Partial
-
-+let is_lib name = String.length name >= 2 && String.sub name 0 2 = "-l"
-+
-+let rec link_order init libs = function
-+ [] -> List.rev_append init (List.rev libs)
-+ | t::q -> if is_lib t then link_order init (t::libs) q else link_order (t::init) libs q
-+
-+let rec split_libs libs others = function
-+ [] -> (libs, others)
-+ | t::q -> if is_lib t then split_libs (t::libs) others q else split_libs libs (t::others) q
-+
- let call_linker mode output_name files extra =
-- let files = quote_files files in
-+ let files = quote_files (link_order [] [] files) in
- let cmd =
- if mode = Partial then
- Printf.sprintf "%s%s %s %s"
-@@ -108,7 +118,8 @@ let call_linker mode output_name files e
- files
- extra
- else
-- Printf.sprintf "%s -o %s %s %s %s %s %s %s"
-+ let (cclibs,ccopts) = split_libs [] [] !Clflags.ccopts in
-+ Printf.sprintf "%s -o %s %s %s %s %s %s %s %s"
- (match !Clflags.c_compiler, mode with
- | Some cc, _ -> cc
- | None, Exe -> Config.mkexe
-@@ -120,8 +131,9 @@ let call_linker mode output_name files e
- (if !Clflags.gprofile then Config.cc_profile else "")
- "" (*(Clflags.std_include_flag "-I")*)
- (quote_prefixed "-L" !Config.load_path)
-- (String.concat " " (List.rev !Clflags.ccopts))
-+ (String.concat " " ccopts)
- files
-+ (String.concat " " cclibs)
- extra
- in
- command cmd = 0
diff --git a/src/patchsets/ocaml/3.12.0/series b/src/patchsets/ocaml/3.12.0/series
deleted file mode 100644
index d3925099bf..0000000000
--- a/src/patchsets/ocaml/3.12.0/series
+++ /dev/null
@@ -1,6 +0,0 @@
-010_all_execstacks.patch
-020_all_configure.patch
-030_all_automagic.patch
-040_all_yaccldflags.patch
-050_all_objinfoldflags.patch
-060_all_linkorder.patch
diff --git a/src/patchsets/ocaml/4.00.0/010_all_execstacks.patch b/src/patchsets/ocaml/4.00.0/010_all_execstacks.patch
deleted file mode 100644
index 38c9b7ab36..0000000000
--- a/src/patchsets/ocaml/4.00.0/010_all_execstacks.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-Fix the EXEC_STACK in ocaml compiled binaries (#153382)
-
-Index: ocaml-4.00.0+beta2/asmrun/sparc.S
-===================================================================
---- ocaml-4.00.0+beta2.orig/asmrun/sparc.S
-+++ ocaml-4.00.0+beta2/asmrun/sparc.S
-@@ -358,3 +358,8 @@ caml_system__frametable:
- .type caml_raise_exception, #function
- .type caml_system__frametable, #object
- #endif
-+
-+#ifdef __ELF__
-+.section .note.GNU-stack,"",%progbits
-+#endif
-+
-Index: ocaml-4.00.0+beta2/asmcomp/arm/emit.mlp
-===================================================================
---- ocaml-4.00.0+beta2.orig/asmcomp/arm/emit.mlp
-+++ ocaml-4.00.0+beta2/asmcomp/arm/emit.mlp
-@@ -895,6 +895,13 @@ let data l =
- ` .data\n`;
- List.iter emit_item l
-
-+(* Mark stack as non executable *)
-+let nx_stack() =
-+ if Config.system = "linux" then
-+ ` .section .note.GNU-stack,\"\",%progbits\n`
-+
-+
-+
- (* Beginning / end of an assembly file *)
-
- let begin_assembly() =
-@@ -926,6 +933,7 @@ let begin_assembly() =
- `{emit_symbol lbl_begin}:\n`
-
- let end_assembly () =
-+ nx_stack();
- let lbl_end = Compilenv.make_symbol (Some "code_end") in
- ` .text\n`;
- ` .globl {emit_symbol lbl_end}\n`;
-Index: ocaml-4.00.0+beta2/asmcomp/power/emit.mlp
-===================================================================
---- ocaml-4.00.0+beta2.orig/asmcomp/power/emit.mlp
-+++ ocaml-4.00.0+beta2/asmcomp/power/emit.mlp
-@@ -930,6 +930,12 @@ let data l =
- emit_string data_space;
- List.iter emit_item l
-
-+(* Mark stack as non executable *)
-+let nx_stack() =
-+ if Config.system = "elf" then
-+ ` .section .note.GNU-stack,\"\",%progbits\n`
-+
-+
- (* Beginning / end of an assembly file *)
-
- let begin_assembly() =
-@@ -946,6 +952,7 @@ let begin_assembly() =
- `{emit_symbol lbl_begin}:\n`
-
- let end_assembly() =
-+ nx_stack();
- if pic_externals then
- (* Emit the pointers to external functions *)
- StringSet.iter emit_external !external_functions;
-Index: ocaml-4.00.0+beta2/asmcomp/sparc/emit.mlp
-===================================================================
---- ocaml-4.00.0+beta2.orig/asmcomp/sparc/emit.mlp
-+++ ocaml-4.00.0+beta2/asmcomp/sparc/emit.mlp
-@@ -745,6 +745,12 @@ let data l =
- ` .data\n`;
- List.iter emit_item l
-
-+(* Mark stack as non executable *)
-+let nx_stack() =
-+ if Config.system = "linux" then
-+ ` .section .note.GNU-stack,\"\",%progbits\n`
-+
-+
- (* Beginning / end of an assembly file *)
-
- let begin_assembly() =
-@@ -758,6 +764,7 @@ let begin_assembly() =
- `{emit_symbol lbl_begin}:\n`
-
- let end_assembly() =
-+ nx_stack();
- ` .text\n`;
- let lbl_end = Compilenv.make_symbol (Some "code_end") in
- ` .global {emit_symbol lbl_end}\n`;
-Index: ocaml-4.00.0+beta2/asmrun/power-elf.S
-===================================================================
---- ocaml-4.00.0+beta2.orig/asmrun/power-elf.S
-+++ ocaml-4.00.0+beta2/asmrun/power-elf.S
-@@ -424,3 +424,8 @@ caml_system__frametable:
- .long .L105 + 4 /* return address into callback */
- .short -1 /* negative size count => use callback link */
- .short 0 /* no roots here */
-+
-+#ifdef __ELF__
-+.section .note.GNU-stack,"",%progbits
-+#endif
-+
-Index: ocaml-4.00.0+beta2/asmrun/arm.S
-===================================================================
---- ocaml-4.00.0+beta2.orig/asmrun/arm.S
-+++ ocaml-4.00.0+beta2/asmrun/arm.S
-@@ -446,3 +446,7 @@ caml_system__frametable:
- .align 2
- .type caml_system__frametable, %object
- .size caml_system__frametable, .-caml_system__frametable
-+
-+#ifdef __ELF__
-+.section .note.GNU-stack,"",%progbits
-+#endif
diff --git a/src/patchsets/ocaml/4.00.0/020_all_configure.patch b/src/patchsets/ocaml/4.00.0/020_all_configure.patch
deleted file mode 100644
index 779a4b556b..0000000000
--- a/src/patchsets/ocaml/4.00.0/020_all_configure.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-The configure script doesn't inherit previous defined variables,
-overwriting previous declarations of bytecccompopts, bytecclinkopts,
-nativecccompopts and nativecclinkopts. Reported upstream as issue 0004267.
-
-Index: ocaml-4.00.0+beta2/configure
-===================================================================
---- ocaml-4.00.0+beta2.orig/configure
-+++ ocaml-4.00.0+beta2/configure
-@@ -255,7 +255,7 @@ esac
- # Configure the bytecode compiler
-
- bytecc="$cc"
--mkexe="\$(BYTECC)"
-+mkexe="\$(BYTECC) \$(BYTECCLINKOPTS)"
- mkexedebugflag="-g"
- bytecccompopts=""
- bytecclinkopts=""
-@@ -1565,7 +1565,15 @@ fi
-
- # Final twiddling of compiler options to work around known bugs
-
-+bytecccompopts="$CFLAGS $bytecccompopts"
-+bytecclinkopts="$LDFLAGS $bytecclinkopts"
-+natdynlinkopts="$LDFLAGS $natdynlinkopts"
-+nativeccrawlinkopts="$RAW_LDFLAGS $nativecclinkopts"
-+nativecclinkopts="$LDFLAGS $nativecclinkopts"
-+nativecccompopts="$CFLAGS $nativecccompopts"
- nativeccprofopts="$nativecccompopts"
-+mksharedlib="$mksharedlib $LDFLAGS"
-+mkmaindll="$mkmaindll $LDFLAGS"
- case "$buggycc" in
- gcc.2.96)
- bytecccompopts="$bytecccompopts -fomit-frame-pointer"
-@@ -1601,6 +1609,7 @@ echo "NATIVECC=$nativecc" >> Makefile
- echo "NATIVECCCOMPOPTS=$nativecccompopts" >> Makefile
- echo "NATIVECCPROFOPTS=$nativeccprofopts" >> Makefile
- echo "NATIVECCLINKOPTS=$nativecclinkopts" >> Makefile
-+echo "NATIVECCRAWLINKOPTS=$nativeccrawlinkopts" >> Makefile
- echo "NATIVECCRPATH=$nativeccrpath" >> Makefile
- echo "NATIVECCLIBS=$cclibs $dllib" >> Makefile
- echo "ASM=$as" >> Makefile
-@@ -1613,7 +1622,7 @@ echo "DEBUGGER=$debugger" >> Makefile
- echo "CC_PROFILE=$cc_profile" >> Makefile
- echo "SYSTHREAD_SUPPORT=$systhread_support" >> Makefile
- echo "PARTIALLD=$partialld" >> Makefile
--echo "PACKLD=\$(PARTIALLD) \$(NATIVECCLINKOPTS) -o " \
-+echo "PACKLD=\$(PARTIALLD) \$(NATIVECCRAWLINKOPTS) -o " \
- | sed -e 's/ $/\\ /' >> Makefile
- echo "DLLCCCOMPOPTS=$dllccompopts" >> Makefile
- echo "IFLEXDIR=$iflexdir" >> Makefile
diff --git a/src/patchsets/ocaml/4.00.0/040_all_yaccldflags.patch b/src/patchsets/ocaml/4.00.0/040_all_yaccldflags.patch
deleted file mode 100644
index 67717e943a..0000000000
--- a/src/patchsets/ocaml/4.00.0/040_all_yaccldflags.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Respect LDFLAGS for ocamlyacc
-
-http://caml.inria.fr/mantis/view.php?id=4698
-
-Index: ocaml-4.00.0+beta2/yacc/Makefile
-===================================================================
---- ocaml-4.00.0+beta2.orig/yacc/Makefile
-+++ ocaml-4.00.0+beta2/yacc/Makefile
-@@ -25,7 +25,7 @@ OBJS= closure.o error.o lalr.o lr0.o mai
- all: ocamlyacc$(EXE)
-
- ocamlyacc$(EXE): $(OBJS)
-- $(CC) $(CFLAGS) $(CCLINKFLAGS) -o ocamlyacc $(OBJS)
-+ $(CC) $(LDFLAGS) $(CFLAGS) $(CCLINKFLAGS) -o ocamlyacc $(OBJS)
-
- version.h : ../VERSION
- echo "#define OCAML_VERSION \"`sed -e 1q ../VERSION`\"" >version.h
diff --git a/src/patchsets/ocaml/4.00.0/050_all_objinfoldflags.patch b/src/patchsets/ocaml/4.00.0/050_all_objinfoldflags.patch
deleted file mode 100644
index e639585b8f..0000000000
--- a/src/patchsets/ocaml/4.00.0/050_all_objinfoldflags.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: ocaml-4.00.0+beta2/tools/Makefile.shared
-===================================================================
---- ocaml-4.00.0+beta2.orig/tools/Makefile.shared
-+++ ocaml-4.00.0+beta2/tools/Makefile.shared
-@@ -268,7 +268,7 @@ beforedepend:: opnames.ml
- # Display info on compiled files
-
- objinfo_helper$(EXE): objinfo_helper.c ../config/s.h
-- $(BYTECC) -o objinfo_helper$(EXE) $(BYTECCCOMPOPTS) \
-+ $(MKEXE) -o objinfo_helper$(EXE) $(BYTECCCOMPOPTS) \
- objinfo_helper.c $(LIBBFD_LINK)
-
- OBJINFO=../utils/misc.cmo ../utils/config.cmo \
diff --git a/src/patchsets/ocaml/4.00.0/series b/src/patchsets/ocaml/4.00.0/series
deleted file mode 100644
index 749ed9f477..0000000000
--- a/src/patchsets/ocaml/4.00.0/series
+++ /dev/null
@@ -1,4 +0,0 @@
-010_all_execstacks.patch
-020_all_configure.patch
-040_all_yaccldflags.patch
-050_all_objinfoldflags.patch
diff --git a/src/patchsets/ocaml/4.00.1/010_all_execstacks.patch b/src/patchsets/ocaml/4.00.1/010_all_execstacks.patch
deleted file mode 100644
index e8ee75ad06..0000000000
--- a/src/patchsets/ocaml/4.00.1/010_all_execstacks.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-Fix the EXEC_STACK in ocaml compiled binaries (#153382)
-
-Index: ocaml-4.00.1/asmrun/sparc.S
-===================================================================
---- ocaml-4.00.1.orig/asmrun/sparc.S
-+++ ocaml-4.00.1/asmrun/sparc.S
-@@ -358,3 +358,8 @@ caml_system__frametable:
- .type caml_raise_exception, #function
- .type caml_system__frametable, #object
- #endif
-+
-+#ifdef __ELF__
-+.section .note.GNU-stack,"",%progbits
-+#endif
-+
-Index: ocaml-4.00.1/asmcomp/arm/emit.mlp
-===================================================================
---- ocaml-4.00.1.orig/asmcomp/arm/emit.mlp
-+++ ocaml-4.00.1/asmcomp/arm/emit.mlp
-@@ -895,6 +895,13 @@ let data l =
- ` .data\n`;
- List.iter emit_item l
-
-+(* Mark stack as non executable *)
-+let nx_stack() =
-+ if Config.system = "linux" then
-+ ` .section .note.GNU-stack,\"\",%progbits\n`
-+
-+
-+
- (* Beginning / end of an assembly file *)
-
- let begin_assembly() =
-@@ -926,6 +933,7 @@ let begin_assembly() =
- `{emit_symbol lbl_begin}:\n`
-
- let end_assembly () =
-+ nx_stack();
- let lbl_end = Compilenv.make_symbol (Some "code_end") in
- ` .text\n`;
- ` .globl {emit_symbol lbl_end}\n`;
-Index: ocaml-4.00.1/asmcomp/power/emit.mlp
-===================================================================
---- ocaml-4.00.1.orig/asmcomp/power/emit.mlp
-+++ ocaml-4.00.1/asmcomp/power/emit.mlp
-@@ -930,6 +930,12 @@ let data l =
- emit_string data_space;
- List.iter emit_item l
-
-+(* Mark stack as non executable *)
-+let nx_stack() =
-+ if Config.system = "elf" then
-+ ` .section .note.GNU-stack,\"\",%progbits\n`
-+
-+
- (* Beginning / end of an assembly file *)
-
- let begin_assembly() =
-@@ -946,6 +952,7 @@ let begin_assembly() =
- `{emit_symbol lbl_begin}:\n`
-
- let end_assembly() =
-+ nx_stack();
- if pic_externals then
- (* Emit the pointers to external functions *)
- StringSet.iter emit_external !external_functions;
-Index: ocaml-4.00.1/asmcomp/sparc/emit.mlp
-===================================================================
---- ocaml-4.00.1.orig/asmcomp/sparc/emit.mlp
-+++ ocaml-4.00.1/asmcomp/sparc/emit.mlp
-@@ -745,6 +745,12 @@ let data l =
- ` .data\n`;
- List.iter emit_item l
-
-+(* Mark stack as non executable *)
-+let nx_stack() =
-+ if Config.system = "linux" then
-+ ` .section .note.GNU-stack,\"\",%progbits\n`
-+
-+
- (* Beginning / end of an assembly file *)
-
- let begin_assembly() =
-@@ -758,6 +764,7 @@ let begin_assembly() =
- `{emit_symbol lbl_begin}:\n`
-
- let end_assembly() =
-+ nx_stack();
- ` .text\n`;
- let lbl_end = Compilenv.make_symbol (Some "code_end") in
- ` .global {emit_symbol lbl_end}\n`;
-Index: ocaml-4.00.1/asmrun/power-elf.S
-===================================================================
---- ocaml-4.00.1.orig/asmrun/power-elf.S
-+++ ocaml-4.00.1/asmrun/power-elf.S
-@@ -424,3 +424,8 @@ caml_system__frametable:
- .long .L105 + 4 /* return address into callback */
- .short -1 /* negative size count => use callback link */
- .short 0 /* no roots here */
-+
-+#ifdef __ELF__
-+.section .note.GNU-stack,"",%progbits
-+#endif
-+
-Index: ocaml-4.00.1/asmrun/arm.S
-===================================================================
---- ocaml-4.00.1.orig/asmrun/arm.S
-+++ ocaml-4.00.1/asmrun/arm.S
-@@ -446,3 +446,7 @@ caml_system__frametable:
- .align 2
- .type caml_system__frametable, %object
- .size caml_system__frametable, .-caml_system__frametable
-+
-+#ifdef __ELF__
-+.section .note.GNU-stack,"",%progbits
-+#endif
diff --git a/src/patchsets/ocaml/4.00.1/020_all_configure.patch b/src/patchsets/ocaml/4.00.1/020_all_configure.patch
deleted file mode 100644
index 1179212f32..0000000000
--- a/src/patchsets/ocaml/4.00.1/020_all_configure.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-The configure script doesn't inherit previous defined variables,
-overwriting previous declarations of bytecccompopts, bytecclinkopts,
-nativecccompopts and nativecclinkopts. Reported upstream as issue 0004267.
-
-Index: ocaml-4.00.1/configure
-===================================================================
---- ocaml-4.00.1.orig/configure
-+++ ocaml-4.00.1/configure
-@@ -255,7 +255,7 @@ esac
- # Configure the bytecode compiler
-
- bytecc="$cc"
--mkexe="\$(BYTECC)"
-+mkexe="\$(BYTECC) \$(BYTECCLINKOPTS)"
- mkexedebugflag="-g"
- bytecccompopts=""
- bytecclinkopts=""
-@@ -1569,7 +1569,15 @@ fi
-
- # Final twiddling of compiler options to work around known bugs
-
-+bytecccompopts="$CFLAGS $bytecccompopts"
-+bytecclinkopts="$LDFLAGS $bytecclinkopts"
-+natdynlinkopts="$LDFLAGS $natdynlinkopts"
-+nativeccrawlinkopts="$RAW_LDFLAGS $nativecclinkopts"
-+nativecclinkopts="$LDFLAGS $nativecclinkopts"
-+nativecccompopts="$CFLAGS $nativecccompopts"
- nativeccprofopts="$nativecccompopts"
-+mksharedlib="$mksharedlib $LDFLAGS"
-+mkmaindll="$mkmaindll $LDFLAGS"
- case "$buggycc" in
- gcc.2.96)
- bytecccompopts="$bytecccompopts -fomit-frame-pointer"
-@@ -1605,6 +1613,7 @@ echo "NATIVECC=$nativecc" >> Makefile
- echo "NATIVECCCOMPOPTS=$nativecccompopts" >> Makefile
- echo "NATIVECCPROFOPTS=$nativeccprofopts" >> Makefile
- echo "NATIVECCLINKOPTS=$nativecclinkopts" >> Makefile
-+echo "NATIVECCRAWLINKOPTS=$nativeccrawlinkopts" >> Makefile
- echo "NATIVECCRPATH=$nativeccrpath" >> Makefile
- echo "NATIVECCLIBS=$cclibs $dllib" >> Makefile
- echo "ASM=$as" >> Makefile
-@@ -1617,7 +1626,7 @@ echo "DEBUGGER=$debugger" >> Makefile
- echo "CC_PROFILE=$cc_profile" >> Makefile
- echo "SYSTHREAD_SUPPORT=$systhread_support" >> Makefile
- echo "PARTIALLD=$partialld" >> Makefile
--echo "PACKLD=\$(PARTIALLD) \$(NATIVECCLINKOPTS) -o " \
-+echo "PACKLD=\$(PARTIALLD) \$(NATIVECCRAWLINKOPTS) -o " \
- | sed -e 's/ $/\\ /' >> Makefile
- echo "DLLCCCOMPOPTS=$dllccompopts" >> Makefile
- echo "IFLEXDIR=$iflexdir" >> Makefile
diff --git a/src/patchsets/ocaml/4.00.1/050_all_objinfoldflags.patch b/src/patchsets/ocaml/4.00.1/050_all_objinfoldflags.patch
deleted file mode 100644
index 762ef59458..0000000000
--- a/src/patchsets/ocaml/4.00.1/050_all_objinfoldflags.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: ocaml-4.00.1/tools/Makefile.shared
-===================================================================
---- ocaml-4.00.1.orig/tools/Makefile.shared
-+++ ocaml-4.00.1/tools/Makefile.shared
-@@ -268,7 +268,7 @@ beforedepend:: opnames.ml
- # Display info on compiled files
-
- objinfo_helper$(EXE): objinfo_helper.c ../config/s.h
-- $(BYTECC) -o objinfo_helper$(EXE) $(BYTECCCOMPOPTS) \
-+ $(MKEXE) -o objinfo_helper$(EXE) $(BYTECCCOMPOPTS) \
- objinfo_helper.c $(LIBBFD_LINK)
-
- OBJINFO=../utils/misc.cmo ../utils/config.cmo \
diff --git a/src/patchsets/ocaml/4.00.1/060_all_tk86.patch b/src/patchsets/ocaml/4.00.1/060_all_tk86.patch
deleted file mode 100644
index b27b4707dc..0000000000
--- a/src/patchsets/ocaml/4.00.1/060_all_tk86.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From archlinux. Otherwise, labltk is not built with tk 8.6 installed...
-https://bugs.archlinux.org/task/33302
-
-Index: ocaml-4.00.1/configure
-===================================================================
---- ocaml-4.00.1.orig/configure
-+++ ocaml-4.00.1/configure
-@@ -803,6 +803,8 @@ fi
-
- echo "ARCMD=ar" >> Makefile
-
-+bytecccompopts="$bytecccompopts -DUSE_INTERP_RESULT"
-+nativecccompopts="$nativecccompopts -DUSE_INTERP_RESULT"
-
- # Do #! scripts work?
-
-@@ -1450,6 +1452,7 @@ if test $has_tk = true; then
- if test -n "$tcl_version" && test "x$tcl_version" != "xnone"; then
- echo "tcl.h and tk.h version $tcl_version found with \"$tk_defs\"."
- case $tcl_version in
-+ 8.6) tclmaj=8 tclmin=6 tkmaj=8 tkmin=6 ;;
- 8.5) tclmaj=8 tclmin=5 tkmaj=8 tkmin=5 ;;
- 8.4) tclmaj=8 tclmin=4 tkmaj=8 tkmin=4 ;;
- 8.3) tclmaj=8 tclmin=3 tkmaj=8 tkmin=3 ;;
diff --git a/src/patchsets/ocaml/4.00.1/series b/src/patchsets/ocaml/4.00.1/series
deleted file mode 100644
index feb513e709..0000000000
--- a/src/patchsets/ocaml/4.00.1/series
+++ /dev/null
@@ -1,4 +0,0 @@
-010_all_execstacks.patch
-020_all_configure.patch
-050_all_objinfoldflags.patch
-060_all_tk86.patch
diff --git a/src/patchsets/ocaml/4.01.0/010_all_execstacks.patch b/src/patchsets/ocaml/4.01.0/010_all_execstacks.patch
deleted file mode 100644
index 9d2311dbd2..0000000000
--- a/src/patchsets/ocaml/4.01.0/010_all_execstacks.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-Fix the EXEC_STACK in ocaml compiled binaries (#153382)
-
-Index: ocaml-4.01.0+beta1/asmrun/sparc.S
-===================================================================
---- ocaml-4.01.0+beta1.orig/asmrun/sparc.S
-+++ ocaml-4.01.0+beta1/asmrun/sparc.S
-@@ -356,3 +356,8 @@ caml_system__frametable:
- .type caml_raise_exception, #function
- .type caml_system__frametable, #object
- #endif
-+
-+#ifdef __ELF__
-+.section .note.GNU-stack,"",%progbits
-+#endif
-+
-Index: ocaml-4.01.0+beta1/asmcomp/arm/emit.mlp
-===================================================================
---- ocaml-4.01.0+beta1.orig/asmcomp/arm/emit.mlp
-+++ ocaml-4.01.0+beta1/asmcomp/arm/emit.mlp
-@@ -906,6 +906,13 @@ let data l =
- ` .data\n`;
- List.iter emit_item l
-
-+(* Mark stack as non executable *)
-+let nx_stack() =
-+ if Config.system = "linux" then
-+ ` .section .note.GNU-stack,\"\",%progbits\n`
-+
-+
-+
- (* Beginning / end of an assembly file *)
-
- let begin_assembly() =
-@@ -938,6 +945,7 @@ let begin_assembly() =
- `{emit_symbol lbl_begin}:\n`
-
- let end_assembly () =
-+ nx_stack();
- let lbl_end = Compilenv.make_symbol (Some "code_end") in
- ` .text\n`;
- ` .globl {emit_symbol lbl_end}\n`;
-Index: ocaml-4.01.0+beta1/asmcomp/power/emit.mlp
-===================================================================
---- ocaml-4.01.0+beta1.orig/asmcomp/power/emit.mlp
-+++ ocaml-4.01.0+beta1/asmcomp/power/emit.mlp
-@@ -931,6 +931,12 @@ let data l =
- emit_string data_space;
- List.iter emit_item l
-
-+(* Mark stack as non executable *)
-+let nx_stack() =
-+ if Config.system = "elf" then
-+ ` .section .note.GNU-stack,\"\",%progbits\n`
-+
-+
- (* Beginning / end of an assembly file *)
-
- let begin_assembly() =
-@@ -947,6 +953,7 @@ let begin_assembly() =
- `{emit_symbol lbl_begin}:\n`
-
- let end_assembly() =
-+ nx_stack();
- if pic_externals then
- (* Emit the pointers to external functions *)
- StringSet.iter emit_external !external_functions;
-Index: ocaml-4.01.0+beta1/asmcomp/sparc/emit.mlp
-===================================================================
---- ocaml-4.01.0+beta1.orig/asmcomp/sparc/emit.mlp
-+++ ocaml-4.01.0+beta1/asmcomp/sparc/emit.mlp
-@@ -742,6 +742,12 @@ let data l =
- ` .data\n`;
- List.iter emit_item l
-
-+(* Mark stack as non executable *)
-+let nx_stack() =
-+ if Config.system = "linux" then
-+ ` .section .note.GNU-stack,\"\",%progbits\n`
-+
-+
- (* Beginning / end of an assembly file *)
-
- let begin_assembly() =
-@@ -755,6 +761,7 @@ let begin_assembly() =
- `{emit_symbol lbl_begin}:\n`
-
- let end_assembly() =
-+ nx_stack();
- ` .text\n`;
- let lbl_end = Compilenv.make_symbol (Some "code_end") in
- ` .global {emit_symbol lbl_end}\n`;
-Index: ocaml-4.01.0+beta1/asmrun/power-elf.S
-===================================================================
---- ocaml-4.01.0+beta1.orig/asmrun/power-elf.S
-+++ ocaml-4.01.0+beta1/asmrun/power-elf.S
-@@ -422,3 +422,8 @@ caml_system__frametable:
- .long .L105 + 4 /* return address into callback */
- .short -1 /* negative size count => use callback link */
- .short 0 /* no roots here */
-+
-+#ifdef __ELF__
-+.section .note.GNU-stack,"",%progbits
-+#endif
-+
-Index: ocaml-4.01.0+beta1/asmrun/arm.S
-===================================================================
---- ocaml-4.01.0+beta1.orig/asmrun/arm.S
-+++ ocaml-4.01.0+beta1/asmrun/arm.S
-@@ -489,3 +489,7 @@ caml_system__frametable:
- .align 2
- .type caml_system__frametable, %object
- .size caml_system__frametable, .-caml_system__frametable
-+
-+#ifdef __ELF__
-+.section .note.GNU-stack,"",%progbits
-+#endif
diff --git a/src/patchsets/ocaml/4.01.0/020_all_configure.patch b/src/patchsets/ocaml/4.01.0/020_all_configure.patch
deleted file mode 100644
index 490e847315..0000000000
--- a/src/patchsets/ocaml/4.01.0/020_all_configure.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-The configure script doesn't inherit previous defined variables,
-overwriting previous declarations of bytecccompopts, bytecclinkopts,
-nativecccompopts and nativecclinkopts. Reported upstream as issue 0004267.
-
-Index: ocaml-4.01.0+beta1/configure
-===================================================================
---- ocaml-4.01.0+beta1.orig/configure
-+++ ocaml-4.01.0+beta1/configure
-@@ -256,7 +256,7 @@ esac
- # Configure the bytecode compiler
-
- bytecc="$cc"
--mkexe="\$(BYTECC)"
-+mkexe="\$(BYTECC) \$(BYTECCLINKOPTS)"
- mkexedebugflag="-g"
- bytecccompopts=""
- bytecclinkopts=""
-@@ -1600,7 +1600,15 @@ fi
-
- # Final twiddling of compiler options to work around known bugs
-
-+bytecccompopts="$CFLAGS $bytecccompopts"
-+bytecclinkopts="$LDFLAGS $bytecclinkopts"
-+natdynlinkopts="$LDFLAGS $natdynlinkopts"
-+nativeccrawlinkopts="$RAW_LDFLAGS $nativecclinkopts"
-+nativecclinkopts="$LDFLAGS $nativecclinkopts"
-+nativecccompopts="$CFLAGS $nativecccompopts"
- nativeccprofopts="$nativecccompopts"
-+mksharedlib="$mksharedlib $LDFLAGS"
-+mkmaindll="$mkmaindll $LDFLAGS"
- case "$buggycc" in
- gcc.2.96)
- bytecccompopts="$bytecccompopts -fomit-frame-pointer"
-@@ -1636,6 +1644,7 @@ echo "NATIVECC=$nativecc" >> Makefile
- echo "NATIVECCCOMPOPTS=$nativecccompopts" >> Makefile
- echo "NATIVECCPROFOPTS=$nativeccprofopts" >> Makefile
- echo "NATIVECCLINKOPTS=$nativecclinkopts" >> Makefile
-+echo "NATIVECCRAWLINKOPTS=$nativeccrawlinkopts" >> Makefile
- echo "NATIVECCRPATH=$nativeccrpath" >> Makefile
- echo "NATIVECCLIBS=$cclibs $dllib" >> Makefile
- echo "ASM=$as" >> Makefile
-@@ -1648,7 +1657,7 @@ echo "DEBUGGER=$debugger" >> Makefile
- echo "CC_PROFILE=$cc_profile" >> Makefile
- echo "SYSTHREAD_SUPPORT=$systhread_support" >> Makefile
- echo "PARTIALLD=$partialld" >> Makefile
--echo "PACKLD=\$(PARTIALLD) \$(NATIVECCLINKOPTS) -o " \
-+echo "PACKLD=\$(PARTIALLD) \$(NATIVECCRAWLINKOPTS) -o " \
- | sed -e 's/ $/\\ /' >> Makefile
- echo "DLLCCCOMPOPTS=$dllccompopts" >> Makefile
- echo "IFLEXDIR=$iflexdir" >> Makefile
diff --git a/src/patchsets/ocaml/4.01.0/050_all_objinfoldflags.patch b/src/patchsets/ocaml/4.01.0/050_all_objinfoldflags.patch
deleted file mode 100644
index 1789628a50..0000000000
--- a/src/patchsets/ocaml/4.01.0/050_all_objinfoldflags.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: ocaml-4.01.0+beta1/tools/Makefile.shared
-===================================================================
---- ocaml-4.01.0+beta1.orig/tools/Makefile.shared
-+++ ocaml-4.01.0+beta1/tools/Makefile.shared
-@@ -279,7 +279,7 @@ beforedepend:: opnames.ml
- # Display info on compiled files
-
- objinfo_helper$(EXE): objinfo_helper.c ../config/s.h
-- $(BYTECC) -o objinfo_helper$(EXE) $(BYTECCCOMPOPTS) \
-+ $(MKEXE) -o objinfo_helper$(EXE) $(BYTECCCOMPOPTS) \
- objinfo_helper.c $(LIBBFD_LINK)
-
- OBJINFO=../utils/misc.cmo ../utils/config.cmo \
diff --git a/src/patchsets/ocaml/4.01.0/series b/src/patchsets/ocaml/4.01.0/series
deleted file mode 100644
index a459212299..0000000000
--- a/src/patchsets/ocaml/4.01.0/series
+++ /dev/null
@@ -1,3 +0,0 @@
-010_all_execstacks.patch
-020_all_configure.patch
-050_all_objinfoldflags.patch
diff --git a/src/patchsets/ocaml/4.02.2/010_all_execstacks.patch b/src/patchsets/ocaml/4.02.2/010_all_execstacks.patch
deleted file mode 100644
index fa47d0c309..0000000000
--- a/src/patchsets/ocaml/4.02.2/010_all_execstacks.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-Fix the EXEC_STACK in ocaml compiled binaries (#153382)
-
-Index: ocaml-4.02.2/asmrun/sparc.S
-===================================================================
---- ocaml-4.02.2.orig/asmrun/sparc.S
-+++ ocaml-4.02.2/asmrun/sparc.S
-@@ -356,3 +356,8 @@ caml_system__frametable:
- .type caml_raise_exception, #function
- .type caml_system__frametable, #object
- #endif
-+
-+#ifdef __ELF__
-+.section .note.GNU-stack,"",%progbits
-+#endif
-+
-Index: ocaml-4.02.2/asmcomp/arm/emit.mlp
-===================================================================
---- ocaml-4.02.2.orig/asmcomp/arm/emit.mlp
-+++ ocaml-4.02.2/asmcomp/arm/emit.mlp
-@@ -888,6 +888,13 @@ let data l =
- ` .data\n`;
- List.iter emit_item l
-
-+(* Mark stack as non executable *)
-+let nx_stack() =
-+ if Config.system = "linux" then
-+ ` .section .note.GNU-stack,\"\",%progbits\n`
-+
-+
-+
- (* Beginning / end of an assembly file *)
-
- let begin_assembly() =
-@@ -920,6 +927,7 @@ let begin_assembly() =
- `{emit_symbol lbl_begin}:\n`
-
- let end_assembly () =
-+ nx_stack();
- let lbl_end = Compilenv.make_symbol (Some "code_end") in
- ` .text\n`;
- ` .globl {emit_symbol lbl_end}\n`;
-Index: ocaml-4.02.2/asmcomp/power/emit.mlp
-===================================================================
---- ocaml-4.02.2.orig/asmcomp/power/emit.mlp
-+++ ocaml-4.02.2/asmcomp/power/emit.mlp
-@@ -882,6 +882,12 @@ let data l =
- emit_string data_space;
- List.iter emit_item l
-
-+(* Mark stack as non executable *)
-+let nx_stack() =
-+ if Config.system = "elf" then
-+ ` .section .note.GNU-stack,\"\",%progbits\n`
-+
-+
- (* Beginning / end of an assembly file *)
-
- let begin_assembly() =
-@@ -898,6 +904,7 @@ let begin_assembly() =
- `{emit_symbol lbl_begin}:\n`
-
- let end_assembly() =
-+ nx_stack();
- if pic_externals then
- (* Emit the pointers to external functions *)
- StringSet.iter emit_external !external_functions;
-Index: ocaml-4.02.2/asmcomp/sparc/emit.mlp
-===================================================================
---- ocaml-4.02.2.orig/asmcomp/sparc/emit.mlp
-+++ ocaml-4.02.2/asmcomp/sparc/emit.mlp
-@@ -724,6 +724,12 @@ let data l =
- ` .data\n`;
- List.iter emit_item l
-
-+(* Mark stack as non executable *)
-+let nx_stack() =
-+ if Config.system = "linux" then
-+ ` .section .note.GNU-stack,\"\",%progbits\n`
-+
-+
- (* Beginning / end of an assembly file *)
-
- let begin_assembly() =
-@@ -737,6 +743,7 @@ let begin_assembly() =
- `{emit_symbol lbl_begin}:\n`
-
- let end_assembly() =
-+ nx_stack();
- ` .text\n`;
- let lbl_end = Compilenv.make_symbol (Some "code_end") in
- ` .global {emit_symbol lbl_end}\n`;
-Index: ocaml-4.02.2/asmrun/power-elf.S
-===================================================================
---- ocaml-4.02.2.orig/asmrun/power-elf.S
-+++ ocaml-4.02.2/asmrun/power-elf.S
-@@ -478,3 +478,8 @@ caml_system__frametable:
- .long .L105 + 4 /* return address into callback */
- .short -1 /* negative size count => use callback link */
- .short 0 /* no roots here */
-+
-+#ifdef __ELF__
-+.section .note.GNU-stack,"",%progbits
-+#endif
-+
-Index: ocaml-4.02.2/asmrun/arm.S
-===================================================================
---- ocaml-4.02.2.orig/asmrun/arm.S
-+++ ocaml-4.02.2/asmrun/arm.S
-@@ -498,3 +498,7 @@ caml_system__frametable:
- .align 2
- .type caml_system__frametable, %object
- .size caml_system__frametable, .-caml_system__frametable
-+
-+#ifdef __ELF__
-+.section .note.GNU-stack,"",%progbits
-+#endif
diff --git a/src/patchsets/ocaml/4.02.2/020_all_configure.patch b/src/patchsets/ocaml/4.02.2/020_all_configure.patch
deleted file mode 100644
index 5c4dbf064e..0000000000
--- a/src/patchsets/ocaml/4.02.2/020_all_configure.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-The configure script doesn't inherit previous defined variables,
-overwriting previous declarations of bytecccompopts, bytecclinkopts,
-nativecccompopts and nativecclinkopts. Reported upstream as issue 0004267.
-
-Index: ocaml-4.02.2/configure
-===================================================================
---- ocaml-4.02.2.orig/configure
-+++ ocaml-4.02.2/configure
-@@ -314,7 +314,7 @@ esac
- # Configure the bytecode compiler
-
- bytecc="$cc"
--mkexe="\$(BYTECC)"
-+mkexe="\$(BYTECC) \$(BYTECCLINKOPTS)"
- mkexedebugflag="-g"
- bytecccompopts=""
- bytecclinkopts=""
-@@ -1694,7 +1694,15 @@ sharedcccompopts="-O $sharedcccompopts"
-
- # Final twiddling of compiler options to work around known bugs
-
-+bytecccompopts="$CFLAGS $bytecccompopts"
-+bytecclinkopts="$LDFLAGS $bytecclinkopts"
-+natdynlinkopts="$LDFLAGS $natdynlinkopts"
-+nativeccrawlinkopts="$RAW_LDFLAGS $nativecclinkopts"
-+nativecclinkopts="$LDFLAGS $nativecclinkopts"
-+nativecccompopts="$CFLAGS $nativecccompopts"
- nativeccprofopts="$nativecccompopts"
-+mksharedlib="$mksharedlib $LDFLAGS"
-+mkmaindll="$mkmaindll $LDFLAGS"
- case "$buggycc" in
- gcc.2.96)
- bytecccompopts="$bytecccompopts -fomit-frame-pointer"
-@@ -1730,6 +1738,7 @@ echo "NATIVECC=$nativecc" >> Makefile
- echo "NATIVECCCOMPOPTS=$nativecccompopts" >> Makefile
- echo "NATIVECCPROFOPTS=$nativeccprofopts" >> Makefile
- echo "NATIVECCLINKOPTS=$nativecclinkopts" >> Makefile
-+echo "NATIVECCRAWLINKOPTS=$nativeccrawlinkopts" >> Makefile
- echo "NATIVECCRPATH=$nativeccrpath" >> Makefile
- echo "NATIVECCLIBS=$cclibs $dllib" >> Makefile
- echo "ASM=$as" >> Makefile
-@@ -1741,7 +1750,7 @@ echo "OTHERLIBRARIES=$otherlibraries" >>
- echo "CC_PROFILE=$cc_profile" >> Makefile
- echo "SYSTHREAD_SUPPORT=$systhread_support" >> Makefile
- echo "PARTIALLD=$partialld" >> Makefile
--echo "PACKLD=\$(PARTIALLD) \$(NATIVECCLINKOPTS) -o " \
-+echo "PACKLD=\$(PARTIALLD) \$(NATIVECCRAWLINKOPTS) -o " \
- | sed -e 's/ $/\\ /' >> Makefile
- echo "DLLCCCOMPOPTS=$dllccompopts" >> Makefile
- echo "IFLEXDIR=$iflexdir" >> Makefile
diff --git a/src/patchsets/ocaml/4.02.2/050_all_objinfoldflags.patch b/src/patchsets/ocaml/4.02.2/050_all_objinfoldflags.patch
deleted file mode 100644
index 02f95e2876..0000000000
--- a/src/patchsets/ocaml/4.02.2/050_all_objinfoldflags.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: ocaml-4.02.2/tools/Makefile.shared
-===================================================================
---- ocaml-4.02.2.orig/tools/Makefile.shared
-+++ ocaml-4.02.2/tools/Makefile.shared
-@@ -286,7 +286,7 @@ CCOUT = -o $(EMPTY)
- endif
-
- objinfo_helper$(EXE): objinfo_helper.c ../config/s.h
-- $(BYTECC) $(CCOUT)objinfo_helper$(EXE) $(BYTECCCOMPOPTS) \
-+ $(MKEXE) $(CCOUT)objinfo_helper$(EXE) $(BYTECCCOMPOPTS) \
- objinfo_helper.c $(LIBBFD_LINK)
-
- OBJINFO=../compilerlibs/ocamlcommon.cma \
diff --git a/src/patchsets/ocaml/4.02.2/series b/src/patchsets/ocaml/4.02.2/series
deleted file mode 100644
index a459212299..0000000000
--- a/src/patchsets/ocaml/4.02.2/series
+++ /dev/null
@@ -1,3 +0,0 @@
-010_all_execstacks.patch
-020_all_configure.patch
-050_all_objinfoldflags.patch