gcc-source.inc 1.4 KB

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