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 D2DEFC433F5 for ; Tue, 8 Feb 2022 13:22:04 +0000 (UTC) Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by mx.groups.io with SMTP id smtpd.web11.10893.1644326523925734776 for ; Tue, 08 Feb 2022 05:22:04 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=ebFz8e9S; spf=pass (domain: linuxfoundation.org, ip: 209.85.128.49, mailfrom: richard.purdie@linuxfoundation.org) Received: by mail-wm1-f49.google.com with SMTP id l35-20020a05600c1d2300b0034d477271c1so1617296wms.3 for ; Tue, 08 Feb 2022 05:22:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=ZxRV4TjlPqJ3FPEQysufzpdMOeamewFNqocDGJlwFN8=; b=ebFz8e9SEaDe5V+OUOrPDCcQuTtEHe4Yvol74Jodi3u5CHeA8VMS1crRhcj1SxA9CK zzd7dwjIw1oBOwu8lHPvGb3hKhF58wD5kPDUXqUB0lql2Z40oNyh8XBH/KsMfdkB1//B 5bX2+id65xPJ63Q0WBq3r4UkgEQ04Y620B/pY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=ZxRV4TjlPqJ3FPEQysufzpdMOeamewFNqocDGJlwFN8=; b=hgptjwCE1XBcKzk2ywVl3pOhFKVy40CQKSQIfKVEawKOscMBbjkbdHNiNacx4HSvmC ihN689gw+C5zhA5f03j9lZcgm6HmiWZZcYML47MXrv5nAvvKbwOvzlnIhchs8h21GQbH Jjxk0927TjjAfuMDGrBwZQu6p7u+hWMDBtUtEp81gSyWKQbz6vjpfTg7B98/Nfh4rCIj qzlKT428DS5b+zJMne6b2bpFjjk2C8id3j1+kUjcnMIZ95mEUdLoF17F7jWUdwCCNxyM C0QqhbAylqYZyiCeNGf1NLQw3yd21+5b61uCJqpm+IppRQJVSF3GInepU5pqSYkeG8vl 4Q5A== X-Gm-Message-State: AOAM530Ywm7n9LvfpLrYQm90cH4x8bceGaiUUZ+YyLFXoudejVQRT1AX R0TGnwQmwLlacxTxlG9KRL9tEw== X-Google-Smtp-Source: ABdhPJxXYUpH5C2pXLac/YeUhl7yx3BZSoUaQKrhH50DzH9ZcwC3XLn/sJdLN9eoRzsj/TwVcaP2Ig== X-Received: by 2002:a1c:cc07:: with SMTP id h7mr1168127wmb.50.1644326522320; Tue, 08 Feb 2022 05:22:02 -0800 (PST) Received: from ?IPv6:2001:8b0:aba:5f3c:cc51:2893:39:c757? ([2001:8b0:aba:5f3c:cc51:2893:39:c757]) by smtp.gmail.com with ESMTPSA id 3sm5980616wrz.86.2022.02.08.05.22.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Feb 2022 05:22:01 -0800 (PST) Message-ID: Subject: Re: [RFC] support for multi project toolchain-cmake From: Richard Purdie To: yoctoproject@neumann-web.eu, "openembedded-core@lists.openembedded.org" Date: Tue, 08 Feb 2022 13:21:58 +0000 In-Reply-To: <1170434594.46461.1644247802042@office.mailbox.org> References: <1540523266.294149.1643372553712@office.mailbox.org> <0c0df739719f528922ef60b1f6e553e3a1d114cf.camel@linuxfoundation.org> <1170434594.46461.1644247802042@office.mailbox.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.40.4-1ubuntu2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 ; Tue, 08 Feb 2022 13:22:04 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/161507 On Mon, 2022-02-07 at 16:30 +0100, yoctoproject@neumann-web.eu wrote: > > thank you for your reply and please excuse that I didn't clarify my intent > correctly in my first mail. Your assumption, that I meant the cmake of the SDK > is correct. And your assumption regarding that the install path is different > to the sysroot of the SDK toolchain is also correct. > > If your statement, that multiple sysroots for building with the SDK aren't > supported, is final, this discussion can be stopped here and we have to > maintain extensions for that workflow in our setup. But I would like to > explain our use case and why we require 2 sysroots for an SDK build. We definitely don't support that usage scenario since it would be highly build system specific and would work in some cases but not others. I do have a suggestion of a different approach though. > We have a set of hardware platforms which are operated by a distribution > generated by openembedded. This is maintained by a few developers. The > hardware > is used in several different projects. For the project specific development > we're using the SDK with will be installed readonly below /opt. The software > for these different projects can be developed without knowledge that > openembedded was used underneath. For that we have tools that abstract the > correct SDK selection, the environment sourcing and packaging of the final > compilation. And then tools which handle the deployment on the hardware. > > Because a SDK is specific for a hardware platform, but not for a project using > that hardware platform, it is readonly and can be used for all projects with > this hardware. This however requires that the compiled libraries generated > with > this SDK during the user side build process will be installed at a different > location, which would be the second sysroot. > > Until now we only build a cmake project with external dependencies to the > installed SDK using this workflow. Further external libraries, not contained > in > the SDK, had to be integrated in this cmake build, either as subdirectory or > via external builds (using e.g. cmake-superbuilds). We now want to extend this > workflow by supporting multiple cmake projects with dependencies to each > other, > thus the need for this second sysroot in the build. Have you considered creating a sysroot per project with a copy of the sysroot files? This sounds like a crazy idea at first but with hardlinks for the files it is fast and efficient to create these sysroot file trees. This is exactly what OpenEmbedded does internally and how we handle this in our builds. Cheers, Richard