kgcc64-4.2.4.ebuild 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. KEYWORDS="-* hppa ~mips ~s390 ~sparc"
  20. # unlike every other target, hppa has not unified the 32/64 bit
  21. # ports in binutils yet
  22. DEPEND="hppa? ( sys-devel/binutils-hppa64 )
  23. !sys-devel/gcc-hppa64
  24. !sys-devel/gcc-mips64
  25. !sys-devel/gcc-powerpc64
  26. !sys-devel/gcc-sparc64"
  27. pkg_postinst() {
  28. toolchain_pkg_postinst
  29. cd "${ROOT}"/usr/bin
  30. local x
  31. for x in gcc cpp ; do
  32. cat <<-EOF >${CTARGET%%-*}-linux-${x}
  33. #!/bin/sh
  34. exec ${CTARGET}-${x} "\$@"
  35. EOF
  36. chmod a+rx ${CTARGET%%-*}-linux-${x}
  37. done
  38. }