gcc-source.inc 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. deltask do_configure
  2. deltask do_compile
  3. deltask do_install
  4. deltask do_populate_sysroot
  5. deltask do_populate_lic
  6. RM_WORK_EXCLUDE += "${PN}"
  7. inherit nopackages
  8. PN = "gcc-source-${PV}"
  9. WORKDIR = "${TMPDIR}/work-shared/gcc-${PV}-${PR}"
  10. SSTATE_SWSPEC = "sstate:gcc::${PV}:${PR}::${SSTATE_VERSION}:"
  11. STAMP = "${STAMPS_DIR}/work-shared/gcc-${PV}-${PR}"
  12. STAMPCLEAN = "${STAMPS_DIR}/work-shared/gcc-${PV}-*"
  13. INHIBIT_DEFAULT_DEPS = "1"
  14. DEPENDS = ""
  15. PACKAGES = ""
  16. TARGET_ARCH = "allarch"
  17. TARGET_AS_ARCH = "none"
  18. TARGET_CC_ARCH = "none"
  19. TARGET_LD_ARCH = "none"
  20. TARGET_OS = "linux"
  21. baselib = "lib"
  22. PACKAGE_ARCH = "all"
  23. B = "${WORKDIR}/build"
  24. # This needs to be Python to avoid lots of shell variables becoming dependencies.
  25. python do_preconfigure () {
  26. import subprocess
  27. cmd = d.expand('cd ${S} && PATH=${PATH} gnu-configize')
  28. subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
  29. cmd = d.expand("sed -i 's/BUILD_INFO=info/BUILD_INFO=/' ${S}/gcc/configure")
  30. subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
  31. # Easiest way to stop bad RPATHs getting into the library since we have a
  32. # broken libtool here (breaks cross-canadian and target at least)
  33. cmd = d.expand("sed -i -e 's/hardcode_into_libs=yes/hardcode_into_libs=no/' ${S}/libcc1/configure")
  34. subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
  35. }
  36. addtask do_preconfigure after do_patch
  37. do_preconfigure[depends] += "gnu-config-native:do_populate_sysroot autoconf-native:do_populate_sysroot"