From patchwork Mon Jun 24 11:13:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 167563 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp4084195ilk; Mon, 24 Jun 2019 04:13:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqzhZQbfbIst/aWFSDmrjfcdawsmECDb9Bd4obH1mPkWDcrAU9+LwR+QPLk6noll4rZfu4Oy X-Received: by 2002:a17:902:7793:: with SMTP id o19mr86139256pll.110.1561374813776; Mon, 24 Jun 2019 04:13:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561374813; cv=none; d=google.com; s=arc-20160816; b=faVxKKk++Z2FRC4R6kYqdg0sAGnFy/i7BDc6snlmKs9OaSAUGBvbX15cLTUaAbprMw FFlzdyQ0rkeuEWyDoJ4tD1kj1bOXPI5KNLKA6DcxWhYxiE490ZjyPVjF2XsD8V6sX877 /CbfpxQ88WaBmyqUzRn+VUOex/XwFUPA0dLR096Z/9VMfPVIDWv1Mco2yhRqCF2hbemm TdcaCDDP7uL/11t3UX7Ym+nhSYywpaJw8RBRG5c9qoGhj7QmlgYCmorqCGI0XBlE7Y/O INMsGHGE6rRsNVBxoxKyRRtdmSBxJSdQ1SH3UrUsoTZwK4j6LnKXts+GAIBT+AiGPsag xKTg== 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=6a0eiNeOWzCLmImeLnJa2n06Cglu84lhkgLlPNuhaco=; b=ctux4qOZvCbZkZ3tFWYjf9lUpWnWGcopiXCxATpfd1rwxAc2zRTaakwNtBfKDWHKhw Hqhe6GGDkY6XsvHEg6mDK/1G2IU6EQYH+3OUCZXu9JKImrxwoylyhBPaUQ2QJEasneG6 IRVhrBmhmMyMcacqhteoAcadP4ANsSlbALGpNsUB1zFFJOhD4Nr6Vxng2r+iYI4DcQ3X QvgoRApm4QaPy+OeOJu9/KKMSSEW4DgdBNTrSDaqd3cJRdtoRQcGsgoeQ3Qeg6/qHQrS zomtnLxLCR38QcJH336d38t+6LlR2pthLW9J/b6swtMj/jKJdRXZLYqeLaKw6d/frkAr Gm6A== 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=SOXNgxlR; 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 z26si11523908pfj.247.2019.06.24.04.13.33; Mon, 24 Jun 2019 04:13:33 -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=SOXNgxlR; 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 6613E7E619; Mon, 24 Jun 2019 11:13:29 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by mail.openembedded.org (Postfix) with ESMTP id 12F2C7D391 for ; Mon, 24 Jun 2019 11:13:26 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id n9so13499815wru.0 for ; Mon, 24 Jun 2019 04:13:28 -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=gpaGAUP6ZbvEHafmRoO8pgWn/bJnCsCxEZrGL3rlR3k=; b=SOXNgxlRgNMnTtbmFII9BJ6cQF0iP8NRdnV/4mRNNLnHPghaqCACpIE6quTmtgY0Qc 7rMxxqS9qw2pt8z9ZxjbaV0iKEMURE4+OLPImLwjcLjRtTewSfUMRsGFQW3WM4sqirt7 ROdNiQHzroyG+9G+6avE4o7+W5w0oQA7z3UEA9fRu0Qf0LfM8xbIKclJBMcCXA8s02tH wSJ2OzTb1G+1BvAq8XBgsoUEu6YLfzG+MWAzJ5Js4OS82h7bOCKvkGDrIo17vHyTtV5C JIrHEMSNUFccbwQ5aSntplDZJRw6ORUL3qCaxFAD4UdXduZ+NWvc8O+86ZvH5OGXgaku 6L1Q== 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=gpaGAUP6ZbvEHafmRoO8pgWn/bJnCsCxEZrGL3rlR3k=; b=NAZtrZv6+hmun8yEFQpHDvX/7sYcECRjEc5wHzdw9KUGz5SrTvrcwY70RbRRCoZq1p PG3mRexDgUmllXCA+OnhGv3dhFl2HX3FDh7ke84MfeTEFQ9ghDVBAjdHZq3Y2pGbd27V xFk5V5GKWyXl/JYFyIya+AhGytn2CaIO4beBrrGb+dvvhxjAcJvowqprEFCZPYRElyMo 0mZpf2k3MiZRJGOgmwl+b1bBN52gg9UFq+UOnlIoZxWTZxNuC7YAZCxNQDBnyHKFlcXD ThXRZ01LIWKuyvzWhqQlxP8yifhm6tHmnbVFp7FDtVL1iVTQfkIx5lKf0MO5gfaX2QTp avTQ== X-Gm-Message-State: APjAAAXArsvIF3l2wydkqTbaOG0W3tCW9ykzPXVhF5rmbQ7RpuEDK4aN QAj1+jkYpTrHftM7PMjookg7a0FA2vU= X-Received: by 2002:adf:9d81:: with SMTP id p1mr32978915wre.294.1561374807367; Mon, 24 Jun 2019 04:13:27 -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 r2sm9748806wme.30.2019.06.24.04.13.25 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Jun 2019 04:13:26 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Mon, 24 Jun 2019 12:13:23 +0100 Message-Id: <20190624111324.8921-1-ross.burton@intel.com> X-Mailer: git-send-email 2.11.0 Subject: [OE-core] [PATCH 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 | 23 ++++++++++++++++++++++ 2 files changed, 28 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..3f5298aeee2 --- /dev/null +++ b/meta-selftest/recipes-test/fortran/fortran-helloworld.bb @@ -0,0 +1,23 @@ +SUMMARY = "Fortran Hello World" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +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