gcc-package-cross.inc 1.1 KB

1234567891011121314151617181920212223242526272829
  1. INHIBIT_PACKAGE_STRIP = "1"
  2. do_install () {
  3. oe_runmake 'DESTDIR=${D}' install-host
  4. install -d ${D}${target_base_libdir}
  5. install -d ${D}${target_libdir}
  6. # Link gfortran to g77 to satisfy not-so-smart configure or hard coded g77
  7. # gfortran is fully backwards compatible. This is a safe and practical solution.
  8. ln -sf ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}gfortran ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}g77 || true
  9. ln -sf ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin/gfortran ${STAGING_DIR_NATIVE}/${prefix_native}/${TARGET_SYS}/bin/g77 || true
  10. # Remove things we don't need but keep share/java
  11. for d in info man share/doc share/locale share/man share/info; do
  12. rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/$d
  13. done
  14. # gcc-runtime requires some headers, we stash them here
  15. if [ "${PN}" == "gcc-cross" -o "${PN}" == "gcc-crosssdk" ]; then
  16. install -d ${D}${includedir}/gcc-build-internal
  17. for f in *.h *.c libgcc.mvars; do
  18. cp ${B}/gcc/$f ${D}${includedir}/gcc-build-internal/
  19. done
  20. if [ -f libgcc.mvars]; then
  21. cp ${B}/gcc/libgcc.mvars ${D}${includedir}/gcc-build-internal/
  22. fi
  23. fi
  24. }