gcc-source.inc 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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. B = "${WORKDIR}/build"
  17. # This needs to be Python to avoid lots of shell variables becoming dependencies.
  18. python do_preconfigure () {
  19. import subprocess
  20. cmd = d.expand('cd ${S} && PATH=${PATH} gnu-configize')
  21. subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
  22. # See 0044-gengtypes.patch, we need to regenerate this file
  23. bb.utils.remove(d.expand("${S}/gcc/gengtype-lex.c"))
  24. cmd = d.expand("sed -i 's/BUILD_INFO=info/BUILD_INFO=/' ${S}/gcc/configure")
  25. subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
  26. # Easiest way to stop bad RPATHs getting into the library since we have a
  27. # broken libtool here (breaks cross-canadian and target at least)
  28. cmd = d.expand("sed -i -e 's/hardcode_into_libs=yes/hardcode_into_libs=no/' ${S}/libcc1/configure")
  29. subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
  30. }
  31. addtask do_preconfigure after do_patch
  32. do_preconfigure[depends] += "gnu-config-native:do_populate_sysroot autoconf-native:do_populate_sysroot"