All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jesse Millwood" <jesse_dev@fastmail.com>
To: buildroot@buildroot.org
Subject: [Buildroot] Overriding Kconfig Values from external br2
Date: Wed, 05 Jan 2022 14:03:09 -0500	[thread overview]
Message-ID: <37282adb-8559-4124-874d-c1729bd3ce01@www.fastmail.com> (raw)


[-- 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

             reply	other threads:[~2022-01-05 19:03 UTC|newest]

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

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=37282adb-8559-4124-874d-c1729bd3ce01@www.fastmail.com \
    --to=jesse_dev@fastmail.com \
    --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.