From patchwork Tue Jun 25 14:52:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 167727 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp5652257ilk; Tue, 25 Jun 2019 07:52:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqwWkDiQJDDLQv66I7MeSvKRf5x2nomY8LtTpNMMoN9M7DGQRnQMwp0FMAPlZ+1+RmqB//Tc X-Received: by 2002:a63:9d43:: with SMTP id i64mr36561197pgd.404.1561474333625; Tue, 25 Jun 2019 07:52:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561474333; cv=none; d=google.com; s=arc-20160816; b=iWdQSRwqP+v90k32QUtt9PqQYi8fREg4G3QP/id7pjbkQwKTtVOdK9SRA+ED/Wgk0p r5pDonxLzKO17FUz0Gc/2Jao7d4r4C0HGASZq/pJz9cuaPyD1yRF6cdf1Tj51hHVZuRm ztcV+LcEbYLS2wfqghywQ1RzXk88w19VFd9ctQTDDnI88ugiXHwk+WLwxu3EVX5n5CpW GWd1wIrY+kSz/1+pdxI/D8zNKXVLCS/Yb10C8jKMWyl75DGtyCRKV9+w6UoLhGD0YmYt ybeinO4EQ6YOJdZC0+MMeupAl4g1r9F5Y+Ymv1UwVhtii3xjlrI0TJFCF8c/ksjLexXn AosA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to; bh=iMB2sa7qTp5wYmb+zktWmaoCHbQqbcb6IY3h5e4i370=; b=AngthRMn0/TuTvd2FF5TToPe9kTNktRMfk+dRgegkur42uoja8zduZVXQGO54TtJNb 7JXFxE404NWpHOvmQNIGvRRUGYiqZr+rhhN1VvgZgzk9HHCKfmgs/oyTaXrrKVL3rI/H nJ7BlpfpRGP/mn49H7M7RI6DdBD7yyfqhPRDJjYe8YZGu3yZFyk5umXnU/zI6Yr+SM8y /jegPMSqbjpEPtheb+0IOc4bqH+RU4Ohj8HUruUgWb9uauKKsekbCydaRY241P7vb/YB Lj9xcpPDeAd1WdOj7C//FycEDbVgpnG0rtcyOO8PJZ123b6mt7TM6MiEFKnUawzTXvSM 5jEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=yKZqus7p; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id v19si489797plo.404.2019.06.25.07.52.13; Tue, 25 Jun 2019 07:52:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=yKZqus7p; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from ec2-34-214-78-129.us-west-2.compute.amazonaws.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 2A45D7E507; Tue, 25 Jun 2019 14:52:10 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by mail.openembedded.org (Postfix) with ESMTP id 9A8267BFB3 for ; Tue, 25 Jun 2019 14:52:08 +0000 (UTC) Received: by mail-wr1-f66.google.com with SMTP id p13so18216292wru.10 for ; Tue, 25 Jun 2019 07:52:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=Pg1oJ0HaAMAEHeXlIwn3eLHNtziLTqF0llPIGvZ6Q+Q=; b=yKZqus7pivNjIi9f05I8a7vBh8fwmnnP7RIJ1lDHYI7rFWpfiYeaHXt1dDBoZL9Et2 foX++fr26shocdgSvfDM3pYGg8B3+PyIWM4sCIqaTMvmw12HzrvYfdg6omZh0EjkxrMC YHbIMJQBrgXmxFHlOC9kqMZkkux+HM9EqJ9Ym6VcX3zXiTPvQ4+f3ms1ccTAFBmjcjDU d6uYIonFjpAeExbsQ7M3wLnSolR1aZIN0TuRf/29/VMz3XhUgvG6JstJpKtWvAc8LS0S QSm+TUg/VSnpfMaumJQKyNYVsqy/MxCSuvB7t9jGp28DZC+s1TZ5Tq4Nahidn0odeXOY +hKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=Pg1oJ0HaAMAEHeXlIwn3eLHNtziLTqF0llPIGvZ6Q+Q=; b=L4ADYtWyiaSMY2oH2T3uMiAHHwe3+oYUaOkpXUNVxQ4G5SdGkst46eHejbohUpVdB9 UOUz5xZ7Dah1C9R02M1wCe00uOMuUlkAf1Q4qqjdiVkGH8v/5bRlhFvFhw7uy/s7uB0/ W0+tfsadO/RXn8Nk0jbRG2A/vbbnLusyeZ/Yjmgwp0X3b/kE03J1WJoC7igUO28Qyc4G ljFog0vTVtoXp/DNzJDWbcrkRedmD/kyi7okuBAgmeBHIzqcLfTb/DAw+lJciW/dlZU4 V2ByR5mU1jXvhdxf1Vmn3+iZyoxywI36BmW7sw47lZF4rlPgxryNFE7WZLPr1dUqowpw 9lKA== X-Gm-Message-State: APjAAAWC6cdIJ7vYc4CwDs3Onwjs5tvFjoqXE/MigqMNfYofS3ZNK/2R D9AdLY2hqaBYoCN5rMogaFzK+JbV3y8= X-Received: by 2002:a5d:5448:: with SMTP id w8mr81932541wrv.180.1561474328978; Tue, 25 Jun 2019 07:52:08 -0700 (PDT) Received: from flashheart.burtonini.com (35.106.2.81.in-addr.arpa. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id p140sm2263877wme.31.2019.06.25.07.52.06 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Jun 2019 07:52:06 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Tue, 25 Jun 2019 15:52:02 +0100 Message-Id: <20190625145203.24342-1-ross.burton@intel.com> X-Mailer: git-send-email 2.11.0 Subject: [OE-core] [PATCH v2 1/2] fortran-helloworld: add a very dumb Fortran Hello World for testing X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org For future runtime testing something more complex is preferred but this is sufficient to exercise the cross compiler. Signed-off-by: Ross Burton --- meta-selftest/recipes-test/fortran/files/hello.f95 | 5 +++++ .../recipes-test/fortran/fortran-helloworld.bb | 25 ++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 meta-selftest/recipes-test/fortran/files/hello.f95 create mode 100644 meta-selftest/recipes-test/fortran/fortran-helloworld.bb -- 2.11.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core 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 00000000000..a0745fc64d7 --- /dev/null +++ b/meta-selftest/recipes-test/fortran/files/hello.f95 @@ -0,0 +1,5 @@ +program helloworld + + print * , "Hello World!" + +end 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 00000000000..97313d7e249 --- /dev/null +++ b/meta-selftest/recipes-test/fortran/fortran-helloworld.bb @@ -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") +} \ No newline at end of file