mirror of
https://git.yoctoproject.org/poky
synced 2026-09-16 09:49:35 +02:00
fortran-helloworld: add a very dumb Fortran Hello World for testing
For future runtime testing something more complex is preferred but this is sufficient to exercise the cross compiler. (From OE-Core rev: 7d5f39ca717fa1caea357a4366bbf106386432c0) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
f5379ec0d0
commit
f0c76ce18c
5
meta-selftest/recipes-test/fortran/files/hello.f95
Normal file
5
meta-selftest/recipes-test/fortran/files/hello.f95
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
program helloworld
|
||||||
|
|
||||||
|
print * , "Hello World!"
|
||||||
|
|
||||||
|
end program helloworld
|
||||||
25
meta-selftest/recipes-test/fortran/fortran-helloworld.bb
Normal file
25
meta-selftest/recipes-test/fortran/fortran-helloworld.bb
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
SUMMARY = "Fortran Hello World"
|
||||||
|
LICENSE = "MIT"
|
||||||
|
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
|
||||||
|
|
||||||
|
DEPENDS = "libgfortran"
|
||||||
|
|
||||||
|
SRC_URI = "file://hello.f95"
|
||||||
|
|
||||||
|
# These set flags that Fortran doesn't support
|
||||||
|
SECURITY_CFLAGS = ""
|
||||||
|
SECURITY_LDFLAGS = ""
|
||||||
|
|
||||||
|
do_compile() {
|
||||||
|
${HOST_PREFIX}gfortran ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${LDFLAGS} ${WORKDIR}/hello.f95 -o ${B}/fortran-hello
|
||||||
|
}
|
||||||
|
|
||||||
|
do_install() {
|
||||||
|
install -d ${D}${bindir}
|
||||||
|
install ${B}/fortran-hello ${D}${bindir}
|
||||||
|
}
|
||||||
|
|
||||||
|
python () {
|
||||||
|
if not d.getVar("FORTRAN"):
|
||||||
|
raise bb.parse.SkipRecipe("Fortran isn't enabled")
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user