From patchwork Wed Mar 16 20:33:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 5360 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id B9CB1C433FE for ; Wed, 16 Mar 2022 20:33:31 +0000 (UTC) Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) by mx.groups.io with SMTP id smtpd.web08.1865.1647462810527119279 for ; Wed, 16 Mar 2022 13:33:30 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=PoT2XDGL; spf=pass (domain: linuxfoundation.org, ip: 209.85.221.47, mailfrom: richard.purdie@linuxfoundation.org) Received: by mail-wr1-f47.google.com with SMTP id a1so3209952wrh.10 for ; Wed, 16 Mar 2022 13:33:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=uSJhvC04pAvUQSV2nC+awxhb97fOWBFaTDViO/v/Uo0=; b=PoT2XDGLIIRTOI+BFMUQeMusaETyJwml3bb07fEQD6j72xGaCZBj4WLoArthFW7ktX 97rmLyjR9UbaFR8b+e+yzQ8Sisu8F8MZRP8hIrPaE65SvdVvSnE+9Rib0BAj7QrKfX3I jbFH1QKA3JCXaljcNrYmmGoy56NmhI85reTSM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=uSJhvC04pAvUQSV2nC+awxhb97fOWBFaTDViO/v/Uo0=; b=1ovhxNu4neYz3eZ7IDlTV8JoW655jZDFuAKVpy/xM2yvFwa4Yujp2JahhR1cf5jdR7 vgtSnrtGgR/fvcScgfAcEPcjfBSHZl36wVojXoaKfjmznPCXuvHLtAj42pD37L6Ez92I bCmvOdSJu3P8e0lKR8DDL9+de9yswNZXXJ3KA+8e5xA0xBbrGAA0+a81ErIHXzR3VvnM KZwrQAbKD0VahrA1gE0qrBxfIsiggP2th0+WI7qPMQqtWSKapTqPU3APNERrKqPOxtGc J5v4bUL8y74p+P1coZaH6BAfS2eqLNpzIBe/7PSiUjwGsgcHpjssPOICdPUcXqjm2yK7 woJg== X-Gm-Message-State: AOAM530WuBO/nxGC26/PkfegZndmAEm32ng/6p4Yi6M3A3mEnlfq+atB gk2bmDSv7sLuro5a7vYtqFLRY9jxOhCP9zh9 X-Google-Smtp-Source: ABdhPJz3XW8fCdcskUuEUzAhz2bRV5p7kQtlnXfAEz1DJMoV+YRRpLeD4rfMuPBJc28aurrKJF4BQQ== X-Received: by 2002:a5d:64ad:0:b0:1fe:9950:29a3 with SMTP id m13-20020a5d64ad000000b001fe995029a3mr1293821wrp.9.1647462808535; Wed, 16 Mar 2022 13:33:28 -0700 (PDT) Received: from hex.int.rpsys.net ([2001:8b0:aba:5f3c:bc44:1420:18a9:e343]) by smtp.gmail.com with ESMTPSA id u11-20020a05600c19cb00b00389efe9c512sm6520630wmq.23.2022.03.16.13.33.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 13:33:28 -0700 (PDT) From: Richard Purdie To: openembedded-core@lists.openembedded.org Subject: [PATCH 1/3] libstd-rs: Extend to nativesdk Date: Wed, 16 Mar 2022 20:33:25 +0000 Message-Id: <20220316203327.950175-1-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 16 Mar 2022 20:33:31 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/163356 This is needed to add the rust standard library to SDKs for use by SDK tools. Signed-off-by: Richard Purdie --- meta/recipes-devtools/rust/libstd-rs_1.59.0.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta/recipes-devtools/rust/libstd-rs_1.59.0.bb b/meta/recipes-devtools/rust/libstd-rs_1.59.0.bb index 7c453a593a5..0ff1fbd6783 100644 --- a/meta/recipes-devtools/rust/libstd-rs_1.59.0.bb +++ b/meta/recipes-devtools/rust/libstd-rs_1.59.0.bb @@ -8,3 +8,5 @@ SRC_URI += " \ " # libstd moved from src/libstd to library/std in 1.47+ S = "${RUSTSRC}/library/std" + +BBCLASSEXTEND = "nativesdk" \ No newline at end of file From patchwork Wed Mar 16 20:33:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 5359 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id B8D5BC433EF for ; Wed, 16 Mar 2022 20:33:31 +0000 (UTC) Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) by mx.groups.io with SMTP id smtpd.web12.1958.1647462810940817996 for ; Wed, 16 Mar 2022 13:33:31 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=Z5gP297m; spf=pass (domain: linuxfoundation.org, ip: 209.85.221.49, mailfrom: richard.purdie@linuxfoundation.org) Received: by mail-wr1-f49.google.com with SMTP id u16so3588749wru.4 for ; Wed, 16 Mar 2022 13:33:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=d7rCKdixTV4FrZnqd2c+JH1NXujwddZUoQ/DlUcHC6o=; b=Z5gP297mEBCmVU7+3gS84os5BVb0oafYAbUfW2/tLtpRfCYs1CfQ+D1SLu1LT3er0o 0rRFfhRruWz/8Vr5uPVLqPimEHVi7Hmwy9vLpUMkHZ6RPF0ZBBKm9rlep5fHWMx/yC1G wM1M+bsLJTBLvG0ttD3+k4p463GpYIRJEn7PM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=d7rCKdixTV4FrZnqd2c+JH1NXujwddZUoQ/DlUcHC6o=; b=l0CF5yTzRv8REXaBCGDFnHFvHRsTgLqMcvWz1wEIWxfCCMpfT6rgsDOreKm0Pbajy7 1qC51xwC4AljfsAZX1qxEdbX9hircYJKz4ZQVOJtkWGlRpARg4hhSjCMHIOGbZ41uwM4 1M0PO4E5r2WB/gSJGuCSsyNN5/GWezHdJYGScSYeBWJNISCKg4zpWAqJF41JgeQVAomA 1ENeYPhxk4rykg9/rGfc2vRp8uiiUCtwwYxYZLgbc+dSpXcUxW4/jssQ6HmdMVR1X+nr JkTb6PZAxNBsXmcZuQt0A7wb6ciNmdS7Z3mg6PY5Vn23IrzA1myDhguk8/L/10MM0Ih+ m9fw== X-Gm-Message-State: AOAM530dOMfMlbyzqOwQElbFQRsI88za6OEBpDWIbcsxX29Qi4tRDc9N XEeH0ZgIxg0YslBOyuQBUmyiI3s4cNPxDeiR X-Google-Smtp-Source: ABdhPJwZy9CNQjImtfiAyXrkbgw/sZrPS81tX9BveMq8WGNTOreTU4rcm9RRuP1dBMdaMxZrBlkgww== X-Received: by 2002:a5d:608e:0:b0:203:e8a3:36f3 with SMTP id w14-20020a5d608e000000b00203e8a336f3mr350046wrt.176.1647462809224; Wed, 16 Mar 2022 13:33:29 -0700 (PDT) Received: from hex.int.rpsys.net ([2001:8b0:aba:5f3c:bc44:1420:18a9:e343]) by smtp.gmail.com with ESMTPSA id u11-20020a05600c19cb00b00389efe9c512sm6520630wmq.23.2022.03.16.13.33.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 13:33:28 -0700 (PDT) From: Richard Purdie To: openembedded-core@lists.openembedded.org Subject: [PATCH 2/3] rust-cross: Add rust-crosssdk variant for nativesdk use Date: Wed, 16 Mar 2022 20:33:26 +0000 Message-Id: <20220316203327.950175-2-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220316203327.950175-1-richard.purdie@linuxfoundation.org> References: <20220316203327.950175-1-richard.purdie@linuxfoundation.org> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 16 Mar 2022 20:33:31 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/163357 Allow nativesdk recipes to find a correct version of the rust cross compiler. Signed-off-by: Richard Purdie --- meta/recipes-devtools/rust/rust-cross.inc | 7 ------- meta/recipes-devtools/rust/rust-cross_1.59.0.bb | 6 ++++++ meta/recipes-devtools/rust/rust-crosssdk_1.59.0.bb | 8 ++++++++ 3 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 meta/recipes-devtools/rust/rust-crosssdk_1.59.0.bb diff --git a/meta/recipes-devtools/rust/rust-cross.inc b/meta/recipes-devtools/rust/rust-cross.inc index a77f7d51223..f6babfeedaa 100644 --- a/meta/recipes-devtools/rust/rust-cross.inc +++ b/meta/recipes-devtools/rust/rust-cross.inc @@ -1,6 +1,3 @@ -require rust.inc -inherit cross - python do_rust_gen_targets () { wd = d.getVar('WORKDIR') + '/targets/' # It is important 'TARGET' is last here so that it overrides our less @@ -30,12 +27,8 @@ INHIBIT_DEFAULT_RUST_DEPS = "1" # so it might make sense to take it's mapping. For now, though, we just mention # the bits we need explicitly. DEPENDS += "rust-llvm-native" -DEPENDS += "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}compilerlibs virtual/libc" DEPENDS += "rust-native" -PROVIDES = "virtual/${TARGET_PREFIX}rust" -PN = "rust-cross-${TUNE_PKGARCH}-${TCLIBC}" - # In the cross compilation case, rustc doesn't seem to get the rpath quite # right. It manages to include '../../lib/${TARGET_PREFIX}', but doesn't # include the '../../lib' (ie: relative path from cross_bindir to normal diff --git a/meta/recipes-devtools/rust/rust-cross_1.59.0.bb b/meta/recipes-devtools/rust/rust-cross_1.59.0.bb index 3179d395d25..5358d98da85 100644 --- a/meta/recipes-devtools/rust/rust-cross_1.59.0.bb +++ b/meta/recipes-devtools/rust/rust-cross_1.59.0.bb @@ -1,2 +1,8 @@ +require rust.inc +inherit cross require rust-cross.inc require rust-source.inc + +DEPENDS += "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}compilerlibs virtual/libc" +PROVIDES = "virtual/${TARGET_PREFIX}rust" +PN = "rust-cross-${TUNE_PKGARCH}-${TCLIBC}" diff --git a/meta/recipes-devtools/rust/rust-crosssdk_1.59.0.bb b/meta/recipes-devtools/rust/rust-crosssdk_1.59.0.bb new file mode 100644 index 00000000000..5929978591f --- /dev/null +++ b/meta/recipes-devtools/rust/rust-crosssdk_1.59.0.bb @@ -0,0 +1,8 @@ +require rust.inc +inherit crosssdk +require rust-cross.inc +require rust-source.inc + +DEPENDS += "virtual/${TARGET_PREFIX}gcc-crosssdk virtual/nativesdk-${TARGET_PREFIX}compilerlibs virtual/nativesdk-libc" +PROVIDES = "virtual/nativesdk-${TARGET_PREFIX}rust" +PN = "rust-crosssdk-${TUNE_PKGARCH}-${TCLIBC}" From patchwork Wed Mar 16 20:33:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 5361 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 988D2C433F5 for ; Wed, 16 Mar 2022 20:33:32 +0000 (UTC) Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) by mx.groups.io with SMTP id smtpd.web10.1929.1647462811635336523 for ; Wed, 16 Mar 2022 13:33:32 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=TvQsQEDq; spf=pass (domain: linuxfoundation.org, ip: 209.85.221.51, mailfrom: richard.purdie@linuxfoundation.org) Received: by mail-wr1-f51.google.com with SMTP id d7so4588632wrb.7 for ; Wed, 16 Mar 2022 13:33:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=t3gU02UZEoiOeJeLRAKWxel8Onsxalzt82j0yJi/Gjk=; b=TvQsQEDqvl8yyCZ2QGlw5OE6RsyUO1GaPaytprjiewHQZTsONuQTSqiSgmw2DA6S8/ D4TicolzZJu19gZCUPhXPnHGcaujxAPH/K9oWyt8XwU0yfx89iGbB5Pk5PI2STGOYDep qrTd9t7Vj79r4fz25asleFXkALzObtSuYDe6M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=t3gU02UZEoiOeJeLRAKWxel8Onsxalzt82j0yJi/Gjk=; b=fmh+UFbNXMVc1uwHD/ZQSYyaRVKDAxaWpm9zjfrgTVwPMIZSH5Xj9FzAPL0aTcSCVu KUIuHIhqJS7p3amfVXSyH5uMtuha/u2t3shwyFls1NxRVjb6MEix8PGf8wkc74AjydfU M1FyhljNr8NGyV9iZcfn2vUYxFzL9NrHOSKnq5Ae4BXgQYE/JLFAHxxzzgfKN1Xoh10Y qvLrsUuOa4YgRa+Uy5qb4Hm250Yg4/4oDSMV+1caPQhSaSwUgP+YcJs2rxqzOXnglTQu AUdY4F+90K7MP2ezA8lIJ6ytBD4ki2Z9FzgTUcvDTa9VL2qqnS4vl9t1Ywe5JNxbDwvZ +dOg== X-Gm-Message-State: AOAM533DmIP20UtstrgCNqFMp9JO+WBomaWg273Mc2SXcmZ7BiIKcNzn ++bL4puD63mTxnFWQAjmgsP7/vf6Mg6gCbLd X-Google-Smtp-Source: ABdhPJzLEjcFNRhrxG14UuNqqfscEioN7pGSR0Dq9Td21QkJ/iNI2NvJv+cCJcYNFlQeyw8WQTRF4Q== X-Received: by 2002:a05:6000:1448:b0:1f0:6620:968f with SMTP id v8-20020a056000144800b001f06620968fmr1323231wrx.714.1647462809997; Wed, 16 Mar 2022 13:33:29 -0700 (PDT) Received: from hex.int.rpsys.net ([2001:8b0:aba:5f3c:bc44:1420:18a9:e343]) by smtp.gmail.com with ESMTPSA id u11-20020a05600c19cb00b00389efe9c512sm6520630wmq.23.2022.03.16.13.33.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 13:33:29 -0700 (PDT) From: Richard Purdie To: openembedded-core@lists.openembedded.org Subject: [PATCH 3/3] cargo: Add missing nativesdk support Date: Wed, 16 Mar 2022 20:33:27 +0000 Message-Id: <20220316203327.950175-3-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220316203327.950175-1-richard.purdie@linuxfoundation.org> References: <20220316203327.950175-1-richard.purdie@linuxfoundation.org> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 16 Mar 2022 20:33:32 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/163358 Copy the target definition for nativesdk to allow nativesdk builds to work. Signed-off-by: Richard Purdie --- meta/classes/cargo.bbclass | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/classes/cargo.bbclass b/meta/classes/cargo.bbclass index 0ca38143c0b..4a780a501ff 100644 --- a/meta/classes/cargo.bbclass +++ b/meta/classes/cargo.bbclass @@ -13,6 +13,7 @@ BASEDEPENDS:append = " cargo-native" # Ensure we get the right rust variant DEPENDS:append:class-target = " virtual/${TARGET_PREFIX}rust ${RUSTLIB_DEP}" +DEPENDS:append:class-nativesdk = " virtual/${TARGET_PREFIX}rust ${RUSTLIB_DEP}" DEPENDS:append:class-native = " rust-native" # Enable build separation