gcc-4.8.5.ebuild 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="4"
  4. PATCH_VER="1.3"
  5. UCLIBC_VER="1.0"
  6. # Hardened gcc 4 stuff
  7. PIE_VER="0.6.2"
  8. SPECS_VER="0.2.0"
  9. SPECS_GCC_VER="4.4.3"
  10. # arch/libc configurations known to be stable with {PIE,SSP}-by-default
  11. PIE_GLIBC_STABLE="x86 amd64 mips ppc ppc64 arm ia64"
  12. PIE_UCLIBC_STABLE="x86 arm amd64 mips ppc ppc64"
  13. SSP_STABLE="amd64 x86 mips ppc ppc64 arm"
  14. # uclibc need tls and nptl support for SSP support
  15. # uclibc need to be >= 0.9.33
  16. SSP_UCLIBC_STABLE="x86 amd64 mips ppc ppc64 arm"
  17. #end Hardened stuff
  18. inherit eutils toolchain
  19. KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd"
  20. RDEPEND=""
  21. DEPEND="${RDEPEND}
  22. elibc_glibc? ( >=sys-libs/glibc-2.8 )
  23. >=${CATEGORY}/binutils-2.20"
  24. if [[ ${CATEGORY} != cross-* ]] ; then
  25. PDEPEND="${PDEPEND} elibc_glibc? ( >=sys-libs/glibc-2.8 )"
  26. fi
  27. src_prepare() {
  28. if has_version '<sys-libs/glibc-2.12' ; then
  29. ewarn "Your host glibc is too old; disabling automatic fortify."
  30. ewarn "Please rebuild gcc after upgrading to >=glibc-2.12 #362315"
  31. EPATCH_EXCLUDE+=" 10_all_default-fortify-source.patch"
  32. fi
  33. toolchain_src_prepare
  34. use vanilla && return 0
  35. #Use -r1 for newer piepatchet that use DRIVER_SELF_SPECS for the hardened specs.
  36. [[ ${CHOST} == ${CTARGET} ]] && epatch "${FILESDIR}"/gcc-spec-env-r1.patch
  37. }