]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
selftest/fortran-helloworld: Fix buildpaths error
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 15 Jul 2024 12:10:46 +0000 (13:10 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 15 Jul 2024 12:12:31 +0000 (13:12 +0100)
There is a buildpaths QA error in the test recipe that somehow didn't show up
in earlier testing. Use a source directory and tweak the build command to
avoid embedding build paths in the generated binary.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta-selftest/recipes-test/fortran/fortran-helloworld.bb

index a8979666084e9eaeba707dabe1d4a952a0a77b6d..11928dc95a997d2895d2e3b4ef1047e9d5018594 100644 (file)
@@ -6,12 +6,15 @@ DEPENDS = "libgfortran"
 
 SRC_URI = "file://hello.f95"
 
+S = "${WORKDIR}/sources"
+UNPACKDIR = "${S}"
+
 # These set flags that Fortran doesn't support
 SECURITY_CFLAGS = ""
 SECURITY_LDFLAGS = ""
 
 do_compile() {
-       ${FC} ${LDFLAGS} ${UNPACKDIR}/hello.f95 -o ${B}/fortran-hello
+       ${FC} ${LDFLAGS} hello.f95 -o ${B}/fortran-hello
 }
 
 do_install() {