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 From patchwork Tue Jun 25 14:52:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 167728 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp5652557ilk; Tue, 25 Jun 2019 07:52:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqzCnp0F1EFvBEWhhD0pTwXo4FLxDlanUKg+rKyFaYpbptmO7Jo0cWKptZv1FtoB6trHGNZi X-Received: by 2002:a63:6ec6:: with SMTP id j189mr17006790pgc.168.1561474350894; Tue, 25 Jun 2019 07:52:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561474350; cv=none; d=google.com; s=arc-20160816; b=p1KarYaaMHMQqaHdYMQUS+e5x8WDC0Roj4ZbRsHjyOfLyXOfhmil4O53kIwTi4fhi6 ASwlK+W9F+vaxgEDkb6TQorViY5RaheAyVUzsOMNCEXWK7KnzMVUxMJpQkaFPDoABaxB z1cqlOVE6ne20YEkOM2paF/EbNX+zIuJLIBm+EpqAFnMBVHjoLT891qC4wplZ+u2pD2W bUPFham8cUybFTfLwGOpG/ljqT+A7EQaZNFW5TSPd7Qhxg94CISQ9UlHpaHzcGoiK45T sw+dgJwoOgeTibN8Ne8fCjj1owbpTRLmWwLUKQjluGHyK5C5b8fxikkPmlZxFxu233+M ViSw== 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=UFBsa5R+e7eIxHwfw3o8bTfzC3BHxyVpv/GUBbWhYjw=; b=MTZ3ISfToEQur8mwGyX0exO4V5W2BG4i8zMCQUVUGcsWT0DSffuuBA79UZ5hoE1TuM 8b/oXu+ug97/G5rzTngFuqO/YgBUw1VC9j5LMOv1Mqpo1iX2T6SuHm6Vxi3ylvGEomb9 bxkduU3lYFPoiMbKMO/F7PZSJDyJk/G6HptcgpXoChPuluxKH5RfZYHjiY2+rYZhR2Qk xrhEVWlhIsLFonOlOhWqlhj2CXKx1rVDJogEFuUm8jBg/OElY4zmGBZgPYfMnGSWXN+T vcVYfo/enPXuKvjM66JwUI1NrinwK8RiadiZZpOSdmO9cbK2ugrEwz6YTvjMqV3okGks EE8Q== 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=0uRry7MB; 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 d2si13118850pgc.75.2019.06.25.07.52.30; Tue, 25 Jun 2019 07:52:30 -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=0uRry7MB; 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 B718A7E514; Tue, 25 Jun 2019 14:52:27 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by mail.openembedded.org (Postfix) with ESMTP id 3F4007BFB3 for ; Tue, 25 Jun 2019 14:52:09 +0000 (UTC) Received: by mail-wr1-f65.google.com with SMTP id p13so18216353wru.10 for ; Tue, 25 Jun 2019 07:52:10 -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=eBolMsylZiz4kRXaQHcjtn7qE7LSjymyatHPNEjOD7U=; b=0uRry7MBkZmTjfXAf2E5sj6EHw5jBuXzGZLUirDXMmvRUzyajAkomuqqy60HWRwV1X ULTekwPq6oiL/Ija3vI62uzchqeS/ktJ6H2Tzm+3SCFvhMnNMwP1gcxvFwgrYTDyDHT/ RYN0D0wTXGFKmMsj/0p7UsfiEl2x+TbqlX9w63khG+WaP2ibWYajZ1XaWGGprcLDO2o8 io2v3QA5rU1joD6ku3OdQDFd2vlPg7LJJiSV4ovhP3Ejwr6vimIY+4xZPrrCQz9wGjb9 Kvf9GNpQL6srt/LmjcGoQtbYjMQ2vBzKxupnKhpROhbN3iWmKQFFRMbXnqsaS7YR2GRu ayrA== 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=eBolMsylZiz4kRXaQHcjtn7qE7LSjymyatHPNEjOD7U=; b=hEBOrJXQ1fDtuzbt17cJLOmkuHXdgjLkKfVnGiIziJrSHOpvKQ7eduWAzWqH9DJESd CTvIHiC9GJPdEDJEXY1oQ0niDkZZxZy0FL1DQB7hzcqg477Y4PtN3tJxbpEPYMBXvcH7 5fdl/REdGnefjxrWNSNhzXiuDHU8YoTprzcavXG/AVssqxrLF+3KUD9M0wVRYeEDiLCW eXNMB7MTRFEIc31KTkap3tAJBchGCKFPZY+SCvZ9+DXq3u9heEi+HWOtVDbg8g8eW3vR o2aUnNmj+m8Os03yxA7l4cW/Dc2UxN10+5Z4Qwy6/Lc6kB5hWR0x+R82hzNZA2ihNXK3 rXqQ== X-Gm-Message-State: APjAAAXKurwRhnGqUgdVNz6igr6i2i1xX4V/Vi1J03bwRCPwvKiYNU/H ObmVVyJJbLxgOCCPNjemqN6qjvNHor0= X-Received: by 2002:adf:ec12:: with SMTP id x18mr82143659wrn.145.1561474329844; Tue, 25 Jun 2019 07:52:09 -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.09 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Jun 2019 07:52:09 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Tue, 25 Jun 2019 15:52:03 +0100 Message-Id: <20190625145203.24342-2-ross.burton@intel.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190625145203.24342-1-ross.burton@intel.com> References: <20190625145203.24342-1-ross.burton@intel.com> Subject: [OE-core] [PATCH v2 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. The quadmath dependency is now handled in gcc-runtime and isn't needed in this test (as per local.conf.sample.extended changes). There's also no need to build libgfortran explicitly, as fortran-helloworld depends on it. 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