kgcc64-4.7.4.ebuild 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=4
  4. case ${CHOST} in
  5. hppa*) CTARGET=hppa64-${CHOST#*-};;
  6. mips*) CTARGET=${CHOST/mips/mips64};;
  7. powerpc*) CTARGET=${CHOST/powerpc/powerpc64};;
  8. s390*) CTARGET=${CHOST/s390/s390x};;
  9. sparc*) CTARGET=${CHOST/sparc/sparc64};;
  10. i?86*) CTARGET=x86_64-${CHOST#*-};;
  11. esac
  12. export CTARGET
  13. TOOLCHAIN_ALLOWED_LANGS="c"
  14. GCC_TARGET_NO_MULTILIB=true
  15. PATCH_VER="1.0"
  16. GCC_FILESDIR=${FILESDIR/${PN}/gcc}
  17. inherit eutils toolchain
  18. DESCRIPTION="64bit kernel compiler"
  19. # Works on mips and sparc; all other archs, refer to bug #228115
  20. KEYWORDS="~hppa ~mips ~sparc"
  21. RDEPEND=">=dev-libs/gmp-4.3.2
  22. >=dev-libs/mpfr-2.4.2
  23. >=dev-libs/mpc-0.8.1
  24. >=sys-devel/gcc-config-1.4"
  25. # unlike every other target, hppa has not unified the 32/64 bit
  26. # ports in binutils yet
  27. DEPEND="${RDEPEND}
  28. hppa? ( sys-devel/binutils-hppa64 )
  29. !sys-devel/gcc-hppa64
  30. !sys-devel/gcc-mips64
  31. !sys-devel/gcc-powerpc64
  32. !sys-devel/gcc-sparc64
  33. >=sys-apps/texinfo-4.8
  34. >=sys-devel/bison-1.875"
  35. src_prepare() {
  36. EPATCH_EXCLUDE+=" 10_all_default-fortify-source.patch"
  37. EPATCH_EXCLUDE+=" 90_all_gcc-4.7-x32.patch"
  38. toolchain_src_prepare
  39. }
  40. pkg_postinst() {
  41. toolchain_pkg_postinst
  42. cd "${ROOT}"/usr/bin
  43. local x
  44. for x in gcc cpp ; do
  45. cat <<-EOF >${CTARGET%%-*}-linux-${x}
  46. #!/bin/sh
  47. exec ${CTARGET}-${x} "\$@"
  48. EOF
  49. chmod a+rx ${CTARGET%%-*}-linux-${x}
  50. done
  51. }