kgcc64-4.4.6.ebuild 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # Copyright 1999-2014 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 ~sparc"
  21. RDEPEND=">=dev-libs/gmp-4.2.1
  22. >=dev-libs/mpfr-2.3.2
  23. >=sys-devel/gcc-config-1.4"
  24. # unlike every other target, hppa has not unified the 32/64 bit
  25. # ports in binutils yet
  26. DEPEND="${RDEPEND}
  27. hppa? ( sys-devel/binutils-hppa64 )
  28. !sys-devel/gcc-hppa64
  29. !sys-devel/gcc-mips64
  30. !sys-devel/gcc-powerpc64
  31. !sys-devel/gcc-sparc64
  32. >=sys-apps/texinfo-4.8
  33. >=sys-devel/bison-1.875"
  34. pkg_postinst() {
  35. toolchain_pkg_postinst
  36. cd "${ROOT}"/usr/bin
  37. local x
  38. for x in gcc cpp ; do
  39. cat <<-EOF >${CTARGET%%-*}-linux-${x}
  40. #!/bin/sh
  41. exec ${CTARGET}-${x} "\$@"
  42. EOF
  43. chmod a+rx ${CTARGET%%-*}-linux-${x}
  44. done
  45. }