diff options
Diffstat (limited to 'meta/recipes-devtools/gcc/libgfortran.inc')
-rw-r--r-- | meta/recipes-devtools/gcc/libgfortran.inc | 49 |
1 files changed, 33 insertions, 16 deletions
diff --git a/meta/recipes-devtools/gcc/libgfortran.inc b/meta/recipes-devtools/gcc/libgfortran.inc index 5f5d4af758..e810146d4d 100644 --- a/meta/recipes-devtools/gcc/libgfortran.inc +++ b/meta/recipes-devtools/gcc/libgfortran.inc @@ -5,23 +5,34 @@ EXTRA_OECONF_PATHS = "\ --with-build-sysroot=${STAGING_DIR_TARGET} \ " +# An arm hard float target like raspberrypi4 won't build +# as CFLAGS don't make it to the fortran compiler otherwise +# (the configure script sets FC to $GFORTRAN unconditionally) +export GFORTRAN = "${FC}" + do_configure () { - rm -rf ${B}/${TARGET_SYS}/libgfortran/ - mkdir -p ${B}/${TARGET_SYS}/libgfortran/ - cd ${B}/${TARGET_SYS}/libgfortran/ - chmod a+x ${S}/libgfortran/configure - relpath=${@os.path.relpath("${S}/libgfortran", "${B}/${TARGET_SYS}/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_SYS}/libgfortran/libtool + for target in libbacktrace libgfortran + do + rm -rf ${B}/${TARGET_SYS}/$target/ + mkdir -p ${B}/${TARGET_SYS}/$target/ + cd ${B}/${TARGET_SYS}/$target/ + chmod a+x ${S}/$target/configure + relpath=${@os.path.relpath("${S}", "${B}/${TARGET_SYS}")} + ../$relpath/$target/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_SYS}/$target/libtool + done } EXTRACONFFUNCS += "extract_stashed_builddir" do_configure[depends] += "${COMPILERDEP}" do_compile () { - cd ${B}/${TARGET_SYS}/libgfortran/ - oe_runmake MULTIBUILDTOP=${B}/${TARGET_SYS}/libgfortran/ + for target in libbacktrace libgfortran + do + cd ${B}/${TARGET_SYS}/$target/ + oe_runmake MULTIBUILDTOP=${B}/${TARGET_SYS}/$target/ + done } do_install () { @@ -47,18 +58,24 @@ PACKAGES = "\ libgfortran-dev \ libgfortran-staticdev \ " -FILES_${PN} = "${libdir}/libgfortran.so.*" -FILES_${PN}-dev = "\ + +LICENSE:${PN} = "GPL-3.0-with-GCC-exception" +LICENSE:${PN}-dev = "GPL-3.0-with-GCC-exception" +LICENSE:${PN}-dbg = "GPL-3.0-with-GCC-exception" + +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* \ ${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude/ \ + ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ \ " -FILES_${PN}-staticdev = "${libdir}/libgfortran.a" +FILES:${PN}-staticdev = "${libdir}/libgfortran.a" -INSANE_SKIP_${MLPREFIX}libgfortran-dev = "staticdev" +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" @@ -67,5 +84,5 @@ do_package_write_rpm[depends] += "virtual/${MLPREFIX}libc:do_packagedata" python __anonymous () { f = d.getVar("FORTRAN") if "fortran" not in f: - raise bb.parse.SkipPackage("libgfortran needs fortran support to be enabled in the compiler") + raise bb.parse.SkipRecipe("libgfortran needs fortran support to be enabled in the compiler") } |