diff options
author | Patrick Williams <patrick@stwcx.xyz> | 2016-08-17 14:31:25 -0500 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2016-08-22 16:43:26 +0000 |
commit | 60f9d69e016b11c468c98ea75ba0a60c44afbbc4 (patch) | |
tree | ecb49581a9e41a37943c22cd9ef3f63451b20ee7 /import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran.inc | |
parent | e18c61205e0234b03697129c20cc69c9b3940efc (diff) | |
download | blackbird-openbmc-60f9d69e016b11c468c98ea75ba0a60c44afbbc4.tar.gz blackbird-openbmc-60f9d69e016b11c468c98ea75ba0a60c44afbbc4.zip |
yocto-poky: Move to import-layers subdir
We are going to import additional layers, so create a subdir to
hold all of the layers that we import with git-subtree.
Change-Id: I6f732153a22be8ca663035c518837e3cc5ec0799
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran.inc')
-rw-r--r-- | import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran.inc | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran.inc new file mode 100644 index 000000000..58ceb2e07 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran.inc @@ -0,0 +1,75 @@ +require gcc-configure-common.inc + +EXTRA_OECONF_PATHS = "\ + --with-sysroot=/not/exist \ + --with-build-sysroot=${STAGING_DIR_TARGET} \ +" + +do_configure () { + mtarget=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##` + target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##` + hardlinkdir ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$mtarget ${B} + + echo "Configuring libgfortran" + rm -rf ${B}/$target/libgfortran/ + mkdir -p ${B}/$target/libgfortran/ + cd ${B}/$target/libgfortran/ + chmod a+x ${S}/libgfortran/configure + relpath=${@os.path.relpath("${S}/libgfortran", "${B}/$target/libgfortran")} + $relpath/configure ${CONFIGUREOPTS} ${EXTRA_OECONF} + # Easiest way to stop bad RPATHs getting into the library since we have a + # broken libtool here + sed -i -e 's/hardcode_into_libs=yes/hardcode_into_libs=no/' ${B}/$target/libgfortran/libtool +} + +do_compile () { + target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##` + cd ${B}/$target/libgfortran/ + oe_runmake MULTIBUILDTOP=${B}/$target/libgfortran/ +} + +do_install () { + target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##` + cd ${B}/$target/libgfortran/ + oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/libgfortran/ install + if [ -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude ]; then + rmdir --ignore-fail-on-non-empty -p ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude + fi + if [ -d ${D}${infodir} ]; then + rmdir --ignore-fail-on-non-empty -p ${D}${infodir} + fi + chown -R root:root ${D} +} + +INHIBIT_DEFAULT_DEPS = "1" +DEPENDS = "gcc-runtime" + +BBCLASSEXTEND = "nativesdk" + +PACKAGES = "\ + ${PN}-dbg \ + libgfortran \ + libgfortran-dev \ + libgfortran-staticdev \ +" +FILES_${PN} = "${libdir}/libgfortran.so.*" +FILES_${PN}-dev = "\ + ${libdir}/libgfortran*.so \ + ${libdir}/libgfortran.spec \ + ${libdir}/libgfortran.la \ + ${libdir}/gcc/${TARGET_SYS}/${BINV}/libgfortranbegin.* \ + ${libdir}/gcc/${TARGET_SYS}/${BINV}/libcaf_single* \ +" +FILES_${PN}-staticdev = "${libdir}/libgfortran.a" + +INSANE_SKIP_${MLPREFIX}libgfortran-dev = "staticdev" + +do_package_write_ipk[depends] += "virtual/${MLPREFIX}libc:do_packagedata" +do_package_write_deb[depends] += "virtual/${MLPREFIX}libc:do_packagedata" +do_package_write_rpm[depends] += "virtual/${MLPREFIX}libc:do_packagedata" + +python __anonymous () { + f = d.getVar("FORTRAN", True) + if "fortran" not in f: + raise bb.parse.SkipPackage("libgfortran needs fortran support to be enabled in the compiler") +} |