Skip to contentSkip to conversation

toolchain-external-custom: Describe BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX

PATCH Applied Bagas Sanjaya 4 participants 4 messages May 24, 2023 – May 29, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 toolchain-external-custom: Describe BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX

"Toolchain prefix" option apparently doesn't have any help describing it, which causes confusion when using external toolchain. Leaving this option at default prefix name ("$(ARCH)-linux") when external toolchain components are called with different prefix (e.g. "$(ARCH)-unknown-linux-gnu") may cause build failure unless the prefix symlink is already in place (e.g. when using Buildroot-generated toolchain as external toolchain).

Describe the option to clarify.

---
 .../toolchain-external-custom/Config.in.options       | 11 +++++++++++
 1 file changed, 11 insertions(+)
toolchain/toolchain-external/toolchain-external-custom/Config.in.options +11 -0
index 0fd8841e5b..ed62bad990 100644
@@ -24,6 +24,17 @@ config BR2_TOOLCHAIN_EXTERNAL_REL_BIN_PATH
 config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX
 	string "Toolchain prefix"
 	default "$(ARCH)-linux"
+	help
+	  Component name prefix used by your external toolchain.
+	  Typically, this is target tuple (e.g. "$(ARCH)-unknown-linux-gnu").
+	  If unsure, look at "bin" directory of your toolchain and
+	  note the part of component name before the last dash (i.e. if
+	  you call the toolchain's gcc as "$(ARCH)-unknown-linux-gnu-gcc",
+	  the prefix is "$(ARCH)-unknown-linux-gnu").
+
+	  Note that Buildroot toolchains have "$(ARCH)-linux" symlink alias
+	  to the full tuple-named components, so you can leave this option at
+	  default value if you use them as external toolchain.
 
 choice
 	bool "External toolchain gcc version"

base-commit: 603df32a0cd416caa2d2688008cb87f14ad68ef3

Signature · 6 lines
An old man doll... just what I always wanted! - Clara

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Reviewed-by Thomas Petazzoni on v1 1/1
#1 lore raw
Quoted 11 lines · On Wed, 24 May 2023 10:16:01 +0700 Bagas Sanjaya <[email protected]> wrote:

"Toolchain prefix" option apparently doesn't have any help describing it, which causes confusion when using external toolchain. Leaving this option at default prefix name ("$(ARCH)-linux") when external toolchain components are called with different prefix (e.g. "$(ARCH)-unknown-linux-gnu") may cause build failure unless the prefix symlink is already in place (e.g. when using Buildroot-generated toolchain as external toolchain).

Describe the option to clarify.

Thanks a lot!

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw
In reply to Bagas Sanjaya

Bags, All,

On 2023-05-24 10:16 +0700, Bagas Sanjaya spake thusly:

Quoted 24 lines

"Toolchain prefix" option apparently doesn't have any help describing it, which causes confusion when using external toolchain. Leaving this option at default prefix name ("$(ARCH)-linux") when external toolchain components are called with different prefix (e.g. "$(ARCH)-unknown-linux-gnu") may cause build failure unless the prefix symlink is already in place (e.g. when using Buildroot-generated toolchain as external toolchain).

Describe the option to clarify.

---
 .../toolchain-external-custom/Config.in.options       | 11 +++++++++++
 1 file changed, 11 insertions(+)
toolchain/toolchain-external/toolchain-external-custom/Config.in.options +1 -0
index 0fd8841e5b..ed62bad990 100644
@@ -24,6 +24,17 @@ config BR2_TOOLCHAIN_EXTERNAL_REL_BIN_PATH
 config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX
 	string "Toolchain prefix"
 	default "$(ARCH)-linux"
+	help

toolchain/toolchain-external/toolchain-external-custom/Config.in.options config BR2_TOOLCHAIN_EXTERNAL_REL_BIN_PATH · line 37

Quoted 10 lines
toolchain/toolchain-external/toolchain-external-custom/Config.in.options +10 -0
+	  Component name prefix used by your external toolchain.
+	  Typically, this is target tuple (e.g. "$(ARCH)-unknown-linux-gnu").
+	  If unsure, look at "bin" directory of your toolchain and
+	  note the part of component name before the last dash (i.e. if
+	  you call the toolchain's gcc as "$(ARCH)-unknown-linux-gnu-gcc",
+	  the prefix is "$(ARCH)-unknown-linux-gnu").
+
+	  Note that Buildroot toolchains have "$(ARCH)-linux" symlink alias
+	  to the full tuple-named components, so you can leave this option at
+	  default value if you use them as external toolchain.
    $ ./utils/docker-run make check-package
    toolchain/toolchain-external/toolchain-external-custom/Config.in.options:29: help text: <tab><2 spaces><62 chars> (http://nightly.buildroot.org/#writing-rules-config-in)
    toolchain/toolchain-external/toolchain-external-custom/Config.in.options:32: help text: <tab><2 spaces><62 chars> (http://nightly.buildroot.org/#writing-rules-config-in)
    toolchain/toolchain-external/toolchain-external-custom/Config.in.options:35: help text: <tab><2 spaces><62 chars> (http://nightly.buildroot.org/#writing-rules-config-in)
    toolchain/toolchain-external/toolchain-external-custom/Config.in.options:36: help text: <tab><2 spaces><62 chars> (http://nightly.buildroot.org/#writing-rules-config-in)

Applied to master with the above fixed (which required that I rephrase it slightly to keep lines of a consistent length). Thanks.

Regards,
Yann E. MORIN.

Quoted 11 lines
toolchain/toolchain-external/toolchain-external-custom/Config.in.options +0 -0
 choice
 	bool "External toolchain gcc version"
 

base-commit: 603df32a0cd416caa2d2688008cb87f14ad68ef3

Signature · 6 lines
An old man doll... just what I always wanted! - Clara

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#3 lore raw
In reply to Bagas Sanjaya
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Bagas" == Bagas Sanjaya <[email protected]> writes:

"Toolchain prefix" option apparently doesn't have any help describing it, which causes confusion when using external toolchain. Leaving this option at default prefix name ("$(ARCH)-linux") when external toolchain components are called with different prefix (e.g. "$(ARCH)-unknown-linux-gnu") may cause build failure unless the prefix symlink is already in place (e.g. when using Buildroot-generated toolchain as external toolchain).

Quoted 3 lines

Describe the option to clarify.

Committed to 2023.02.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot