public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo commit in src/patchsets/ocaml/4.01.0: 010_all_execstacks.patch 020_all_configure.patch 050_all_objinfoldflags.patch series
@ 2013-08-16  0:03 Alexis Ballier (aballier)
  0 siblings, 0 replies; 2+ messages in thread
From: Alexis Ballier (aballier) @ 2013-08-16  0:03 UTC (permalink / raw
  To: gentoo-commits

aballier    13/08/16 00:03:45

  Added:                010_all_execstacks.patch 020_all_configure.patch
                        050_all_objinfoldflags.patch series
  Log:
  add patches for ocaml 4.01.0 beta1

Revision  Changes    Path
1.1                  src/patchsets/ocaml/4.01.0/010_all_execstacks.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/4.01.0/010_all_execstacks.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/4.01.0/010_all_execstacks.patch?rev=1.1&content-type=text/plain

Index: 010_all_execstacks.patch
===================================================================
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



1.1                  src/patchsets/ocaml/4.01.0/020_all_configure.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/4.01.0/020_all_configure.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/4.01.0/020_all_configure.patch?rev=1.1&content-type=text/plain

Index: 020_all_configure.patch
===================================================================
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



1.1                  src/patchsets/ocaml/4.01.0/050_all_objinfoldflags.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/4.01.0/050_all_objinfoldflags.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/4.01.0/050_all_objinfoldflags.patch?rev=1.1&content-type=text/plain

Index: 050_all_objinfoldflags.patch
===================================================================
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 \



1.1                  src/patchsets/ocaml/4.01.0/series

file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/4.01.0/series?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/4.01.0/series?rev=1.1&content-type=text/plain

Index: series
===================================================================
010_all_execstacks.patch
020_all_configure.patch
050_all_objinfoldflags.patch





^ permalink raw reply	[flat|nested] 2+ messages in thread

* [gentoo-commits] gentoo commit in src/patchsets/ocaml/4.01.0: 010_all_execstacks.patch 020_all_configure.patch 050_all_objinfoldflags.patch series
@ 2017-02-21 14:17 Alexis Ballier (aballier)
  0 siblings, 0 replies; 2+ messages in thread
From: Alexis Ballier (aballier) @ 2017-02-21 14:17 UTC (permalink / raw
  To: gentoo-commits

aballier    17/02/21 14:17:27

  Removed:              010_all_execstacks.patch 020_all_configure.patch
                        050_all_objinfoldflags.patch series
  Log:
  Remove outdated ocaml patches


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-02-21 14:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-16  0:03 [gentoo-commits] gentoo commit in src/patchsets/ocaml/4.01.0: 010_all_execstacks.patch 020_all_configure.patch 050_all_objinfoldflags.patch series Alexis Ballier (aballier)
  -- strict thread matches above, loose matches on Subject: below --
2017-02-21 14:17 Alexis Ballier (aballier)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox