summaryrefslogtreecommitdiffstats
path: root/meta-selftest
diff options
context:
space:
mode:
Diffstat (limited to 'meta-selftest')
-rw-r--r--meta-selftest/recipes-test/fortran/files/hello.f955
-rw-r--r--meta-selftest/recipes-test/fortran/fortran-helloworld.bb25
2 files changed, 30 insertions, 0 deletions
diff --git a/meta-selftest/recipes-test/fortran/files/hello.f95 b/meta-selftest/recipes-test/fortran/files/hello.f95
new file mode 100644
index 0000000000..a0745fc64d
--- /dev/null
+++ b/meta-selftest/recipes-test/fortran/files/hello.f95
@@ -0,0 +1,5 @@
1program helloworld
2
3 print * , "Hello World!"
4
5end program helloworld
diff --git a/meta-selftest/recipes-test/fortran/fortran-helloworld.bb b/meta-selftest/recipes-test/fortran/fortran-helloworld.bb
new file mode 100644
index 0000000000..97313d7e24
--- /dev/null
+++ b/meta-selftest/recipes-test/fortran/fortran-helloworld.bb
@@ -0,0 +1,25 @@
1SUMMARY = "Fortran Hello World"
2LICENSE = "MIT"
3LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
4
5DEPENDS = "libgfortran"
6
7SRC_URI = "file://hello.f95"
8
9# These set flags that Fortran doesn't support
10SECURITY_CFLAGS = ""
11SECURITY_LDFLAGS = ""
12
13do_compile() {
14 ${HOST_PREFIX}gfortran ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${LDFLAGS} ${WORKDIR}/hello.f95 -o ${B}/fortran-hello
15}
16
17do_install() {
18 install -d ${D}${bindir}
19 install ${B}/fortran-hello ${D}${bindir}
20}
21
22python () {
23 if not d.getVar("FORTRAN"):
24 raise bb.parse.SkipRecipe("Fortran isn't enabled")
25} \ No newline at end of file