<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>I enabled the build of gfortran in the gcc-cross recipe using a gcc-cross_4.7.bbappend:<br><br><blockquote type="cite"># Build a gfortran cross-compiler<br></blockquote><blockquote type="cite">FORTRAN = ",fortran"<br></blockquote><br>The bitbake build fails in the libtool-cross do_qa_configure step. See, for example, the report at <a href="http://www.mail-archive.com/yocto@yoctoproject.org/msg13845.html:">http://www.mail-archive.com/yocto@yoctoproject.org/msg13845.html:</a><br><br><blockquote type="cite">configure: WARNING: unrecognized options: --disable-silent-rules, --with-<br></blockquote><blockquote type="cite">sysroot <br></blockquote><blockquote type="cite">DEBUG: Shell function do_configure finished <br></blockquote><blockquote type="cite">DEBUG: Executing python function do_qa_configure <br></blockquote><blockquote type="cite">NOTE: Checking autotools environment for common misconfiguration <br></blockquote><blockquote type="cite">ERROR: This autoconf log indicates errors, it looked at host include and/or <br></blockquote><blockquote type="cite">library paths while determining system capabilities. <br></blockquote><blockquote type="cite">Rerun configure task after fixing this. The path was <br></blockquote><blockquote type="cite">'/home/appusr/poky/build/tmp/work/armv7a-vfp-neon-poky-linux-<br></blockquote><blockquote type="cite">gnueabi/libtool-cross-2.4.2-r5.1/libtool-2.4.2' <br></blockquote><blockquote type="cite">DEBUG: Python function do_qa_configure finished <br></blockquote><blockquote type="cite">ERROR: Function failed: do_qa_configure<br></blockquote><br>This is due to the incomplete support for gfortran in the bitbake recipes. It looks like they were written for F77=g77 and have not been updated to support FC=gfortran. The FC variable is not defined properly for cross-compiling: it is missing the --with-sysroot= option. The result is a misconfiguration reported by --enable-poison-system-directories and discovered by insane.bbclass in do_qa_configure.<br><br>The patches below define the FC variables and update the default FORTRAN from f77 to fortran. I use the DENX Yocto/ELDK-5.4 git (<a href="http://www.denx.de/wiki/ELDK-5/EldkBuilding">http://www.denx.de/wiki/ELDK-5/EldkBuilding</a>), so the meta layer name and the line numbers may not be an exact match to the files in the OE git repository. Also, I am sorry I cannot use diff --git on my CentOS development system.<div><br><div><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Grande'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "></span></div></div>Unfortunately, while these patches enable the creation of a gfortran cross compiler, gfortran cross compiles fail due to a missing libgfortran.spec file. In fact, there are no libgfortran files at all. I don't know why. When I built my own gfortran cross compiler previously from the latest GCC 4.7 Code Sourcery sources, it made all the necessary pieces. I did not have to build any other tools, such as libtool or libgfortran. Maybe there are more bitbake files that have to be updated to build a functioning gfortran cross compiler. I'll keep working on that.<br><br></div><div><div><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Grande'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="font-size: 12px; ">Larry Baker</div><div style="font-size: 12px; ">US Geological Survey</div><div style="font-size: 12px; ">650-329-5608</div><div style="font-size: 12px; "><a href="mailto:baker@usgs.gov">baker@usgs.gov</a></div><div style="font-size: 12px; "><br class="khtml-block-placeholder"></div><div style="font-size: 12px; "><br></div>--- original/eldk/meta/classes/native.bbclass<br>+++ patched/eldk/meta/classes/native.bbclass<br>@@ -61,2 +61,3 @@<br>export CXX = "${CCACHE}${HOST_PREFIX}g++ ${HOST_CC_ARCH}"<br>+export FC = "${CCACHE}${HOST_PREFIX}gfortran ${HOST_CC_ARCH}"<br>export F77 = "${CCACHE}${HOST_PREFIX}g77 ${HOST_CC_ARCH}"<br>--- original/eldk/meta/conf/bitbake.conf<br>+++ patched/eldk/meta/conf/bitbake.conf<br>@@ -448,2 +448,3 @@<br>export CXX = "${CCACHE}${HOST_PREFIX}g++ ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"<br>+export FC = "${CCACHE}${HOST_PREFIX}gfortran ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"<br>export F77 = "${CCACHE}${HOST_PREFIX}g77 ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"<br>@@ -463,2 +464,3 @@<br>export BUILD_CXX = "${CCACHE}${BUILD_PREFIX}g++ ${BUILD_CC_ARCH}"<br>+export BUILD_FC = "${CCACHE}${BUILD_PREFIX}gfortran ${BUILD_CC_ARCH}"<br>export BUILD_F77 = "${CCACHE}${BUILD_PREFIX}g77 ${BUILD_CC_ARCH}"<br>--- original/eldk/meta/recipes-devtools/gcc/gcc-configure-common.inc<br>+++ patched/eldk/meta/recipes-devtools/gcc/gcc-configure-common.inc<br>@@ -13,3 +13,3 @@<br># gcc 3.x expects 'f77', 4.0 expects 'f95', 4.1 and 4.2 expect 'fortran'<br>-FORTRAN ?= ",f77"<br>+FORTRAN ?= ",fortran"<br>LANGUAGES ?= "c,c++${FORTRAN}${JAVA}"<br><br></span></div></div></body></html>