* [Buildroot] Overriding Kconfig Values from external br2 @ 2022-01-05 19:03 Jesse Millwood 2022-01-06 9:45 ` Arnout Vandecappelle 0 siblings, 1 reply; 5+ messages in thread From: Jesse Millwood @ 2022-01-05 19:03 UTC (permalink / raw) To: buildroot [-- Attachment #1.1: Type: text/plain, Size: 3846 bytes --] 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. In my br2 external project I have the following setup: My issue is that I can't seem to override the BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS, which masks all other Rust packages. . ├── external.desc │ |name: MINE │ |desc: My BR2 External │ `---- ├── external.mk │ |include $(sort $(wildcard $(BR2_EXTERNAL_MINE_PATH)/package/*/*.mk)) │ |include $(sort $(wildcard $(BR2_EXTERNAL_MINE_PATH)/toolchain/*/*.mk)) │ `---- ├── Config.in │ | source "$BR2_EXTERNAL_MINE_PATH/toolchain/my-external/Config.in.options" │ | source "$BR2_EXTERNAL_MINE_PATH/package/rpkg/Config.in" │ `---- ├── configs │ ├── my_gnu_defconfig │ └── my_musl_defconfig | ├── package │ └── rpkg │ ├── Config.in │ └── rpkg.mk ├── provides │ └── toolchains.in │ | config BR2_TOOLCHAIN_EXTERNAL_MY_MUSL │ | bool "My PowerPC MUSL Toolchain" │ | depends on BR2_powerpc │ | │ | config BR2_TOOLCHAIN_EXTERNAL_MY_GNU │ | bool "My PowerPC GNU Toolchain" │ | depends on BR2_powerpc │ `---- └── toolchain └── my-external └── Config.in.options | if BR2_TOOLCHAIN_EXTERNAL_MY_MUSL | config BR2_TOOLCHAIN_EXTERNAL_PREFIX | default "powerpc-my-linux-musl" | config BR2_TOOLCHAIN_EXTERNAL_PATH | default "${WORKSPACE_DIR}/toolchain/powerpc-my-linux-musl" | | config BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS | bool | default y if BR2_i386 | default y if BR2_x86_64 | default y if BR2_aarch64 | default y if BR2_arm && !BR2_ARM_CPU_ARMV4 && !BR2_ARM_CPU_ARMV5 \ | && !(BR2_ARM_CPU_ARMV7A && BR2_ARM_EABI) | default y if BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le | default y if (BR2_mips || BR2_mipsel) && !BR2_MIPS_CPU_MIPS32R6 | default y if (BR2_mips64 || BR2_mips64el) && !BR2_MIPS_CPU_MIPS64R6 \ | && BR2_MIPS_NABI64 | depends on (BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL) | depends on BR2_PACKAGE_HOST_RUSTC_ARCH_SUPPORTS | | endif | | if BR2_TOOLCHAIN_EXTERNAL_MY_GNU | config BR2_TOOLCHAIN_EXTERNAL_PREFIX | default "powerpc-my-linux-gnu" | config BR2_TOOLCHAIN_EXTERNAL_PATH | default "${WORKSPACE_DIR}/toolchain/powerpc-my-linux-gnu" | endif `---- 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)? Thanks, Jesse [-- Attachment #1.2: Type: text/html, Size: 12130 bytes --] [-- Attachment #2: Type: text/plain, Size: 150 bytes --] _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Buildroot] Overriding Kconfig Values from external br2 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 0 siblings, 1 reply; 5+ messages in thread From: Arnout Vandecappelle @ 2022-01-06 9:45 UTC (permalink / raw) To: Jesse Millwood, buildroot 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. 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Buildroot] Overriding Kconfig Values from external br2 2022-01-06 9:45 ` Arnout Vandecappelle @ 2022-01-06 15:37 ` Jesse Millwood 2022-01-06 17:09 ` Arnout Vandecappelle 0 siblings, 1 reply; 5+ messages in thread From: Jesse Millwood @ 2022-01-06 15:37 UTC (permalink / raw) To: Arnout Vandecappelle, buildroot 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 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? 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Buildroot] Overriding Kconfig Values from external br2 2022-01-06 15:37 ` Jesse Millwood @ 2022-01-06 17:09 ` Arnout Vandecappelle 2022-01-08 0:07 ` Jesse Millwood 0 siblings, 1 reply; 5+ messages in thread From: Arnout Vandecappelle @ 2022-01-06 17:09 UTC (permalink / raw) To: Jesse Millwood, buildroot 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... > 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, > 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Buildroot] Overriding Kconfig Values from external br2 2022-01-06 17:09 ` Arnout Vandecappelle @ 2022-01-08 0:07 ` Jesse Millwood 0 siblings, 0 replies; 5+ messages in thread From: Jesse Millwood @ 2022-01-08 0:07 UTC (permalink / raw) To: Arnout Vandecappelle, buildroot 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-01-08 0:07 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 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 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.