[meta-lsi] [PATCH 08/15] gcc-runtime: Clean shared data for libgfortran

Cristian Bercaru cristian.bercaru at windriver.com
Wed May 13 04:19:42 PDT 2015


From: Daniel Dragomir <daniel.dragomir at windriver.com>

Completing commit
gcc: Fix fortran compiling error when building SDK

- Since libgfortran has his separate receipe, we need to clean the shared
  data for libgfortran installed by gcc-runtime receipe.
  Otherwise, this warning will occur:

  WARNING: The recipe libgfortran is trying to install files into a shared
  area when those files already exist.

  This warning didn't affect the final binaries, but it says that cache dir
  declared in SSTATE_DIR var will be left in an inconsistent condition.
  This will lead to this error when the same sstate-cache directory is
  used by another build(s):

ERROR: libgfortran not found in the base feeds

- Also renamed the pachages for libgfortran receipe

- Uncomment the lines from gcc-cross bbappend to be sure that
  libquadmath headers will be available in the gcc libexec dir.
  This is needed by libgfortran as libquadmath is his dependency.

Signed-off-by: Daniel Dragomir <daniel.dragomir at windriver.com>
---
 recipes-devtools/gcc/gcc-cross_4.8.bbappend   |    6 +++---
 recipes-devtools/gcc/gcc-runtime_4.8.bbappend |    7 +++++++
 recipes-devtools/gcc/libgfortran_4.8.bb       |    6 +++---
 3 files changed, 13 insertions(+), 6 deletions(-)
 create mode 100644 recipes-devtools/gcc/gcc-runtime_4.8.bbappend

diff --git a/recipes-devtools/gcc/gcc-cross_4.8.bbappend b/recipes-devtools/gcc/gcc-cross_4.8.bbappend
index 652c034..7312921 100644
--- a/recipes-devtools/gcc/gcc-cross_4.8.bbappend
+++ b/recipes-devtools/gcc/gcc-cross_4.8.bbappend
@@ -1,6 +1,6 @@
 do_install_append () {
 	# libquadmath headers need to  be available in the gcc libexec dir
-#	install -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/
-#	cp ${S}/libquadmath/quadmath.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/
-#	cp ${S}/libquadmath/quadmath_weak.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/
+	install -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/
+	cp ${S}/libquadmath/quadmath.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/
+	cp ${S}/libquadmath/quadmath_weak.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/
 }
diff --git a/recipes-devtools/gcc/gcc-runtime_4.8.bbappend b/recipes-devtools/gcc/gcc-runtime_4.8.bbappend
new file mode 100644
index 0000000..de89630
--- /dev/null
+++ b/recipes-devtools/gcc/gcc-runtime_4.8.bbappend
@@ -0,0 +1,7 @@
+# Clean shared data for libgfortran as long as it have separate recipe. Otherwise, a warning will occur.
+do_clean_libgfortran_data() {
+	rm -rf ${PKGDEST}/libgfortran*
+	rm -rf ${PKGDESTWORK}/runtime/libgfortran*
+	rm -rf ${PKGDESTWORK}/runtime-reverse/libgfortran*
+}
+addtask do_clean_libgfortran_data after do_package before do_packagedata
diff --git a/recipes-devtools/gcc/libgfortran_4.8.bb b/recipes-devtools/gcc/libgfortran_4.8.bb
index 3d503e2..6b2587e 100644
--- a/recipes-devtools/gcc/libgfortran_4.8.bb
+++ b/recipes-devtools/gcc/libgfortran_4.8.bb
@@ -57,10 +57,10 @@ DEPENDS = "gcc-runtime"
 BBCLASSEXTEND = "nativesdk"
 
 PACKAGES = "\
+    ${PN} \
     ${PN}-dbg \
-    libgfortran \
-    libgfortran-dev \
-    libgfortran-staticdev \
+    ${PN}-dev \
+    ${PN}-staticdev \
 "
 FILES_${PN} = "${libdir}/libgfortran.so.*"
 FILES_${PN}-dev = "\
-- 
1.7.9.5



More information about the meta-lsi mailing list