gcc-5.4.0.ebuild 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="4"
  4. PATCH_VER="1.0"
  5. UCLIBC_VER="1.0"
  6. # Hardened gcc 4 stuff
  7. PIE_VER="0.6.5"
  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 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. is_crosscompile && EPATCH_EXCLUDE+=" 05_all_gcc-spec-env.patch"
  34. toolchain_src_prepare
  35. }