diff options
author | Christian Heim <phreak@gentoo.org> | 2007-04-21 21:38:23 +0000 |
---|---|---|
committer | Christian Heim <phreak@gentoo.org> | 2007-04-21 21:38:23 +0000 |
commit | 57e864fba3d42fe0f16329c2189ef2ce05b25ec0 (patch) | |
tree | 24399e07cc85812d8ea58d7ca37b463a75fa64a9 /hardened | |
parent | Updating the comments. (diff) | |
download | phreak-57e864fba3d42fe0f16329c2189ef2ce05b25ec0.tar.gz phreak-57e864fba3d42fe0f16329c2189ef2ce05b25ec0.tar.bz2 phreak-57e864fba3d42fe0f16329c2189ef2ce05b25ec0.zip |
Updated ebuild, adding the exec-stack fixes from #153382 (thanks to nattfodd for the patch).
svn path=/; revision=314
Diffstat (limited to 'hardened')
-rw-r--r-- | hardened/dev-lang/ocaml/Manifest | 12 | ||||
-rw-r--r-- | hardened/dev-lang/ocaml/files/ocaml-3.09.3-exec-stack-fixes.patch | 281 | ||||
-rw-r--r-- | hardened/dev-lang/ocaml/ocaml-3.09.3-r1.ebuild | 15 |
3 files changed, 298 insertions, 10 deletions
diff --git a/hardened/dev-lang/ocaml/Manifest b/hardened/dev-lang/ocaml/Manifest index 9c4c22d..2e24305 100644 --- a/hardened/dev-lang/ocaml/Manifest +++ b/hardened/dev-lang/ocaml/Manifest @@ -6,6 +6,10 @@ AUX ocaml-3.09.3-configure.patch 5187 RMD160 3f26cdc62c3d73a1ef9e3781ada48d34799 MD5 fd043de6497ac8bdc6c0e630db55a7ca files/ocaml-3.09.3-configure.patch 5187 RMD160 3f26cdc62c3d73a1ef9e3781ada48d34799aeed7 files/ocaml-3.09.3-configure.patch 5187 SHA256 3d0b4aac47b2aec50a21769d9fc6946202a8e8c672a691957042062bfec4a0dc files/ocaml-3.09.3-configure.patch 5187 +AUX ocaml-3.09.3-exec-stack-fixes.patch 8941 RMD160 a0c9d70a3bcb925fbc63e357751659552517459b SHA1 bcdd9334e16c8ab3ddd785b4c8deac8d5de03f88 SHA256 ce6a563cd2f56148f576293b58220faca2e5fa79fe117a14aac42336a6099438 +MD5 1ced405879a193bbc20b72f13dafdae0 files/ocaml-3.09.3-exec-stack-fixes.patch 8941 +RMD160 a0c9d70a3bcb925fbc63e357751659552517459b files/ocaml-3.09.3-exec-stack-fixes.patch 8941 +SHA256 ce6a563cd2f56148f576293b58220faca2e5fa79fe117a14aac42336a6099438 files/ocaml-3.09.3-exec-stack-fixes.patch 8941 AUX ocaml-3.09.3-execheap.patch 423 RMD160 28bc7612b0fc334f2cfb70775766a12f4e82b196 SHA1 9b3d917c2d489e17368b40e4009a27a540e48fde SHA256 36381a2a9cca239942cde3278f83b8cda6ee9fb1c6b31cb83cd4ffba0d8f0406 MD5 347917347ea61c71c5a2f006b0b8e1bf files/ocaml-3.09.3-execheap.patch 423 RMD160 28bc7612b0fc334f2cfb70775766a12f4e82b196 files/ocaml-3.09.3-execheap.patch 423 @@ -15,10 +19,10 @@ MD5 bcc5109143faee7e7b8f7f76bd4726a7 files/ocaml-rebuild.sh 1361 RMD160 a9c452fbea18de3b38d8240f887f8595e529643e files/ocaml-rebuild.sh 1361 SHA256 a8004cd4bca96ab3fc595fcfd7dbe88903833f9e430149c3d04c9fda84362b64 files/ocaml-rebuild.sh 1361 DIST ocaml-3.09.3.tar.bz2 2038617 RMD160 fdc124218c556c62c897ee6720970279e2d5426b SHA1 5d63c6e0d13463f85c0d5147d641d2bceef87d6b SHA256 607842b4f4917a759f19541a421370a834f5b948855ca54cef40d22b19a0934f -EBUILD ocaml-3.09.3-r1.ebuild 3326 RMD160 c15fdcb0aea2fd11edda4a04543872ff73c5ce49 SHA1 f336f20ed1e8a082ef9164cdf07b0f538cfa9d48 SHA256 87f2869be2afe136deb2dc39e5f2fc647f085af267d0efe7a6a867bab06cdaeb -MD5 ae396adf0d796e28c5e22fda78a7d2e5 ocaml-3.09.3-r1.ebuild 3326 -RMD160 c15fdcb0aea2fd11edda4a04543872ff73c5ce49 ocaml-3.09.3-r1.ebuild 3326 -SHA256 87f2869be2afe136deb2dc39e5f2fc647f085af267d0efe7a6a867bab06cdaeb ocaml-3.09.3-r1.ebuild 3326 +EBUILD ocaml-3.09.3-r1.ebuild 3462 RMD160 4952a9111303f85311d0df086a6c523e0ef6d9cd SHA1 1eb8ad81c7e5a286dec3b4e2bd34cf4748d9e3c0 SHA256 5fc59112a58a2e41a955bf202c83b10e7d60e3dc23523fc146cc507702935f18 +MD5 4e63de02dcf832096cbcb186758b53c3 ocaml-3.09.3-r1.ebuild 3462 +RMD160 4952a9111303f85311d0df086a6c523e0ef6d9cd ocaml-3.09.3-r1.ebuild 3462 +SHA256 5fc59112a58a2e41a955bf202c83b10e7d60e3dc23523fc146cc507702935f18 ocaml-3.09.3-r1.ebuild 3462 MD5 71f3dc5bc2ee57a403689b56bc1a85c1 files/digest-ocaml-3.09.3-r1 244 RMD160 e7f0898889b94faae3b1481555bac42e9298b370 files/digest-ocaml-3.09.3-r1 244 SHA256 19708f759185ed39623e03921462ba20fb6f3533268673d2bcd7dd07cef57350 files/digest-ocaml-3.09.3-r1 244 diff --git a/hardened/dev-lang/ocaml/files/ocaml-3.09.3-exec-stack-fixes.patch b/hardened/dev-lang/ocaml/files/ocaml-3.09.3-exec-stack-fixes.patch new file mode 100644 index 0000000..3d46d4a --- /dev/null +++ b/hardened/dev-lang/ocaml/files/ocaml-3.09.3-exec-stack-fixes.patch @@ -0,0 +1,281 @@ +--- ocaml-3.09.3/asmrun/alpha.S.old 2006-11-02 18:53:12.000000000 +0100 ++++ ocaml-3.09.3/asmrun/alpha.S 2006-11-02 18:53:12.000000000 +0100 +@@ -438,3 +438,7 @@ + .word -1 /* negative frame size => use callback link */ + .word 0 /* no roots here */ + .align 3 ++#ifdef __ELF__ ++.section .note.GNU-stack,"",%progbits ++#endif ++ +--- ocaml-3.09.3/asmrun/amd64.S.old 2006-11-02 18:53:12.000000000 +0100 ++++ ocaml-3.09.3/asmrun/amd64.S 2006-11-02 18:53:12.000000000 +0100 +@@ -334,3 +334,7 @@ + .align 16 + caml_absf_mask: + .quad 0x7FFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF ++#ifdef __ELF__ ++.section .note.GNU-stack,"",%progbits ++#endif ++ +--- ocaml-3.09.3/asmrun/arm.S.old 2006-11-02 18:53:12.000000000 +0100 ++++ ocaml-3.09.3/asmrun/arm.S 2006-11-02 18:53:12.000000000 +0100 +@@ -337,3 +337,7 @@ + .short -1 /* negative frame size => use callback link */ + .short 0 /* no roots */ + .align 2 ++#ifdef __ELF__ ++.section .note.GNU-stack,"",%progbits ++#endif ++ +--- ocaml-3.09.3/asmrun/hppa.S.old 2006-11-02 18:53:12.000000000 +0100 ++++ ocaml-3.09.3/asmrun/hppa.S 2006-11-02 18:53:12.000000000 +0100 +@@ -532,3 +532,7 @@ + .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 ++ +--- ocaml-3.09.3/asmrun/i386.S.old 2006-11-02 18:53:12.000000000 +0100 ++++ ocaml-3.09.3/asmrun/i386.S 2006-11-02 18:53:12.000000000 +0100 +@@ -371,3 +371,7 @@ + #ifdef __ELF__ + .section .note.GNU-stack,"",%progbits + #endif ++#ifdef __ELF__ ++.section .note.GNU-stack,"",%progbits ++#endif ++ +--- ocaml-3.09.3/asmrun/ia64.S.old 2006-11-02 18:53:12.000000000 +0100 ++++ ocaml-3.09.3/asmrun/ia64.S 2006-11-02 18:53:12.000000000 +0100 +@@ -528,3 +528,7 @@ + + .common caml_saved_bsp#, 8, 8 + .common caml_saved_rnat#, 8, 8 ++#ifdef __ELF__ ++.section .note.GNU-stack,"",%progbits ++#endif ++ +--- ocaml-3.09.3/asmrun/m68k.S.old 2006-11-02 18:53:12.000000000 +0100 ++++ ocaml-3.09.3/asmrun/m68k.S 2006-11-02 18:53:12.000000000 +0100 +@@ -242,3 +242,7 @@ + .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 ++ +--- ocaml-3.09.3/asmrun/power-elf.S.old 2006-11-02 18:53:12.000000000 +0100 ++++ ocaml-3.09.3/asmrun/power-elf.S 2006-11-02 18:53:12.000000000 +0100 +@@ -419,3 +419,7 @@ + .short -1 /* negative size count => use callback link */ + .short 0 /* no roots here */ + ++#ifdef __ELF__ ++.section .note.GNU-stack,"",%progbits ++#endif ++ +--- ocaml-3.09.3/asmrun/sparc.S.old 2006-11-02 18:53:12.000000000 +0100 ++++ ocaml-3.09.3/asmrun/sparc.S 2006-11-02 18:53:12.000000000 +0100 +@@ -405,3 +405,7 @@ + .type Caml_raise_exception, #function + .type Caml_system__frametable, #object + #endif ++#ifdef __ELF__ ++.section .note.GNU-stack,"",%progbits ++#endif ++ +diff -ru ../ref/ocaml-3.09.3/asmcomp/alpha/emit.mlp ocaml-3.09.3/asmcomp/alpha/emit.mlp +--- ../ref/ocaml-3.09.3/asmcomp/alpha/emit.mlp 2006-03-29 16:49:19.000000000 +0200 ++++ ocaml-3.09.3/asmcomp/alpha/emit.mlp 2006-11-03 10:35:40.000000000 +0100 +@@ -811,6 +811,12 @@ + ` .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 +849,7 @@ + `{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`; +diff -ru ../ref/ocaml-3.09.3/asmcomp/amd64/emit.mlp ocaml-3.09.3/asmcomp/amd64/emit.mlp +--- ../ref/ocaml-3.09.3/asmcomp/amd64/emit.mlp 2006-03-29 16:49:19.000000000 +0200 ++++ ocaml-3.09.3/asmcomp/amd64/emit.mlp 2006-11-03 10:35:48.000000000 +0100 +@@ -658,6 +658,12 @@ + ` .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() = +@@ -671,6 +677,7 @@ + `{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`; +diff -ru ../ref/ocaml-3.09.3/asmcomp/arm/emit.mlp ocaml-3.09.3/asmcomp/arm/emit.mlp +--- ../ref/ocaml-3.09.3/asmcomp/arm/emit.mlp 2004-05-03 14:46:50.000000000 +0200 ++++ ocaml-3.09.3/asmcomp/arm/emit.mlp 2006-11-03 10:35:55.000000000 +0100 +@@ -642,6 +642,12 @@ + ` .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 +667,7 @@ + `{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`; +diff -ru ../ref/ocaml-3.09.3/asmcomp/hppa/emit.mlp ocaml-3.09.3/asmcomp/hppa/emit.mlp +--- ../ref/ocaml-3.09.3/asmcomp/hppa/emit.mlp 2006-03-29 16:49:19.000000000 +0200 ++++ ocaml-3.09.3/asmcomp/hppa/emit.mlp 2006-11-03 10:36:03.000000000 +0100 +@@ -994,6 +994,12 @@ + ` .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 end_assembly() = ++ nx_stack(); + ` .code\n`; + let lbl_end = Compilenv.make_symbol (Some "code_end") in + declare_global lbl_end; +diff -ru ../ref/ocaml-3.09.3/asmcomp/i386/emit.mlp ocaml-3.09.3/asmcomp/i386/emit.mlp +--- ../ref/ocaml-3.09.3/asmcomp/i386/emit.mlp 2006-03-29 16:49:19.000000000 +0200 ++++ ocaml-3.09.3/asmcomp/i386/emit.mlp 2006-11-03 10:21:41.000000000 +0100 +@@ -914,6 +914,11 @@ + ` .data\n`; + List.iter emit_item l + ++(* Mark stack as non executable *) ++let nx_stack() = ++ if Config.system = "linux_elf" then ++ ` .section .note.GNU-stack,\"\",%progbits\n` ++ + (* Beginning / end of an assembly file *) + + let begin_assembly() = +@@ -927,6 +932,7 @@ + `{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`; +diff -ru ../ref/ocaml-3.09.3/asmcomp/ia64/emit.mlp ocaml-3.09.3/asmcomp/ia64/emit.mlp +--- ../ref/ocaml-3.09.3/asmcomp/ia64/emit.mlp 2004-07-13 14:18:53.000000000 +0200 ++++ ocaml-3.09.3/asmcomp/ia64/emit.mlp 2006-11-03 10:36:13.000000000 +0100 +@@ -1306,6 +1306,12 @@ + ` .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 +1321,7 @@ + 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`; +diff -ru ../ref/ocaml-3.09.3/asmcomp/power/emit.mlp ocaml-3.09.3/asmcomp/power/emit.mlp +--- ../ref/ocaml-3.09.3/asmcomp/power/emit.mlp 2004-06-19 19:39:34.000000000 +0200 ++++ ocaml-3.09.3/asmcomp/power/emit.mlp 2006-11-03 10:36:29.000000000 +0100 +@@ -879,6 +879,12 @@ + 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 @@ + `{emit_symbol lbl_begin}:\n` + + let end_assembly() = ++ nx_stack(); + (* Emit the jump table *) + if !num_jumptbl_entries > 0 then begin + emit_string code_space; +diff -ru ../ref/ocaml-3.09.3/asmcomp/sparc/emit.mlp ocaml-3.09.3/asmcomp/sparc/emit.mlp +--- ../ref/ocaml-3.09.3/asmcomp/sparc/emit.mlp 2006-03-29 16:49:19.000000000 +0200 ++++ ocaml-3.09.3/asmcomp/sparc/emit.mlp 2006-11-03 10:36:36.000000000 +0100 +@@ -741,6 +741,12 @@ + ` .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 @@ + `{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/hardened/dev-lang/ocaml/ocaml-3.09.3-r1.ebuild b/hardened/dev-lang/ocaml/ocaml-3.09.3-r1.ebuild index 2af2e77..08b84eb 100644 --- a/hardened/dev-lang/ocaml/ocaml-3.09.3-r1.ebuild +++ b/hardened/dev-lang/ocaml/ocaml-3.09.3-r1.ebuild @@ -6,7 +6,6 @@ inherit flag-o-matic eutils multilib pax-utils DESCRIPTION="fast modern type-inferring functional programming language descended from the ML (Meta Language) family" HOMEPAGE="http://www.ocaml.org/" - SRC_URI="http://caml.inria.fr/distrib/ocaml-3.09/${P}.tar.bz2" LICENSE="QPL-1.0 LGPL-2" @@ -17,10 +16,15 @@ IUSE="tk latex" DEPEND="virtual/libc tk? ( >=dev-lang/tk-3.3.3 )" +QA_EXECSTACK="/usr/lib/ocaml/compiler-*" + src_unpack() { unpack ${A} cd "${S}" + # Fix the EXEC_STACK in ocaml compiled binaries (#153382) + epatch "${FILESDIR}"/${P}-exec-stack-fixes.patch + # Quick and somewhat dirty fix for bug #110541 epatch "${FILESDIR}"/${P}-execheap.patch @@ -41,11 +45,10 @@ src_unpack() { } src_compile() { - ewarn - ewarn "Building ocaml with unsafe CFLAGS can have unexpected results." - ewarn "Please retry building with safer CFLAGS before reporting bugs!" - ewarn - epause 10 + elog + elog "Building ocaml with unsafe CFLAGS can have unexpected results." + elog "Please retry building with safer CFLAGS before reporting bugs!" + elog replace-flags "-O?" -O2 |