libgcc-external.bb 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. SUMMARY = "The GNU Compiler Collection - libgcc"
  2. HOMEPAGE = "http://www.gnu.org/software/gcc/"
  3. SECTION = "devel"
  4. DEPENDS += "virtual/${TARGET_PREFIX}binutils"
  5. PV = "${GCC_VERSION}"
  6. inherit external-toolchain
  7. LICENSE = "GPL-3.0-with-GCC-exception"
  8. # libgcc needs libc, but glibc's utilities need libgcc, so short-circuit the
  9. # interdependency here by manually specifying it rather than depending on the
  10. # libc packagedata.
  11. RDEPENDS_${PN} += "${@'${PREFERRED_PROVIDER_virtual/libc}' if '${PREFERRED_PROVIDER_virtual/libc}' else '${TCLIBC}'}"
  12. INSANE_SKIP_${PN} += "build-deps file-rdeps"
  13. # The dynamically loadable files belong to libgcc, since we really don't need the static files
  14. # on the target, moreover linker won't be able to find them there (see original libgcc.bb recipe).
  15. BINV = "${GCC_VERSION}"
  16. FILES_${PN} = "${base_libdir}/libgcc_s.so.*"
  17. FILES_${PN}-dev = "${base_libdir}/libgcc_s.so \
  18. ${libdir}/${EXTERNAL_TARGET_SYS}/${BINV}* \
  19. "
  20. INSANE_SKIP_${PN}-dev += "staticdev"
  21. FILES_${PN}-dbg += "${base_libdir}/.debug/libgcc_s.so.*.debug"
  22. do_install_extra () {
  23. if [ -e "${D}${libdir}/${EXTERNAL_TARGET_SYS}" ]; then
  24. if ! [ -e "${D}${libdir}/${TARGET_SYS}" ]; then
  25. ln -s "${EXTERNAL_TARGET_SYS}" "${D}${libdir}/${TARGET_SYS}"
  26. fi
  27. fi
  28. }
  29. do_package[prefuncs] += "add_sys_symlink"
  30. python add_sys_symlink () {
  31. import pathlib
  32. target_sys = pathlib.Path(d.expand('${D}${libdir}/${TARGET_SYS}'))
  33. if target_sys.exists():
  34. pn = d.getVar('PN')
  35. d.appendVar('FILES_%s-dev' % pn, ' ${libdir}/${TARGET_SYS}')
  36. }