All of lore.kernel.org
 help / color / mirror / Atom feed
* [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

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.