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 From patchwork Mon Jun 24 11:13:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 167564 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp4084527ilk; Mon, 24 Jun 2019 04:13:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqwjyQgUPBY+nxJ8VIoEGQ7qK5cmISDXmWecv5EV4U3TCA+XnjsCpEtm5lNHY8vbVXjeg48t X-Received: by 2002:a63:2ad5:: with SMTP id q204mr27630066pgq.140.1561374834381; Mon, 24 Jun 2019 04:13:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561374834; cv=none; d=google.com; s=arc-20160816; b=B1S1BZYXH9qrL4411B+AhiX+7oG6Bbu2pCKhNIyQE4oEosGUvvs54UuDV6OUJ8myd5 EpkJgXJtF7/nPXETD7fzv65tsEfFxOhhNoxr4h3txQs0DZJQtjz5CWD+uQrE0x786M4V h5tXT5iX4QeKPOteoIz5gOXse97UP6OsehCbNxBtP5cMnYp29b5F1CyAQCfCa5K25caW q19KePWVCBiKaeYpLemSoP5i9ZlkORWQ5IKXgbO+3rJSjiR7LLaZwrQ5PwwwTQdr3hip 7DOvNgj9I9kf487kv6YoWGia4hTf9swLnwQexwrSW1KNyO5y8WgdcVayz716SqKk07P0 TypQ== 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:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to; bh=dd/iHLI1YkzDr7aQHzQhdSYw8Az/20nnDX93AKDBna0=; b=xJY0/TMU5hf5y7FcLGEf+5iqswXu+ZbWz4ksYFMVMHBALMjpR3qb8kaZzVD9goiQHz 6og8JeXaVxkioElSSrsIEeijf/kQVyleIRKUI7dCfPT/OIWjwsmFHKI9gSYk/TrGJNRV b6GnC5DqLO4g6ufjVLx1yq2AVbrHINEsqD7mKEo31WPG8Gy+Mppvet4l09hINbhzZB4Y XFJYMqbRyRqrt9nF6+E6kCzo+PFZ/5M9pLAdhme/w3fbZyQinTHLu0UBS15mOuw3Fzzl DEV/J5Ru9/vTKh3Ag8l1SSNApUmPN5IqWOEIXzYVLW+nR/8zQjuGFkwJYlACFrlDyZuy EZCg== 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=ah9MhhAp; 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 t4si5395569pgp.10.2019.06.24.04.13.54; Mon, 24 Jun 2019 04:13:54 -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=ah9MhhAp; 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 566887E641; Mon, 24 Jun 2019 11:13:51 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by mail.openembedded.org (Postfix) with ESMTP id D0E867D391 for ; Mon, 24 Jun 2019 11:13:27 +0000 (UTC) Received: by mail-wm1-f65.google.com with SMTP id s15so12928241wmj.3 for ; Mon, 24 Jun 2019 04:13:29 -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:in-reply-to:references; bh=fbSt+j9LZdL/V8zQ2HFDJFxymT3IM9p4g2InVSjfZqw=; b=ah9MhhApDKNuXcGAZEi4V7KD/Y/O3wsAJ/dpsjTp19hSx2gIunvoRGUDxp+B9qwmYJ oVxZxtSoZfBYvD7l6LDMa2fm1+zioEV3rQhH3aa44SSTMYSCNujUkipTOTkanP0ra3o0 yDRnIU4nb0uUu3WPSshR+0DZ6b3LLyOtkCSK+FthjFxiVl6pgBQPyHqqZuzyfZ1429uM dYvNoxoYedXXeY3J/iehNIxSAKHJ6Lel+lAx6DD/VXgCkzCEvdMhTiPyCt6o8HqOozbq Jhf9llBdglraNmB87sMyVDYv6BKf5nRykS48HKga6b1IlcyWitAwTQrpAAc2Zs8uFqlO oblQ== 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:in-reply-to :references; bh=fbSt+j9LZdL/V8zQ2HFDJFxymT3IM9p4g2InVSjfZqw=; b=K2XefcsGzpHzQ6AUIKGXOogFYtUgXwrRc7uRgqX4cWIpSEyC3kB95mRUBCACnhY4OJ 2WBjqlY5vQRoV3QR4d9idianuZOa8I2TKZYbJF1bh6aDXCBBAgakxEkcnsNNcElgAW2U Dd5DWDAXU2S2L5unpTQ9e896EpTyQlIsXM+pKZzMFhbX0W2WLY8CqA9XAgZPttDWFEV6 tUz/zr1VCa1BXOIsZ1or2h8/yIrVU2+s6FreVkXiii0oIttEjSBOe4WLTXoK1qsv6hmP xNgZOhXIs3jCkPwY0Hc2L06NLBRCdWTjHzG3jHfyipTeEL7g4vxdljtQ6cIneTsBZhQ7 rUAw== X-Gm-Message-State: APjAAAU1BWgzXWhQ2hAEJsUpKnmJqpI4Kp2VEjqV/z26I8FPfky6yh7V QM7117xVlbdKo/rg/A0BuL+HJlGN1c0= X-Received: by 2002:a7b:c7d7:: with SMTP id z23mr16138648wmk.46.1561374808223; Mon, 24 Jun 2019 04:13:28 -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.27 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Jun 2019 04:13:27 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Mon, 24 Jun 2019 12:13:24 +0100 Message-Id: <20190624111324.8921-2-ross.burton@intel.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190624111324.8921-1-ross.burton@intel.com> References: <20190624111324.8921-1-ross.burton@intel.com> Subject: [OE-core] [PATCH 2/2] oeqa/buildoptions: check that Fortran code actually cross-compiles 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 Don't just test that we can build the cross-compiler, but test that it actually can cross-compile some Fortran. Signed-off-by: Ross Burton --- meta/lib/oeqa/selftest/cases/buildoptions.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) -- 2.11.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/lib/oeqa/selftest/cases/buildoptions.py b/meta/lib/oeqa/selftest/cases/buildoptions.py index 3ad65b40341..6a5378d3ff6 100644 --- a/meta/lib/oeqa/selftest/cases/buildoptions.py +++ b/meta/lib/oeqa/selftest/cases/buildoptions.py @@ -162,17 +162,14 @@ class ArchiverTest(OESelftestTestCase): self.assertTrue((g.glob(src_file_glob) and g.glob(tar_file_glob)), "Couldn't find .src.rpm and .tar.gz files under %s/allarch*/xcursor*" % deploy_dir_src) class ToolchainOptions(OESelftestTestCase): - def test_toolchain_fortran(self): """ - Test whether we can enable and build fortran and its supporting libraries + Test that Fortran works by building a Hello, World binary. """ features = 'FORTRAN_forcevariable = ",fortran"\n' - features += 'RUNTIMETARGET_append_pn-gcc-runtime = " libquadmath"\n' self.write_config(features) - - bitbake('gcc-runtime libgfortran') + bitbake('fortran-helloworld') class SourceMirroring(OESelftestTestCase): # Can we download everything from the Yocto Sources Mirror over http only