toolchain-external: add fortran support option for custom external toolchains
PATCH v2 1/1 toolchain-external: add fortran support option for custom external toolchains
If a custom external toolchain is used, we can't enable the fortran support. Add a new option for that.
---
v2: add libquadmath dependency when necessary (Samuel)
--- .../toolchain-external-custom/Config.in.options | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
toolchain/toolchain-external/toolchain-external-custom/Config.in.options +15 -0
@@ -405,6 +405,21 @@ config BR2_TOOLCHAIN_EXTERNAL_CXX support. If you don't know, leave the default value, Buildroot will tell you if it's correct or not. +config BR2_TOOLCHAIN_EXTERNAL_FORTRAN + bool "Toolchain has Fortran support?" + # on architecture building libquadmath, wchar is required + depends on !BR2_TOOLCHAIN_HAS_LIBQUADMATH || \ + (BR2_TOOLCHAIN_HAS_LIBQUADMATH && BR2_USE_WCHAR) + select BR2_TOOLCHAIN_HAS_FORTRAN + help + Select this option if your external toolchain has Fortran + support. If you don't know, leave the default value, + Buildroot will tell you if it's correct or not. + +comment "Fortran support needs a toolchain w/ wchar" + depends on BR2_TOOLCHAIN_HAS_LIBQUADMATH + depends on !BR2_USE_WCHAR # libquadmath + config BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS string "Extra toolchain libraries to be copied to target" help
Signature · 1 line
2.17.2
PATCH v2 1/1 toolchain-external: add fortran support option for custom external toolchains
Hello,
toolchain/toolchain-external/toolchain-external-custom/Config.in.options config BR2_TOOLCHAIN_EXTERNAL_CXX · line 412
Quoted 5 lines · Romain Naour
toolchain/toolchain-external/toolchain-external-custom/Config.in.options +5
-0+config BR2_TOOLCHAIN_EXTERNAL_FORTRAN + bool "Toolchain has Fortran support?" + # on architecture building libquadmath, wchar is required + depends on !BR2_TOOLCHAIN_HAS_LIBQUADMATH || \ + (BR2_TOOLCHAIN_HAS_LIBQUADMATH && BR2_USE_WCHAR)
This dependency really is not necessary. Indeed, the question is "does your toolchain supports Fortran?". If the user lies and the toolchain doesn't have a fortran compiler, the check_fortran function will detect that and bail out. So there's no need for a more complex dependency.
So I've applied your v1. Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com