Skip to contentSkip to conversation

toolchain-external: add fortran support option for custom external toolchains

PATCH New Romain Naour 3 participants 4 messages Jul 14, 2018 – Oct 20, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 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.

Cc Thomas Petazzoni <[email protected]>
Cc Samuel Martin <[email protected]>
---
 .../toolchain-external-custom/Config.in.options                   | 8 ++++++++
 1 file changed, 8 insertions(+)
toolchain/toolchain-external/toolchain-external-custom/Config.in.options +8 -0
index 6a9921c149..5ec3f961a1 100644
@@ -401,6 +401,14 @@ 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?"
+	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.
+
 config BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS
 	string "Extra toolchain libraries to be copied to target"
 	help
Signature · 1 line
2.14.4
#1 lore raw

PATCH 1/1 toolchain-external: add fortran support option for custom external toolchains

Hi Romain,

Sorry for the late response. :s

Quoted 2 lines · Romain Naour

If a custom external toolchain is used, we can't enable the fortran support. Add a new option for that.

Indeed, it is a long-time limitation of using buildroot toolchain as external ones, all options are not necessarily available in the external toolchain backend. :-/

Quoted 14 lines
Cc Thomas Petazzoni <[email protected]>
Cc Samuel Martin <[email protected]>
---
 .../toolchain-external-custom/Config.in.options                   | 8 ++++++++
 1 file changed, 8 insertions(+)
toolchain/toolchain-external/toolchain-external-custom/Config.in.options +0 -0
index 6a9921c149..5ec3f961a1 100644
@@ -401,6 +401,14 @@ config BR2_TOOLCHAIN_EXTERNAL_CXX
          support. If you don't know, leave the default value,

toolchain/toolchain-external/toolchain-external-custom/Config.in.options config BR2_TOOLCHAIN_EXTERNAL_CXX · line 411

Quoted 10 lines
toolchain/toolchain-external/toolchain-external-custom/Config.in.options +8 -0
          Buildroot will tell you if it's correct or not.
 
+config BR2_TOOLCHAIN_EXTERNAL_FORTRAN
+       bool "Toolchain has Fortran support?"
+       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.
+

In the gcc package, there is some extra checks for fortran with libquadmath when available (which depends on the target architecture). So, I wonder whether it should be sensitive to libquadmath (so wchar) on the relevant architectures.

Quoted 6 lines
toolchain/toolchain-external/toolchain-external-custom/Config.in.options +0 -1
 config BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS
        string "Extra toolchain libraries to be copied to target"
        help
--

2.14.4

Regards,

Signature · 1 line
Samuel
#2 lore raw

PATCH 1/1 toolchain-external: add fortran support option for custom external toolchains

Hi Samuel,

Le 26/07/2018 ? 20:46, Samuel Martin a ?crit?:

Quoted 3 lines

Hi Romain,

Sorry for the late response. :s

Ctrl-c Ctrl-v :s

Quoted 25 lines · Romain Naour
Quoted 2 lines

If a custom external toolchain is used, we can't enable the fortran support. Add a new option for that.

Indeed, it is a long-time limitation of using buildroot toolchain as external ones, all options are not necessarily available in the external toolchain backend. :-/

Quoted 16 lines
Cc Thomas Petazzoni <[email protected]>
Cc Samuel Martin <[email protected]>
---
 .../toolchain-external-custom/Config.in.options                   | 8 ++++++++
 1 file changed, 8 insertions(+)
toolchain/toolchain-external/toolchain-external-custom/Config.in.options +0 -0
index 6a9921c149..5ec3f961a1 100644
@@ -401,6 +401,14 @@ 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.
 
Quoted 13 lines

toolchain/toolchain-external/toolchain-external-custom/Config.in.options config BR2_TOOLCHAIN_EXTERNAL_CXX · line 411

Quoted 8 lines
toolchain/toolchain-external/toolchain-external-custom/Config.in.options +8 -0
+config BR2_TOOLCHAIN_EXTERNAL_FORTRAN
+       bool "Toolchain has Fortran support?"
+       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.
+

In the gcc package, there is some extra checks for fortran with libquadmath when available (which depends on the target architecture). So, I wonder whether it should be sensitive to libquadmath (so wchar) on the relevant architectures.

Indeed, I added:

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

I'll send a v2.

Best regards,
Romain

Quoted 10 lines
Quoted 7 lines
toolchain/toolchain-external/toolchain-external-custom/Config.in.options +0 -1
 config BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS
        string "Extra toolchain libraries to be copied to target"
        help
--

2.14.4

Regards,

#3 lore raw

PATCH 1/1 toolchain-external: add fortran support option for custom external toolchains

In reply to Romain Naour

Hello,

Quoted 9 lines · Romain Naour

If a custom external toolchain is used, we can't enable the fortran support. Add a new option for that.

Cc Thomas Petazzoni <[email protected]>
Cc Samuel Martin <[email protected]>
---
 .../toolchain-external-custom/Config.in.options                   | 8 ++++++++
 1 file changed, 8 insertions(+)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com