kumquat-buildroot/toolchain/toolchain-external/Config.in

153 lines
4.9 KiB
Plaintext
Raw Normal View History

if BR2_TOOLCHAIN_EXTERNAL
comment "Toolchain External Options"
choice
prompt "Toolchain"
# Kept toolchains sorted by architecture in order to use some toolchain
# as default choice
# Aarch64 (use ARM toolchain by default)
source "toolchain/toolchain-external/toolchain-external-arm-aarch64/Config.in"
source "toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in"
# Aarch64 big-endian
source "toolchain/toolchain-external/toolchain-external-arm-aarch64-be/Config.in"
source "toolchain/toolchain-external/toolchain-external-linaro-aarch64-be/Config.in"
# ARC
source "toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in"
# ARM (use ARM toolchain by default)
source "toolchain/toolchain-external/toolchain-external-arm-arm/Config.in"
source "toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in"
# ARM big-endian
source "toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in"
# MIPS
source "toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in"
# NIOSII
source "toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in"
# Bootlin toolchains, available for virtually all architectures
source "toolchain/toolchain-external/toolchain-external-bootlin/Config.in"
# Kept last, so it remains the non-default choice, unless there isn't
# any available toolchain profile for the currently selected
# architecture, but before toolchains from br2-external trees.
source "toolchain/toolchain-external/toolchain-external-custom/Config.in"
# Toolchains from br2-external trees, if any
source "$BR2_BASE_DIR/.br2-external.in.toolchains"
endchoice
choice
prompt "Toolchain origin"
# Keep compatibility with old defconfig files that are using
# custom toolchains, and which are therefore assuming that
# "preinstalled" in the default choice.
default BR2_TOOLCHAIN_EXTERNAL_PREINSTALLED if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
config BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD
bool "Toolchain to be downloaded and installed"
help
Select this option if you want Buildroot to download and
install the toolchain. If you have selected a custom
toolchain, specify the URL in BR2_TOOLCHAIN_EXTERNAL_URL.
config BR2_TOOLCHAIN_EXTERNAL_PREINSTALLED
bool "Pre-installed toolchain"
help
Select this option if you want to use a pre-installed
toolchain. Specify the path to this toolchain in
BR2_TOOLCHAIN_EXTERNAL_PATH.
endchoice
config BR2_TOOLCHAIN_EXTERNAL_PATH
string "Toolchain path"
default ""
depends on BR2_TOOLCHAIN_EXTERNAL_PREINSTALLED
help
Path to where the external toolchain is installed. The
compiler itself is expected to be in the "bin" subdirectory
of this path.
If empty, the compiler will be searched in $PATH.
config BR2_TOOLCHAIN_EXTERNAL_GLIBC
bool
select BR2_TOOLCHAIN_USES_GLIBC
config BR2_TOOLCHAIN_EXTERNAL_UCLIBC
bool
select BR2_TOOLCHAIN_USES_UCLIBC
config BR2_TOOLCHAIN_EXTERNAL_MUSL
bool
select BR2_TOOLCHAIN_USES_MUSL
# Compatibility headers: cdefs.h, queue.h
select BR2_PACKAGE_MUSL_COMPAT_HEADERS
toolchain-external: introduce toolchain-external-package The toolchain-external-package infrastructure is just a copy of the toolchain-external commands, replacing TOOLCHAIN_EXTERNAL by $(2) and adding double-dollars everywhere. toolchain-external itself is converted to a virtual package, but it is faked a little to make sue the toolchains that haven't been converted to toolchain-external-package yet keep on working. The TOOLCHAIN_EXTERNAL_MOVE commands don't have to be redefined for every toolchain-external-package instance, so that is moved out into the common part of pkg-toolchain-external.mk. The musl-compat-headers dependency stays in the toolchain-external package itself. The musl ld link is duplicated in the legacy toolchain-external and the toolchain-external-package, because they have separate hooks. The handling of TOOLCHAIN_EXTERNAL_BIN deserves some special attention, because its value will be different for different toolchain-external-package instances. However, the value only depends on variables that are set by Kconfig (BR2_TOOLCHAIN_EXTERNAL_PREFIX and BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD) so it can easily be used in the generic part. So we don't have to do anything specific for this variable after all. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Romain Naour <romain.naour@gmail.com> Reviewed-by: Romain Naour <romain.naour@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-11-07 02:19:59 +01:00
# Make sure the virtual-package infra checks the provider
config BR2_PACKAGE_HAS_TOOLCHAIN_EXTERNAL
bool
default y
config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
string
config BR2_TOOLCHAIN_EXTERNAL_PREFIX
string
# Kept toolchains sorted as in the choice above
# The toolchain Config.in.options must define
# BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL and BR2_TOOLCHAIN_EXTERNAL_PREFIX
# Aarch64
source "toolchain/toolchain-external/toolchain-external-arm-aarch64/Config.in.options"
source "toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in.options"
# Aarch64 big-endian
source "toolchain/toolchain-external/toolchain-external-arm-aarch64-be/Config.in.options"
source "toolchain/toolchain-external/toolchain-external-linaro-aarch64-be/Config.in.options"
# ARC
source "toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in.options"
# ARM
source "toolchain/toolchain-external/toolchain-external-arm-arm/Config.in.options"
source "toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in.options"
# ARM big-endian
source "toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in.options"
# MIPS
source "toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in.options"
# NIOSII
source "toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in.options"
# Bootlin toolchains
source "toolchain/toolchain-external/toolchain-external-bootlin/Config.in.options"
# Custom toolchains
source "toolchain/toolchain-external/toolchain-external-custom/Config.in.options"
toolchain/toolchain-external: add BR2_TOOLCHAIN_EXTERNAL_HAS_NO_GDBSERVER option Some external toolchains do not have gdbserver available, but the option BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY is always visible. And when enabled, this option aborts with an error when gdbserver cannot be found: Could not find gdbserver in external toolchain Due to that, some random configurations fail to build when BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY=y, for example with the Bootlin toolchains for Microblaze or OpenRISC (because there's no GDB support for those architectures). One solution could be to make "Could not find gdbserver in external toolchain" a warning instead of a hard error, but then nobody would notice about this issue, in cases where it should legitimately abort with a hard error. So, the clean solution would be to add a BR2_TOOLCHAIN_EXTERNAL_HAS_GDBSERVER. But that means all existing external toolchains would have to be modified to select this option. Instead, and as an exception, we chose to use inverted logic, and create an option that is the opposite: BR2_TOOLCHAIN_EXTERNAL_HAS_NO_GDBSERVER. By default, we assume external toolchains have gdbserver. If BR2_TOOLCHAIN_EXTERNAL_HAS_NO_GDBSERVER is enabled, we disallow the BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY option. Note that the case of custom external toolchain does not matter: by definition they are not tested by the autobuilders, and by definition, we cannot know in menuconfig if the custom toolchain has or does not have gdbserver. We could make a user-visible option for it, but that adds no value over simply erroring out because the gdbserver binary can't be found. Similarly, we could add default y if BR2_PACKAGE_GDB_ARCH_SUPPORTS but that would make it impossible for someone to include a custom gdbserver in their external toolchain, and gives no benefit at all. This will help fixing: http://autobuild.buildroot.net/results/6315ef7b66ee4ae8f870c92186bc674d65f62f2c/ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-06-08 09:10:19 +02:00
config BR2_TOOLCHAIN_EXTERNAL_HAS_NO_GDBSERVER
bool
gdb: convert to the package infrastructure This commit converts gdb to the package infrastructure, and therefore moves it from toolchain/gdb to package/gdb. The target package is now visible in "Package selection for the target" => "Debugging, profiling and benchmark". The main option, "gdb", forcefully selects the "gdbserver" sub-option by default. Another sub-option, "full debugger" allows to install the complete gdb on the target. When this option is enabled, then "gdbserver" is no longer forcefully selected. This ensures that at least gdbserver or the full debugger gets built/installed, so that the package is not a no-op. The host debugger is still enabled through a configuration option in "Toolchain". It is now visible regardless of the toolchain type (it used to be hidden for External Toolchains). The configuration options relative to the host debugger are now in package/gdb/Config.in.host, similar to how we have package/binutils/Config.in.host. Since gdb is now a proper package, it is no longer allowed to 'select BR2_PTHREADS_DEBUG' to ensure thread debugging is available when needed. Instead, it now 'depends on BR2_TOOLCHAIN_HAS_THREADS_DEBUG'. This option, in turn, is selected by the different toolchain backends when appropriate. The 'BR2_TOOLCHAIN_HAS_THREADS_DEBUG_IF_NEEDED' option is removed, since we no longer need to know when it is allowed to 'select BR2_PTHREADS_DEBUG'. Also, the 'BR2_PTHREADS_DEBUG' option is moved to appear right below the thread implementation selection (in the case of the Buildroot toolchain backend). Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-04-07 02:04:33 +02:00
config BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY
bool "Copy gdb server to the Target"
depends on BR2_TOOLCHAIN_EXTERNAL
toolchain/toolchain-external: add BR2_TOOLCHAIN_EXTERNAL_HAS_NO_GDBSERVER option Some external toolchains do not have gdbserver available, but the option BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY is always visible. And when enabled, this option aborts with an error when gdbserver cannot be found: Could not find gdbserver in external toolchain Due to that, some random configurations fail to build when BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY=y, for example with the Bootlin toolchains for Microblaze or OpenRISC (because there's no GDB support for those architectures). One solution could be to make "Could not find gdbserver in external toolchain" a warning instead of a hard error, but then nobody would notice about this issue, in cases where it should legitimately abort with a hard error. So, the clean solution would be to add a BR2_TOOLCHAIN_EXTERNAL_HAS_GDBSERVER. But that means all existing external toolchains would have to be modified to select this option. Instead, and as an exception, we chose to use inverted logic, and create an option that is the opposite: BR2_TOOLCHAIN_EXTERNAL_HAS_NO_GDBSERVER. By default, we assume external toolchains have gdbserver. If BR2_TOOLCHAIN_EXTERNAL_HAS_NO_GDBSERVER is enabled, we disallow the BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY option. Note that the case of custom external toolchain does not matter: by definition they are not tested by the autobuilders, and by definition, we cannot know in menuconfig if the custom toolchain has or does not have gdbserver. We could make a user-visible option for it, but that adds no value over simply erroring out because the gdbserver binary can't be found. Similarly, we could add default y if BR2_PACKAGE_GDB_ARCH_SUPPORTS but that would make it impossible for someone to include a custom gdbserver in their external toolchain, and gives no benefit at all. This will help fixing: http://autobuild.buildroot.net/results/6315ef7b66ee4ae8f870c92186bc674d65f62f2c/ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-06-08 09:10:19 +02:00
depends on !BR2_TOOLCHAIN_EXTERNAL_HAS_NO_GDBSERVER
gdb: convert to the package infrastructure This commit converts gdb to the package infrastructure, and therefore moves it from toolchain/gdb to package/gdb. The target package is now visible in "Package selection for the target" => "Debugging, profiling and benchmark". The main option, "gdb", forcefully selects the "gdbserver" sub-option by default. Another sub-option, "full debugger" allows to install the complete gdb on the target. When this option is enabled, then "gdbserver" is no longer forcefully selected. This ensures that at least gdbserver or the full debugger gets built/installed, so that the package is not a no-op. The host debugger is still enabled through a configuration option in "Toolchain". It is now visible regardless of the toolchain type (it used to be hidden for External Toolchains). The configuration options relative to the host debugger are now in package/gdb/Config.in.host, similar to how we have package/binutils/Config.in.host. Since gdb is now a proper package, it is no longer allowed to 'select BR2_PTHREADS_DEBUG' to ensure thread debugging is available when needed. Instead, it now 'depends on BR2_TOOLCHAIN_HAS_THREADS_DEBUG'. This option, in turn, is selected by the different toolchain backends when appropriate. The 'BR2_TOOLCHAIN_HAS_THREADS_DEBUG_IF_NEEDED' option is removed, since we no longer need to know when it is allowed to 'select BR2_PTHREADS_DEBUG'. Also, the 'BR2_PTHREADS_DEBUG' option is moved to appear right below the thread implementation selection (in the case of the Buildroot toolchain backend). Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-04-07 02:04:33 +02:00
help
Copy the gdbserver provided by the external toolchain to the
target.
endif # BR2_TOOLCHAIN_EXTERNAL