kgcc64-4.8.2.ebuild 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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.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. pkg_postinst() {
  36. toolchain_pkg_postinst
  37. cd "${ROOT}"/usr/bin
  38. local x
  39. for x in gcc cpp ; do
  40. cat <<-EOF >${CTARGET%%-*}-linux-${x}
  41. #!/bin/sh
  42. exec ${CTARGET}-${x} "\$@"
  43. EOF
  44. chmod a+rx ${CTARGET%%-*}-linux-${x}
  45. done
  46. }