From 65e05a55d4478b57cf2c05ea4694da2775000c8f Mon Sep 17 00:00:00 2001 From: Christian Heim Date: Sun, 22 Apr 2007 13:55:57 +0000 Subject: [PATCH] Revision bump, fixing #153382 (ocaml produces binaries contain executable stacks), #134403 (dev-lang/ocaml-3.08.4 emerge failed on hardened amd64) and #110541 (ERROR: dev-lang/ocaml-3.08.3 failed.) - this makes dev-lang/ocaml "useable" on hardened boxes. Package-Manager: portage-2.1.2.4 --- dev-lang/ocaml/ChangeLog | 13 +- dev-lang/ocaml/Manifest | 41 ++- dev-lang/ocaml/files/digest-ocaml-3.09.3-r1 | 3 + .../ocaml/files/ocaml-3.09.3-Makefile.patch | 40 +++ .../ocaml/files/ocaml-3.09.3-configure.patch | 120 ++++++++ .../files/ocaml-3.09.3-exec-stack-fixes.patch | 281 ++++++++++++++++++ .../ocaml/files/ocaml-3.09.3-execheap.patch | 13 + dev-lang/ocaml/ocaml-3.09.3-r1.ebuild | 122 ++++++++ 8 files changed, 628 insertions(+), 5 deletions(-) create mode 100644 dev-lang/ocaml/files/digest-ocaml-3.09.3-r1 create mode 100644 dev-lang/ocaml/files/ocaml-3.09.3-Makefile.patch create mode 100644 dev-lang/ocaml/files/ocaml-3.09.3-configure.patch create mode 100644 dev-lang/ocaml/files/ocaml-3.09.3-exec-stack-fixes.patch create mode 100644 dev-lang/ocaml/files/ocaml-3.09.3-execheap.patch create mode 100644 dev-lang/ocaml/ocaml-3.09.3-r1.ebuild diff --git a/dev-lang/ocaml/ChangeLog b/dev-lang/ocaml/ChangeLog index 56f252bbdbd5..8d1266cd9ede 100644 --- a/dev-lang/ocaml/ChangeLog +++ b/dev-lang/ocaml/ChangeLog @@ -1,6 +1,17 @@ # ChangeLog for dev-lang/ocaml # Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/ocaml/ChangeLog,v 1.97 2007/04/15 20:17:05 corsair Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/ocaml/ChangeLog,v 1.98 2007/04/22 13:55:57 phreak Exp $ + +*ocaml-3.09.3-r1 (22 Apr 2007) + + 22 Apr 2007; Christian Heim + +files/ocaml-3.09.3-Makefile.patch, +files/ocaml-3.09.3-configure.patch, + +files/ocaml-3.09.3-exec-stack-fixes.patch, + +files/ocaml-3.09.3-execheap.patch, +ocaml-3.09.3-r1.ebuild: + Revision bump, fixing #153382 (ocaml produces binaries contain executable + stacks), #134403 (dev-lang/ocaml-3.08.4 emerge failed on hardened amd64) and + #110541 (ERROR: dev-lang/ocaml-3.08.3 failed.) - this makes dev-lang/ocaml + "useable" on hardened boxes. 15 Apr 2007; Markus Rothe ocaml-3.09.3.ebuild: Stable on ppc64 diff --git a/dev-lang/ocaml/Manifest b/dev-lang/ocaml/Manifest index 333423b380b7..302695fca7e6 100644 --- a/dev-lang/ocaml/Manifest +++ b/dev-lang/ocaml/Manifest @@ -1,7 +1,26 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + AUX ocaml-3.08.3-gcc4.patch 710 RMD160 7c7399b1a1aa383815021721b4f4a5261137dc15 SHA1 19482bd2cc736a54645e0b48c82edd9863be0375 SHA256 007606bb38a7d66a003a94c9b45288055faacf5f15334a9ff6c33fdc91504e09 MD5 c57fc46d92565b5d44c8c4f2a4a072d3 files/ocaml-3.08.3-gcc4.patch 710 RMD160 7c7399b1a1aa383815021721b4f4a5261137dc15 files/ocaml-3.08.3-gcc4.patch 710 SHA256 007606bb38a7d66a003a94c9b45288055faacf5f15334a9ff6c33fdc91504e09 files/ocaml-3.08.3-gcc4.patch 710 +AUX ocaml-3.09.3-Makefile.patch 1489 RMD160 2405669fdfe7ac35191c59d51c36dcea4f43e2c0 SHA1 16d5cfa7e12d542928d90c144125fbc3deb049f7 SHA256 da690e61fd4f72e28ed4f41a0b7c18a26a11f9ad42d4d8aa95301c02317336b9 +MD5 0d21d3b76fc3a724bd2b8d2e8d3a603f files/ocaml-3.09.3-Makefile.patch 1489 +RMD160 2405669fdfe7ac35191c59d51c36dcea4f43e2c0 files/ocaml-3.09.3-Makefile.patch 1489 +SHA256 da690e61fd4f72e28ed4f41a0b7c18a26a11f9ad42d4d8aa95301c02317336b9 files/ocaml-3.09.3-Makefile.patch 1489 +AUX ocaml-3.09.3-configure.patch 5187 RMD160 3f26cdc62c3d73a1ef9e3781ada48d34799aeed7 SHA1 db6710567d86a4ea42417861af7687f5cc5e84d8 SHA256 3d0b4aac47b2aec50a21769d9fc6946202a8e8c672a691957042062bfec4a0dc +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 +SHA256 36381a2a9cca239942cde3278f83b8cda6ee9fb1c6b31cb83cd4ffba0d8f0406 files/ocaml-3.09.3-execheap.patch 423 AUX ocaml-rebuild.sh 1361 RMD160 a9c452fbea18de3b38d8240f887f8595e529643e SHA1 2a682ce872c51e66a5ab13160da16b0f6d8bd366 SHA256 a8004cd4bca96ab3fc595fcfd7dbe88903833f9e430149c3d04c9fda84362b64 MD5 bcc5109143faee7e7b8f7f76bd4726a7 files/ocaml-rebuild.sh 1361 RMD160 a9c452fbea18de3b38d8240f887f8595e529643e files/ocaml-rebuild.sh 1361 @@ -22,14 +41,18 @@ EBUILD ocaml-3.09.2.ebuild 2414 RMD160 575a8b85655e7a6099eadfc3e8434866b7b9fbf4 MD5 ad4b43bea4ee37b5d152f02e44da38f5 ocaml-3.09.2.ebuild 2414 RMD160 575a8b85655e7a6099eadfc3e8434866b7b9fbf4 ocaml-3.09.2.ebuild 2414 SHA256 7f1202a717cdce1a89f05ca049d5a2469fd212c13fcf0f03881cedd0f75a1b63 ocaml-3.09.2.ebuild 2414 +EBUILD ocaml-3.09.3-r1.ebuild 4041 RMD160 b451971fc490bd314b9cccbc9e0cee40b4b16dd2 SHA1 a10f3787dc3747bada40f089e786047a0661bb94 SHA256 697fcab0f20d803c722fde19351e247c26f1e8c85af8b1e7dfdbb04e58c891c2 +MD5 e3f9e9eaa3ba0012e54f43a46d644cb2 ocaml-3.09.3-r1.ebuild 4041 +RMD160 b451971fc490bd314b9cccbc9e0cee40b4b16dd2 ocaml-3.09.3-r1.ebuild 4041 +SHA256 697fcab0f20d803c722fde19351e247c26f1e8c85af8b1e7dfdbb04e58c891c2 ocaml-3.09.3-r1.ebuild 4041 EBUILD ocaml-3.09.3.ebuild 2546 RMD160 3633ad343af82d4ccd960520be42a6818f65e1eb SHA1 0e31867ac7a27d946a7e64c6ecc5f711d396aaa2 SHA256 d9ebc69c806a36354d9cc53132095ccce0d1001cc38b22dbbb20ac625e9b9aff MD5 34cae488a62c65feb4a5a7a2ecec483a ocaml-3.09.3.ebuild 2546 RMD160 3633ad343af82d4ccd960520be42a6818f65e1eb ocaml-3.09.3.ebuild 2546 SHA256 d9ebc69c806a36354d9cc53132095ccce0d1001cc38b22dbbb20ac625e9b9aff ocaml-3.09.3.ebuild 2546 -MISC ChangeLog 14522 RMD160 fdcb43f5aa0069d6d2b0b1ea35d23a42f6a78650 SHA1 d0941242dd5f19cdcf0890944d6c1808fbddd24a SHA256 315fe0399805318eb1479764ad1174d6fbaebd6eab1f1d182f51a42655faa39c -MD5 bed6568ab4e9f705a7229e819b5e66ac ChangeLog 14522 -RMD160 fdcb43f5aa0069d6d2b0b1ea35d23a42f6a78650 ChangeLog 14522 -SHA256 315fe0399805318eb1479764ad1174d6fbaebd6eab1f1d182f51a42655faa39c ChangeLog 14522 +MISC ChangeLog 15051 RMD160 1bd1147f0a294342edb42669ce37e013b3cd9222 SHA1 6b506a0bdbd9221b9234cb2728d15ab1d5fcccad SHA256 e5cede5389202ae3113c86cfe28bdcb9e5d0d333d1060deaf3a29487cb9bf05c +MD5 442e0dd49b1b8e0442825338fca5e1ee ChangeLog 15051 +RMD160 1bd1147f0a294342edb42669ce37e013b3cd9222 ChangeLog 15051 +SHA256 e5cede5389202ae3113c86cfe28bdcb9e5d0d333d1060deaf3a29487cb9bf05c ChangeLog 15051 MISC metadata.xml 155 RMD160 dfaa057e679b01302a807c75a32a910098b26809 SHA1 94024f83dcacbb53e92be090dd0f994ec93dc90d SHA256 118048376ebb76f57628b0819f3de4856e73959c2578c88715d37ea2d1e0af81 MD5 8b350f19c06fcabf1053b0421b7c3f5a metadata.xml 155 RMD160 dfaa057e679b01302a807c75a32a910098b26809 metadata.xml 155 @@ -46,3 +69,13 @@ SHA256 4799bbb3279e3ec6a3541cbc418388633fcb7d32dbe0177334675586a8afa029 files/di MD5 71f3dc5bc2ee57a403689b56bc1a85c1 files/digest-ocaml-3.09.3 244 RMD160 e7f0898889b94faae3b1481555bac42e9298b370 files/digest-ocaml-3.09.3 244 SHA256 19708f759185ed39623e03921462ba20fb6f3533268673d2bcd7dd07cef57350 files/digest-ocaml-3.09.3 244 +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 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.3 (GNU/Linux) + +iD8DBQFGK2l4yuNVb5qfaOYRAgWKAJ9ngMlFOxc7CICA1r4zQggwwrZXiwCfeHm5 +K5JHdqWTpIStcWLd1LcyPX4= +=3/Ex +-----END PGP SIGNATURE----- diff --git a/dev-lang/ocaml/files/digest-ocaml-3.09.3-r1 b/dev-lang/ocaml/files/digest-ocaml-3.09.3-r1 new file mode 100644 index 000000000000..231a74a7d1d6 --- /dev/null +++ b/dev-lang/ocaml/files/digest-ocaml-3.09.3-r1 @@ -0,0 +1,3 @@ +MD5 8b3744efd0d51b82d55b61d0e2bf0e2b ocaml-3.09.3.tar.bz2 2038617 +RMD160 fdc124218c556c62c897ee6720970279e2d5426b ocaml-3.09.3.tar.bz2 2038617 +SHA256 607842b4f4917a759f19541a421370a834f5b948855ca54cef40d22b19a0934f ocaml-3.09.3.tar.bz2 2038617 diff --git a/dev-lang/ocaml/files/ocaml-3.09.3-Makefile.patch b/dev-lang/ocaml/files/ocaml-3.09.3-Makefile.patch new file mode 100644 index 000000000000..c2ea2d443328 --- /dev/null +++ b/dev-lang/ocaml/files/ocaml-3.09.3-Makefile.patch @@ -0,0 +1,40 @@ +Index: ocaml-3.09.3/Makefile +=================================================================== +--- ocaml-3.09.3.orig/Makefile ++++ ocaml-3.09.3/Makefile +@@ -282,7 +282,7 @@ clean:: partialclean + + ocamlc: $(COMPOBJS) + $(CAMLC) $(LINKFLAGS) -o ocamlc $(COMPOBJS) +- @sed -e 's|@compiler@|$$topdir/boot/ocamlrun $$topdir/ocamlc|' \ ++ @sed -e 's|@compiler@|$$topdir/boot/ocamlrun $$topdir/ocamlc|g' \ + driver/ocamlcomp.sh.in > ocamlcomp.sh + @chmod +x ocamlcomp.sh + +@@ -293,7 +293,7 @@ partialclean:: + + ocamlopt: $(OPTOBJS) + $(CAMLC) $(LINKFLAGS) -o ocamlopt $(OPTOBJS) +- @sed -e 's|@compiler@|$$topdir/boot/ocamlrun $$topdir/ocamlopt|' \ ++ @sed -e 's|@compiler@|$$topdir/boot/ocamlrun $$topdir/ocamlopt|g' \ + driver/ocamlcomp.sh.in > ocamlcompopt.sh + @chmod +x ocamlcompopt.sh + +@@ -383,7 +383,7 @@ ocamlc.opt: $(COMPOBJS:.cmo=.cmx) + $(CAMLOPT) $(LINKFLAGS) -ccopt "$(BYTECCLINKOPTS)" -o ocamlc.opt \ + $(COMPOBJS:.cmo=.cmx) \ + asmrun/meta.o asmrun/dynlink.o -cclib "$(BYTECCLIBS)" +- @sed -e 's|@compiler@|$$topdir/ocamlc.opt|' \ ++ @sed -e 's|@compiler@|$$topdir/ocamlc.opt|g' \ + driver/ocamlcomp.sh.in > ocamlcomp.sh + @chmod +x ocamlcomp.sh + +@@ -394,7 +394,7 @@ partialclean:: + + ocamlopt.opt: $(OPTOBJS:.cmo=.cmx) + $(CAMLOPT) $(LINKFLAGS) -o ocamlopt.opt $(OPTOBJS:.cmo=.cmx) +- @sed -e 's|@compiler@|$$topdir/ocamlopt.opt|' \ ++ @sed -e 's|@compiler@|$$topdir/ocamlopt.opt|g' \ + driver/ocamlcomp.sh.in > ocamlcompopt.sh + @chmod +x ocamlcompopt.sh + diff --git a/dev-lang/ocaml/files/ocaml-3.09.3-configure.patch b/dev-lang/ocaml/files/ocaml-3.09.3-configure.patch new file mode 100644 index 000000000000..c458f6987dbc --- /dev/null +++ b/dev-lang/ocaml/files/ocaml-3.09.3-configure.patch @@ -0,0 +1,120 @@ +Index: ocaml-3.09.3/configure +=================================================================== +--- ocaml-3.09.3.orig/configure ++++ ocaml-3.09.3/configure +@@ -240,65 +240,65 @@ exe="" + case "$bytecc,$host" in + cc,*-*-nextstep*) + # GNU C extensions disabled, but __GNUC__ still defined! +- bytecccompopts="-fno-defer-pop $gcc_warnings -U__GNUC__ -posix" +- bytecclinkopts="-posix";; ++ bytecccompopts="$bytecccompopts -fno-defer-pop $gcc_warnings -U__GNUC__ -posix" ++ bytecclinkopts="$bytecclinkopts -posix";; + *,*-*-rhapsody*) + # Almost the same as NeXTStep +- bytecccompopts="-fno-defer-pop $gcc_warnings -DSHRINKED_GNUC" ++ bytecccompopts="$bytecccompopts -fno-defer-pop $gcc_warnings -DSHRINKED_GNUC" + mathlib="";; + *,*-*-darwin*) + # Almost the same as rhapsody +- bytecccompopts="-fno-defer-pop -no-cpp-precomp $gcc_warnings" ++ bytecccompopts="$bytecccompopts -fno-defer-pop -no-cpp-precomp $gcc_warnings" + mathlib="";; + *,*-*-beos*) +- bytecccompopts="-fno-defer-pop $gcc_warnings" ++ bytecccompopts="$bytecccompopts -fno-defer-pop $gcc_warnings" + # No -lm library + mathlib="";; + gcc,alpha*-*-osf*) +- bytecccompopts="-fno-defer-pop $gcc_warnings" ++ bytecccompopts="$bytecccompopts -fno-defer-pop $gcc_warnings" + if cc="$bytecc" sh ./hasgot -mieee; then + bytecccompopts="-mieee $bytecccompopts"; + fi + # Put code and static data in lower 4GB +- bytecclinkopts="-Wl,-T,12000000 -Wl,-D,14000000" ++ bytecclinkopts="$bytecclinkopts -Wl,-T,12000000 -Wl,-D,14000000" + # Tell gcc that we can use 32-bit code addresses for threaded code + echo "#define ARCH_CODE32" >> m.h;; + cc,alpha*-*-osf*) +- bytecccompopts="-std1 -ieee";; ++ bytecccompopts="$bytecccompopts -std1 -ieee";; + gcc,alpha*-*-linux*) + if cc="$bytecc" sh ./hasgot -mieee; then + bytecccompopts="-mieee $bytecccompopts"; + fi;; + cc,mips-*-irix6*) + # Add -n32 flag to ensure compatibility with native-code compiler +- bytecccompopts="-n32" ++ bytecccompopts="$bytecccompopts -n32" + # Turn off warning "unused library" +- bytecclinkopts="-n32 -Wl,-woff,84";; ++ bytecclinkopts="$bytecclinkopts -n32 -Wl,-woff,84";; + cc*,mips-*-irix6*) + # (For those who want to force "cc -64") + # Turn off warning "unused library" +- bytecclinkopts="-Wl,-woff,84";; ++ bytecclinkopts="$bytecclinkopts -Wl,-woff,84";; + *,alpha*-*-unicos*) + # For the Cray T3E +- bytecccompopts="-DUMK";; ++ bytecccompopts="$bytecccompopts -DUMK";; + gcc*,powerpc-*-aix*) + # Avoid name-space pollution by requiring Unix98-conformant includes +- bytecccompopts="-fno-defer-pop $gcc_warnings -D_XOPEN_SOURCE=500";; ++ bytecccompopts="$bytecccompopts -fno-defer-pop $gcc_warnings -D_XOPEN_SOURCE=500";; + *,powerpc-*-aix*) +- bytecccompopts="-D_XOPEN_SOURCE=500";; ++ bytecccompopts="$bytecccompopts -D_XOPEN_SOURCE=500";; + gcc*,*-*-cygwin*) +- bytecccompopts="-fno-defer-pop $gcc_warnings -U_WIN32" ++ bytecccompopts="$bytecccompopts -fno-defer-pop $gcc_warnings -U_WIN32" + exe=".exe" + ostype="Cygwin";; + gcc*,x86_64-*-linux*) +- bytecccompopts="-fno-defer-pop $gcc_warnings" ++ bytecccompopts="$bytecccompopts -fno-defer-pop $gcc_warnings" + # Tell gcc that we can use 32-bit code addresses for threaded code + # unless we are compiled for a shared library (-fPIC option) + echo "#ifndef __PIC__" >> m.h + echo "# define ARCH_CODE32" >> m.h + echo "#endif" >> m.h;; + gcc*) +- bytecccompopts="-fno-defer-pop $gcc_warnings";; ++ bytecccompopts="$bytecccompopts -fno-defer-pop $gcc_warnings";; + esac + + # Configure compiler to use in further tests +@@ -609,22 +609,22 @@ else + nativecc="$ccoption" + fi + +-nativecccompopts='' +-nativecclinkopts='' ++nativecccompopts="" ++nativecclinkopts="" + nativeccrpath="$byteccrpath" + + case "$arch,$nativecc,$system,$host_type" in +- alpha,cc*,digital,*) nativecccompopts=-std1;; +- mips,cc*,irix,*) nativecccompopts=-n32 +- nativecclinkopts="-n32 -Wl,-woff,84";; +- *,*,nextstep,*) nativecccompopts="$gcc_warnings -U__GNUC__ -posix" +- nativecclinkopts="-posix";; ++ alpha,cc*,digital,*) nativecccompopts="$nativecccompopts -std1";; ++ mips,cc*,irix,*) nativecccompopts="$nativecccompopts -n32" ++ nativecclinkopts="$nativecclinkopts -n32 -Wl,-woff,84";; ++ *,*,nextstep,*) nativecccompopts="$nativecccompopts $gcc_warnings -U__GNUC__ -posix" ++ nativecclinkopts="$nativecclinkopts -posix";; + *,*,rhapsody,*darwin[1-5].*) +- nativecccompopts="$gcc_warnings -DSHRINKED_GNUC";; ++ nativecccompopts="$nativecccompopts $gcc_warnings -DSHRINKED_GNUC";; + *,*,rhapsody,*) +- nativecccompopts="$gcc_warnings -DDARWIN_VERSION_6 $dl_defs";; ++ nativecccompopts="$nativecccompopts $gcc_warnings -DDARWIN_VERSION_6 $dl_defs";; + *,gcc*,cygwin,*) nativecccompopts="$gcc_warnings -U_WIN32";; +- *,gcc*,*,*) nativecccompopts="$gcc_warnings";; ++ *,gcc*,*,*) nativecccompopts="$nativecccompopts $gcc_warnings";; + esac + + asflags='' diff --git a/dev-lang/ocaml/files/ocaml-3.09.3-exec-stack-fixes.patch b/dev-lang/ocaml/files/ocaml-3.09.3-exec-stack-fixes.patch new file mode 100644 index 000000000000..3d46d4aede38 --- /dev/null +++ b/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/dev-lang/ocaml/files/ocaml-3.09.3-execheap.patch b/dev-lang/ocaml/files/ocaml-3.09.3-execheap.patch new file mode 100644 index 000000000000..a990d41b1186 --- /dev/null +++ b/dev-lang/ocaml/files/ocaml-3.09.3-execheap.patch @@ -0,0 +1,13 @@ +--- ocaml-3.09.3.orig/driver/ocamlcomp.sh.in 2002-06-08 03:27:50.000000000 +0000 ++++ ocaml-3.09.2/driver/ocamlcomp.sh.in 2007-04-21 17:27:24.000000000 +0000 +@@ -2,4 +2,10 @@ + + topdir=`dirname $0` + ++# evil hack for evil build system. ++if [ -x /usr/bin/scanelf ]; then ++ [ "$(scanelf @compiler@ -BF%x#f)" != "--mxe-" ] && scanelf -qXx -z mxe @compiler@ > /dev/null ++fi ++ ++ + exec @compiler@ -nostdlib -I $topdir/stdlib "$@" diff --git a/dev-lang/ocaml/ocaml-3.09.3-r1.ebuild b/dev-lang/ocaml/ocaml-3.09.3-r1.ebuild new file mode 100644 index 000000000000..79afa3249427 --- /dev/null +++ b/dev-lang/ocaml/ocaml-3.09.3-r1.ebuild @@ -0,0 +1,122 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/ocaml/ocaml-3.09.3-r1.ebuild,v 1.1 2007/04/22 13:55:57 phreak Exp $ + +inherit flag-o-matic eutils multilib pax-utils versionator + +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-$( get_version_component_range 1-2 )/${P}.tar.bz2" + +LICENSE="QPL-1.0 LGPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +IUSE="tk latex" + +DEPEND="virtual/libc + tk? ( >=dev-lang/tk-3.3.3 )" + +QA_EXECSTACK="/usr/lib/ocaml/compiler-*" + +# This is a crappy way to deal with the textrels, but it keeps stuff simple +QA_TEXTRELS="usr/bin/ocaml*.opt usr/bin/camlp4*.opt" + +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 + + # The configure script doesn't inherit previous defined variables, + # overwriting previous declarations of bytecccompopts, bytecclinkopts, + # nativecccompopts and nativecclinkopts. Reported upstream as issue 0004267. + epatch "${FILESDIR}"/${P}-configure.patch + + # The sed in the Makefile doesn't replace all occurences of @compiler@ + # in driver/ocamlcomp.sh.in. Reported upstream as issue 0004268. + epatch "${FILESDIR}"/${P}-Makefile.patch + + # Change the configure script to add the CFLAGS to bytecccompopts, LDFLAGS + # to bytecclinkopts. + sed -i -e "s,bytecccompopts=\"\",bytecccompopts=\"\${CFLAGS}\"," \ + -e "s,bytecclinkopts=\"\",bytecclinkopts=\"\${LDFLAGS}\"," \ + "${S}"/configure +} + +src_compile() { + local myconf="--host ${CHOST}" + + # dev-lang/ocaml tends to break/give unexpected results with "unsafe" CFLAGS. + strip-flags + replace-flags "-O?" -O2 + + use tk || myconf="-no-tk" + + # ocaml uses a home-brewn configure script, preventing it to use econf. + ./configure -prefix /usr \ + --bindir /usr/bin \ + --libdir /usr/$(get_libdir)/ocaml \ + --mandir /usr/share/man \ + --with-pthread ${myconf} || die "configure failed!" + + make world || die "make world failed!" + + # Native code generation is unsupported on some archs + if ! use ppc64 ; then + make opt || die "make opt failed!" + make opt.opt || die "make opt.opt failed!" + fi +} + +src_test() { + make bootstrap +} + +src_install() { + make BINDIR="${D}"/usr/bin \ + LIBDIR="${D}"/usr/$(get_libdir)/ocaml \ + MANDIR="${D}"/usr/share/man \ + install || die "make install failed!" + + # Install the compiler libs + dodir /usr/$(get_libdir)/ocaml/compiler-libs + insinto /usr/$(get_libdir)/ocaml/compiler-libs + doins {utils,typing,parsing}/*.{mli,cmi,cmo,cmx,o} + + # Symlink the headers to the right place + dodir /usr/include + dosym /usr/$(get_libdir)/ocaml/caml /usr/include/ + + # Remove ${D} from ld.conf, as the buildsystem isn't $(DESTDIR) aware + dosed "s:${D}::g" /usr/$(get_libdir)/ocaml/ld.conf + + dodoc Changes INSTALL LICENSE README Upgrading + + # Turn MPROTECT off for some of the ocaml binaries, since they are trying to + # rewrite the segment (which will obviously fail on systems having + # PAX_MPROTECT enabled). + pax-mark -m "${D}"//usr/bin/ocamldoc.opt "${D}"/usr/bin/ocamldep.opt \ + "${D}"/usr/bin/ocamllex.opt "${D}"/usr/bin/camlp4r.opt \ + "${D}"/usr/bin/camlp4o.opt + + # Create and envd entry for latex input files (this definitely belongs into + # CONTENT and not in pkg_postinst. + if use latex ; then + echo "TEXINPUTS=/usr/$(get_libdir)/ocaml/ocamldoc:" > "${T}"/99ocamldoc + doenvd "${T}"/99ocamldoc + fi +} + +pkg_postinst() { + echo + elog "OCaml is not binary compatible from version to version, so you (may)" + elog "need to rebuild all packages depending on it, that are actually" + elog "installed on your system. To do so, you can run:" + elog "sh ${FILESDIR}/ocaml-rebuild.sh [-h | emerge options]" + elog "Which will call emerge on all old packages with the given options" + echo +} -- 2.26.2