All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jesse Millwood <jesse_dev@fastmail.com>
To: Arnout Vandecappelle <arnout@mind.be>, buildroot@buildroot.org
Subject: Re: [Buildroot] Overriding Kconfig Values from external br2
Date: Fri, 07 Jan 2022 19:07:11 -0500	[thread overview]
Message-ID: <99fefbe8119003202a02e7696a98711c71bd30c7.camel@fastmail.com> (raw)
In-Reply-To: <4d73992c-3189-1989-525c-4506495c90ac@mind.be>

On Thu, 2022-01-06 at 18:09 +0100, Arnout Vandecappelle wrote:
> 
> 
> On 06/01/2022 16:37, Jesse Millwood wrote:
> > On Thu, 2022-01-06 at 10:45 +0100, Arnout Vandecappelle wrote:
> > > 
> > > 
> > > On 05/01/2022 20:03, Jesse Millwood wrote:
> > > > Hello,
> > > > 
> > > > I have an external C/C++ toolchain that I've put together that
> > > > uses
> > > > MUSL. I've
> > > > also built an external Rust toolchain that uses my MUSL
> > > > toolchain.
> > > > 
> > > > My issue is that there is a Rust Kconfig variable that
> > > > specifies if
> > > > a specific
> > > > architecture supports Rust.
> > > > 
> > > > The Kconfig variable in question is
> > > > BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS
> > > > in package/rustc/Config.in.host.
> > > 
> > > [snip]
> > > 
> > > > You may notice that I changed the libc depends line to be or'd
> > > > with
> > > > BR2_TOOLCHAIN_USES_MUSL. It seems that this does not get
> > > > considered
> > > > when I
> > > > choose my external musl toolchain option. In the menuconfig
> > > > when I
> > > > search for
> > > > the BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS variable with
> > > > the
> > > > "/" key it
> > > > looks like it is only getting it from the original file. Does
> > > > buildroot have a
> > > > mechanism for overwriting this kind of setting and if not, does
> > > > anyone have an
> > > > idea of how I would accomplish what I am trying to do (make
> > > > buildroot honor my
> > > > external rust toolchain)?
> > > 
> > >    No, there's no way to override the dependencies of an existing
> > > Config.in
> > > symbol in an external.
> > > 
> > >    However, this was corrected in upstream Buildroot in commit
> > > d69d40c029dc7d8199b745eaee759d92b66c5d17. So you can try to
> > > backport
> > > that commit
> > > instead, or just update Buildroot to something more recent.
> > 
> > Arnout, thanks for the pointer to the commit. That is a logical way
> > to
> > support other platforms. However, I have a powerpc musl rust
> > toolchain
> > that I've built externally.
> > 
> > With the changes in that commit can I set
> > BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS to "y" in my external
> > now
> 
>   Ah, no, you're right, powerpc-unknown-linux-musl is a Tier 3
> platform and that 
> patch only adds Tier 1 and 2. We could add a Tier 3 option as well
> (and disable 
> the rust-bin option in that case).
> 
>   Note however that the stdlib status for this target is marked as
> "?" on [1], 
> so I'm not sure it's ever going to work...
> 
I have it working actually. I had to patch my crosstool-ng toolchain to
add an extra default macro so that libunwind builds. 

> 
> > that there is no depends expressions and it is all default logic?
> > Or
> > would I have to still add another expression that maybe defaults to
> > "y"
> > if a new variable is true like
> > "BR2_EXTERNAL_RUSTC_TARGET_ARCH_SUPPORTS" that is defined in my
> > external?
> 
>   No, that's not going to work.
> 
>   I think you can make a hack: add "select 
> BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS" to your 
> BR2_TOOLCHAIN_EXTERNAL_MY_MUSL definition. I think that works.
> 
>   Regards,
>   Arnout
> 

Thanks! I had to update some names of some things but I updated my
buildroot repo and was able to use the select method to enable
BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS. 

> 
> > 
> > Thanks,
> > Jesse
> > 
> > > 
> > >    Regards,
> > >    Arnout
> > > 
> > > 
> > > > 
> > > > Thanks,
> > > > Jesse
> > > > 
> > > > _______________________________________________
> > > > buildroot mailing list
> > > > buildroot@buildroot.org
> > > > https://lists.buildroot.org/mailman/listinfo/buildroot
> > > > 
> > > _______________________________________________
> > > buildroot mailing list
> > > buildroot@buildroot.org
> > > https://lists.buildroot.org/mailman/listinfo/buildroot
> > 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

      reply	other threads:[~2022-01-08  0:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-05 19:03 [Buildroot] Overriding Kconfig Values from external br2 Jesse Millwood
2022-01-06  9:45 ` Arnout Vandecappelle
2022-01-06 15:37   ` Jesse Millwood
2022-01-06 17:09     ` Arnout Vandecappelle
2022-01-08  0:07       ` Jesse Millwood [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=99fefbe8119003202a02e7696a98711c71bd30c7.camel@fastmail.com \
    --to=jesse_dev@fastmail.com \
    --cc=arnout@mind.be \
    --cc=buildroot@buildroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.