public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo commit in src/patchsets/ocaml/3.12.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 series
@ 2011-02-27 13:05 Alexis Ballier (aballier)
  0 siblings, 0 replies; 2+ messages in thread
From: Alexis Ballier (aballier) @ 2011-02-27 13:05 UTC (permalink / raw
  To: gentoo-commits

aballier    11/02/27 13:05:39

  Modified:             010_all_execstacks.patch 020_all_configure.patch
                        030_all_automagic.patch 040_all_yaccldflags.patch
                        050_all_objinfoldflags.patch series
  Added:                060_all_linkorder.patch
  Log:
  refresh the patchset and add a patch to pass libs as last argument to the linker when linking, fixes our as-needed problems: bug #331377 and bug #331075

Revision  Changes    Path
1.2                  src/patchsets/ocaml/3.12.0/010_all_execstacks.patch

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

Index: 010_all_execstacks.patch
===================================================================
RCS file: /var/cvsroot/gentoo/src/patchsets/ocaml/3.12.0/010_all_execstacks.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- 010_all_execstacks.patch	17 Jun 2010 08:19:42 -0000	1.1
+++ 010_all_execstacks.patch	27 Feb 2011 13:05:39 -0000	1.2
@@ -1,9 +1,9 @@
 Fix the EXEC_STACK in ocaml compiled binaries (#153382)
 
-Index: ocaml-3.12.0+beta1/asmcomp/alpha/emit.mlp
+Index: ocaml-3.12.0/asmcomp/alpha/emit.mlp
 ===================================================================
---- ocaml-3.12.0+beta1.orig/asmcomp/alpha/emit.mlp
-+++ ocaml-3.12.0+beta1/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
@@ -24,10 +24,10 @@
    let lbl_end = Compilenv.make_symbol (Some "code_end") in
    `	.text\n`;
    `	.globl	{emit_symbol lbl_end}\n`;
-Index: ocaml-3.12.0+beta1/asmrun/alpha.S
+Index: ocaml-3.12.0/asmrun/alpha.S
 ===================================================================
---- ocaml-3.12.0+beta1.orig/asmrun/alpha.S
-+++ ocaml-3.12.0+beta1/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 */
@@ -36,10 +36,10 @@
 +#ifdef __ELF__
 +.section .note.GNU-stack,"",%progbits
 +#endif
-Index: ocaml-3.12.0+beta1/asmrun/arm.S
+Index: ocaml-3.12.0/asmrun/arm.S
 ===================================================================
---- ocaml-3.12.0+beta1.orig/asmrun/arm.S
-+++ ocaml-3.12.0+beta1/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 */
@@ -48,10 +48,10 @@
 +#ifdef __ELF__
 +.section .note.GNU-stack,"",%progbits
 +#endif
-Index: ocaml-3.12.0+beta1/asmrun/hppa.S
+Index: ocaml-3.12.0/asmrun/hppa.S
 ===================================================================
---- ocaml-3.12.0+beta1.orig/asmrun/hppa.S
-+++ ocaml-3.12.0+beta1/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 */
@@ -61,10 +61,10 @@
 +.section .note.GNU-stack,"",%progbits
 +#endif
 +
-Index: ocaml-3.12.0+beta1/asmrun/ia64.S
+Index: ocaml-3.12.0/asmrun/ia64.S
 ===================================================================
---- ocaml-3.12.0+beta1.orig/asmrun/ia64.S
-+++ ocaml-3.12.0+beta1/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
@@ -74,10 +74,10 @@
 +.section .note.GNU-stack,"",%progbits
 +#endif
 +
-Index: ocaml-3.12.0+beta1/asmrun/m68k.S
+Index: ocaml-3.12.0/asmrun/m68k.S
 ===================================================================
---- ocaml-3.12.0+beta1.orig/asmrun/m68k.S
-+++ ocaml-3.12.0+beta1/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
@@ -87,10 +87,10 @@
 +.section .note.GNU-stack,"",%progbits
 +#endif
 +
-Index: ocaml-3.12.0+beta1/asmrun/sparc.S
+Index: ocaml-3.12.0/asmrun/sparc.S
 ===================================================================
---- ocaml-3.12.0+beta1.orig/asmrun/sparc.S
-+++ ocaml-3.12.0+beta1/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
@@ -100,10 +100,10 @@
 +.section .note.GNU-stack,"",%progbits
 +#endif
 +
-Index: ocaml-3.12.0+beta1/asmcomp/arm/emit.mlp
+Index: ocaml-3.12.0/asmcomp/arm/emit.mlp
 ===================================================================
---- ocaml-3.12.0+beta1.orig/asmcomp/arm/emit.mlp
-+++ ocaml-3.12.0+beta1/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
@@ -126,10 +126,10 @@
    let lbl_end = Compilenv.make_symbol (Some "code_end") in
    `	.text\n`;
    `	.global	{emit_symbol lbl_end}\n`;
-Index: ocaml-3.12.0+beta1/asmcomp/hppa/emit.mlp
+Index: ocaml-3.12.0/asmcomp/hppa/emit.mlp
 ===================================================================
---- ocaml-3.12.0+beta1.orig/asmcomp/hppa/emit.mlp
-+++ ocaml-3.12.0+beta1/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
@@ -151,10 +151,10 @@
    `	.code\n`;
    let lbl_end = Compilenv.make_symbol (Some "code_end") in
    declare_global lbl_end;
-Index: ocaml-3.12.0+beta1/asmcomp/ia64/emit.mlp
+Index: ocaml-3.12.0/asmcomp/ia64/emit.mlp
 ===================================================================
---- ocaml-3.12.0+beta1.orig/asmcomp/ia64/emit.mlp
-+++ ocaml-3.12.0+beta1/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
@@ -175,10 +175,10 @@
    `	.data\n`;
    emit_define_symbol (Compilenv.make_symbol (Some "data_end"));
    `	.text\n`;
-Index: ocaml-3.12.0+beta1/asmcomp/power/emit.mlp
+Index: ocaml-3.12.0/asmcomp/power/emit.mlp
 ===================================================================
---- ocaml-3.12.0+beta1.orig/asmcomp/power/emit.mlp
-+++ ocaml-3.12.0+beta1/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
@@ -200,10 +200,10 @@
    if pic_externals then
      (* Emit the pointers to external functions *)
      StringSet.iter emit_external !external_functions;
-Index: ocaml-3.12.0+beta1/asmcomp/sparc/emit.mlp
+Index: ocaml-3.12.0/asmcomp/sparc/emit.mlp
 ===================================================================
---- ocaml-3.12.0+beta1.orig/asmcomp/sparc/emit.mlp
-+++ ocaml-3.12.0+beta1/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
@@ -225,10 +225,10 @@
    `	.text\n`;
    let lbl_end = Compilenv.make_symbol (Some "code_end") in
    `	.global	{emit_symbol lbl_end}\n`;
-Index: ocaml-3.12.0+beta1/asmrun/power-elf.S
+Index: ocaml-3.12.0/asmrun/power-elf.S
 ===================================================================
---- ocaml-3.12.0+beta1.orig/asmrun/power-elf.S
-+++ ocaml-3.12.0+beta1/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 */



1.2                  src/patchsets/ocaml/3.12.0/020_all_configure.patch

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

Index: 020_all_configure.patch
===================================================================
RCS file: /var/cvsroot/gentoo/src/patchsets/ocaml/3.12.0/020_all_configure.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- 020_all_configure.patch	17 Jun 2010 08:19:42 -0000	1.1
+++ 020_all_configure.patch	27 Feb 2011 13:05:39 -0000	1.2
@@ -2,10 +2,10 @@
 overwriting previous declarations of bytecccompopts, bytecclinkopts,
 nativecccompopts and nativecclinkopts. Reported upstream as issue 0004267.
 
-Index: ocaml-3.12.0+beta1/configure
+Index: ocaml-3.12.0/configure
 ===================================================================
---- ocaml-3.12.0+beta1.orig/configure
-+++ ocaml-3.12.0+beta1/configure
+--- ocaml-3.12.0.orig/configure
++++ ocaml-3.12.0/configure
 @@ -241,7 +241,7 @@ esac
  # Configure the bytecode compiler
  



1.2                  src/patchsets/ocaml/3.12.0/030_all_automagic.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/3.12.0/030_all_automagic.patch?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/3.12.0/030_all_automagic.patch?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/3.12.0/030_all_automagic.patch?r1=1.1&r2=1.2

Index: 030_all_automagic.patch
===================================================================
RCS file: /var/cvsroot/gentoo/src/patchsets/ocaml/3.12.0/030_all_automagic.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- 030_all_automagic.patch	17 Jun 2010 08:19:42 -0000	1.1
+++ 030_all_automagic.patch	27 Feb 2011 13:05:39 -0000	1.2
@@ -1,10 +1,10 @@
 ocaml has automagics on libX11 and gdbm
 http://caml.inria.fr/mantis/view.php?id=4278
 
-Index: ocaml-3.12.0+beta1/configure
+Index: ocaml-3.12.0/configure
 ===================================================================
---- ocaml-3.12.0+beta1.orig/configure
-+++ ocaml-3.12.0+beta1/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
@@ -25,7 +25,7 @@
      -no-tk|--no-tk)
          tk_wanted=no;;
      -partialld|--partialld)
-@@ -1373,7 +1379,7 @@ do
+@@ -1372,7 +1378,7 @@ do
  done
  
  
@@ -34,7 +34,7 @@
  then
    echo "X11 not found, the \"graph\" library will not be supported."
    x11_include=""
-@@ -1421,7 +1427,7 @@ for dir in /usr/include /usr/include/db1
+@@ -1420,7 +1426,7 @@ for dir in /usr/include /usr/include/db1
      break
    fi
  done



1.2                  src/patchsets/ocaml/3.12.0/040_all_yaccldflags.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/3.12.0/040_all_yaccldflags.patch?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/3.12.0/040_all_yaccldflags.patch?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/3.12.0/040_all_yaccldflags.patch?r1=1.1&r2=1.2

Index: 040_all_yaccldflags.patch
===================================================================
RCS file: /var/cvsroot/gentoo/src/patchsets/ocaml/3.12.0/040_all_yaccldflags.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- 040_all_yaccldflags.patch	17 Jun 2010 08:19:42 -0000	1.1
+++ 040_all_yaccldflags.patch	27 Feb 2011 13:05:39 -0000	1.2
@@ -2,10 +2,10 @@
 
 http://caml.inria.fr/mantis/view.php?id=4698
 
-Index: ocaml-3.12.0+beta1/yacc/Makefile
+Index: ocaml-3.12.0/yacc/Makefile
 ===================================================================
---- ocaml-3.12.0+beta1.orig/yacc/Makefile
-+++ ocaml-3.12.0+beta1/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)
  



1.2                  src/patchsets/ocaml/3.12.0/050_all_objinfoldflags.patch

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

Index: 050_all_objinfoldflags.patch
===================================================================
RCS file: /var/cvsroot/gentoo/src/patchsets/ocaml/3.12.0/050_all_objinfoldflags.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- 050_all_objinfoldflags.patch	17 Jun 2010 08:40:17 -0000	1.1
+++ 050_all_objinfoldflags.patch	27 Feb 2011 13:05:39 -0000	1.2
@@ -1,7 +1,7 @@
-Index: ocaml-3.12.0+beta1/tools/Makefile.shared
+Index: ocaml-3.12.0/tools/Makefile.shared
 ===================================================================
---- ocaml-3.12.0+beta1.orig/tools/Makefile.shared
-+++ ocaml-3.12.0+beta1/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
  



1.3                  src/patchsets/ocaml/3.12.0/series

file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/3.12.0/series?rev=1.3&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/3.12.0/series?rev=1.3&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/3.12.0/series?r1=1.2&r2=1.3

Index: series
===================================================================
RCS file: /var/cvsroot/gentoo/src/patchsets/ocaml/3.12.0/series,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- series	17 Jun 2010 08:40:17 -0000	1.2
+++ series	27 Feb 2011 13:05:39 -0000	1.3
@@ -3,3 +3,4 @@
 030_all_automagic.patch
 040_all_yaccldflags.patch
 050_all_objinfoldflags.patch
+060_all_linkorder.patch



1.1                  src/patchsets/ocaml/3.12.0/060_all_linkorder.patch

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

Index: 060_all_linkorder.patch
===================================================================
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






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

* [gentoo-commits] gentoo commit in src/patchsets/ocaml/3.12.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 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
                        030_all_automagic.patch 040_all_yaccldflags.patch
                        050_all_objinfoldflags.patch
                        060_all_linkorder.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 --
2017-02-21 14:17 [gentoo-commits] gentoo commit in src/patchsets/ocaml/3.12.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 series Alexis Ballier (aballier)
  -- strict thread matches above, loose matches on Subject: below --
2011-02-27 13:05 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