aballier 08/10/15 16:08:56
Added:
ocaml-3.11.0_beta1-call-ld-with-proper-ldflags.patch
ocaml-3.11.0_beta1-configure.patch
ocaml-3.11.0_beta1-exec-stack-fixes.patch
Log:
New upstream beta release
(Portage version: 2.2_rc12/cvs/Linux 2.6.26.6 x86_64)
Revision Changes Path
1.1 dev-lang/ocaml/files/ocaml-3.11.0_beta1-call-ld-with-proper-ldflags.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/ocaml/files/ocaml-3.11.0_beta1-call-ld-with-proper-ldflags.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/ocaml/files/ocaml-3.11.0_beta1-call-ld-with-proper-ldflags.patch?rev=1.1&content-type=text/plain
Index: ocaml-3.11.0_beta1-call-ld-with-proper-ldflags.patch
===================================================================
As we now support LDFLAGS in NATIVECCLINKOPTS
it can happen that -Wl,--foo,--bar option is in that variable
As ocaml happens to call ld with NATIVECCLINKOPTS
we have to "translate" it so that ld doesn't bail out with unrecognized option
Initial patch from Julien Cristau : http://caml.inria.fr/mantis/view.php?id=4142
Modified a bit to catch comma separated options
Index: ocaml-3.11.0+beta1/configure
===================================================================
--- ocaml-3.11.0+beta1.orig/configure
+++ ocaml-3.11.0+beta1/configure
@@ -1503,6 +1503,7 @@ fi
bytecccompopts="$CFLAGS $bytecccompopts"
bytecclinkopts="$LDFLAGS $bytecclinkopts"
natdynlinkopts="$LDFLAGS $natdynlinkopts"
+nativeccrawlinkopts="$RAW_LDFLAGS $nativecclinkopts"
nativecclinkopts="$LDFLAGS $nativecclinkopts"
nativecccompopts="$CFLAGS $nativecccompopts"
nativeccprofopts="$nativecccompopts"
@@ -1553,7 +1554,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
1.1 dev-lang/ocaml/files/ocaml-3.11.0_beta1-configure.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/ocaml/files/ocaml-3.11.0_beta1-configure.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/ocaml/files/ocaml-3.11.0_beta1-configure.patch?rev=1.1&content-type=text/plain
Index: ocaml-3.11.0_beta1-configure.patch
===================================================================
Index: ocaml-3.11.0+beta1/configure
===================================================================
--- ocaml-3.11.0+beta1.orig/configure
+++ ocaml-3.11.0+beta1/configure
@@ -1494,6 +1494,11 @@ fi
# Final twiddling of compiler options to work around known bugs
+bytecccompopts="$CFLAGS $bytecccompopts"
+bytecclinkopts="$LDFLAGS $bytecclinkopts"
+natdynlinkopts="$LDFLAGS $natdynlinkopts"
+nativecclinkopts="$LDFLAGS $nativecclinkopts"
+nativecccompopts="$CFLAGS $nativecccompopts"
nativeccprofopts="$nativecccompopts"
case "$buggycc" in
gcc.2.96)
1.1 dev-lang/ocaml/files/ocaml-3.11.0_beta1-exec-stack-fixes.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/ocaml/files/ocaml-3.11.0_beta1-exec-stack-fixes.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/ocaml/files/ocaml-3.11.0_beta1-exec-stack-fixes.patch?rev=1.1&content-type=text/plain
Index: ocaml-3.11.0_beta1-exec-stack-fixes.patch
===================================================================
Index: ocaml-3.10.0/asmcomp/alpha/emit.mlp
===================================================================
--- ocaml-3.10.0.orig/asmcomp/alpha/emit.mlp
+++ ocaml-3.10.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.10.0/asmrun/alpha.S
===================================================================
--- ocaml-3.10.0.orig/asmrun/alpha.S
+++ ocaml-3.10.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.10.0/asmrun/arm.S
===================================================================
--- ocaml-3.10.0.orig/asmrun/arm.S
+++ ocaml-3.10.0/asmrun/arm.S
@@ -337,3 +337,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.10.0/asmrun/hppa.S
===================================================================
--- ocaml-3.10.0.orig/asmrun/hppa.S
+++ ocaml-3.10.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.10.0/asmrun/ia64.S
===================================================================
--- ocaml-3.10.0.orig/asmrun/ia64.S
+++ ocaml-3.10.0/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.10.0/asmrun/m68k.S
===================================================================
--- ocaml-3.10.0.orig/asmrun/m68k.S
+++ ocaml-3.10.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.10.0/asmrun/power-elf.S
===================================================================
--- ocaml-3.10.0.orig/asmrun/power-elf.S
+++ ocaml-3.10.0/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.10.0/asmrun/sparc.S
===================================================================
--- ocaml-3.10.0.orig/asmrun/sparc.S
+++ ocaml-3.10.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.10.0/asmcomp/arm/emit.mlp
===================================================================
--- ocaml-3.10.0.orig/asmcomp/arm/emit.mlp
+++ ocaml-3.10.0/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() =
@@ -661,6 +668,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.10.0/asmcomp/hppa/emit.mlp
===================================================================
--- ocaml-3.10.0.orig/asmcomp/hppa/emit.mlp
+++ ocaml-3.10.0/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.10.0/asmcomp/ia64/emit.mlp
===================================================================
--- ocaml-3.10.0.orig/asmcomp/ia64/emit.mlp
+++ ocaml-3.10.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.10.0/asmcomp/power/emit.mlp
===================================================================
--- ocaml-3.10.0.orig/asmcomp/power/emit.mlp
+++ ocaml-3.10.0/asmcomp/power/emit.mlp
@@ -916,6 +916,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() =
@@ -932,6 +938,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.10.0/asmcomp/sparc/emit.mlp
===================================================================
--- ocaml-3.10.0.orig/asmcomp/sparc/emit.mlp
+++ ocaml-3.10.0/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`;
|