Advertisement
Guest User

Untitled

a guest
Jul 4th, 2015
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.51 KB | None | 0 0
  1. ==[ venerix @ underworld ] - [ ~/Linux/git/rogentos/overlay/sys-devel/base-gcc ]
  2. ==[:::experimental]> cat base-gcc-4.8.4.ebuild
  3. # Copyright 1999-2015 Gentoo Foundation
  4. # Distributed under the terms of the GNU General Public License v2
  5.  
  6. EAPI="4"
  7.  
  8. PATCH_VER="1.6"
  9. UCLIBC_VER="1.0"
  10.  
  11. # Hardened gcc 4 stuff
  12. PIE_VER="0.6.1"
  13. SPECS_VER="0.2.0"
  14. SPECS_GCC_VER="4.4.3"
  15. # arch/libc configurations known to be stable with {PIE,SSP}-by-default
  16. PIE_GLIBC_STABLE="x86 amd64 mips ppc ppc64 arm ia64"
  17. PIE_UCLIBC_STABLE="x86 arm amd64 mips ppc ppc64"
  18. SSP_STABLE="amd64 x86 mips ppc ppc64 arm"
  19. # uclibc need tls and nptl support for SSP support
  20. # uclibc need to be >= 0.9.33
  21. SSP_UCLIBC_STABLE="x86 amd64 mips ppc ppc64 arm"
  22. #end Hardened stuff
  23.  
  24. inherit eutils toolchain
  25.  
  26. KEYWORDS="alpha amd64 arm arm64 hppa ~ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd"
  27.  
  28. RDEPEND=""
  29. DEPEND="${RDEPEND}
  30. elibc_glibc? ( >=sys-libs/glibc-2.8 )
  31. >=${CATEGORY}/binutils-2.20"
  32.  
  33. if [[ ${CATEGORY} != cross-* ]] ; then
  34. PDEPEND="${PDEPEND} elibc_glibc? ( >=sys-libs/glibc-2.8 )"
  35. fi
  36.  
  37. src_prepare() {
  38. if has_version '<sys-libs/glibc-2.12' ; then
  39. ewarn "Your host glibc is too old; disabling automatic fortify."
  40. ewarn "Please rebuild gcc after upgrading to >=glibc-2.12 #362315"
  41. EPATCH_EXCLUDE+=" 10_all_default-fortify-source.patch"
  42. fi
  43.  
  44. toolchain_src_prepare
  45.  
  46. use vanilla && return 0
  47. #Use -r1 for newer piepatchet that use DRIVER_SELF_SPECS for the hardened specs.
  48. [[ ${CHOST} == ${CTARGET} ]] && epatch "${FILESDIR}"/gcc-spec-env-r1.patch
  49. }
  50.  
  51. src_install() {
  52. if ! use multilib ; then
  53. cd "${WORKDIR}"/build
  54. emake -j1 -C "${CTARGET}/libgcc" DESTDIR="${D}" install-shared || die
  55. emake -j1 -C "${CTARGET}/libobjc" DESTDIR="${D}" install-libs || die
  56. emake -j1 -C "${CTARGET}/libmpx" DESTDIR="${D}" install || die
  57. for lib in "libatomic" "libcilkrts" "libgfortran" "libitm" "libquadmath" "libsanitizer/{a,l,ub}san" "libstdc++-v3/src" "libvtv" ; do
  58. emake -j1 -C "${CTARGET}/$lib" DESTDIR="${D}" install-toolexeclibLTLIBRARIES || die
  59. done
  60. if use mudlap ; then
  61. emake -j1 -C "${CTARGET}/libmudflap" DESTDIR="${D}" install-toolexeclibLTLIBRARIES || die
  62. fi
  63. if use openmp ; then
  64. emake -j1 -C "${CTARGET}/libgomp" DESTDIR="${D}" install-toolexeclibLTLIBRARIES || die
  65. fi
  66. elif use multilib ; then
  67. emake -j1 -C "${CTARGET}/32/libgcc" DESTDIR="${D}" install-shared || die
  68. emake -j1 -C "${CTARGET}/32/libobjc" DESDIR="${D}" install-libs || die
  69. emake -j1 -C "${CTARGET}/32/libmpx" DESDIR="${D}" install || die
  70. for lib in "libatomic" "libcilkrts" "libgfortran" "libitm" "libquadmath" "libsanitizer/{a,l,ub}san" "libstdc++-v3/src" "libvtv" ; do
  71. emake -j1 -C "${CTARGET}/32/$lib" DESTDIR="${D}" installtoolexecLTLIBRARIES || die
  72. done
  73. if use mudflap ; then
  74. emake -j1 -C "${CTARGET}/32/libmudflap" DESTDIR="${D}" install-toolexeclibLTLIBRARIES || die
  75. fi
  76. if use openmp ; then
  77. emake -j1 -C "${CTARGET}/32/libgomp" DESTDIR="${D}" install-toolexeclibLTLIBRARIES || die
  78. fi
  79. fi
  80.  
  81. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement