diff mbox

[v2,12/15] toolchain/toolchain-external: add knob for fortran support

Message ID 20160701162920.19632-13-s.martin49@gmail.com
State Changes Requested
Headers show

Commit Message

Samuel Martin July 1, 2016, 4:29 p.m. UTC
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>

---
changes v1->v2:
- none
---
 toolchain/toolchain-external/Config.in | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Thomas Petazzoni July 1, 2016, 9:23 p.m. UTC | #1
Hello,

On Fri,  1 Jul 2016 18:29:17 +0200, Samuel Martin wrote:

> +config BR2_TOOLCHAIN_EXTERNAL_FORTRAN
> +	bool "Toolchain has Fortran support?"
> +	depends on BR2_USE_WCHAR # libquadmath

Is this dependency really needed? Plus libquadmath is only needed on
i386/x86_64, so on other architectures, we could have Fortran support
without wchar, could we?

> +	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_USE_WCHAR

I think this comment is not needed.

Thomas
Samuel Martin July 2, 2016, 10:37 a.m. UTC | #2
On Fri, Jul 1, 2016 at 11:23 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Hello,
>
> On Fri,  1 Jul 2016 18:29:17 +0200, Samuel Martin wrote:
>
>> +config BR2_TOOLCHAIN_EXTERNAL_FORTRAN
>> +     bool "Toolchain has Fortran support?"
>> +     depends on BR2_USE_WCHAR # libquadmath
>
> Is this dependency really needed? Plus libquadmath is only needed on
> i386/x86_64, so on other architectures, we could have Fortran support
> without wchar, could we?
Right, it should be:
  depends on (wchar && (i386 || x86_64)) || !(i386 || x86_64)

>
>> +     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_USE_WCHAR
>
> I think this comment is not needed.
Indeed, if the external toolchain has fortran, then it already meets
all the fortran dependencies.

>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com
diff mbox

Patch

diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
index 552536e..253aeb1 100644
--- a/toolchain/toolchain-external/Config.in
+++ b/toolchain/toolchain-external/Config.in
@@ -1020,6 +1020,18 @@  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?"
+	depends on BR2_USE_WCHAR # libquadmath
+	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_USE_WCHAR
+
 config BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS
 	string "Extra toolchain libraries to be copied to target"
 	help