Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2] toolchain-external: add fortran support option for custom external toolchains
@ 2018-10-20 18:12 Romain Naour
  2018-10-20 18:26 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Romain Naour @ 2018-10-20 18:12 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Samuel Martin <s.martin49@gmail.com>
---
v2: add libquadmath dependency when necessary (Samuel)
---
 .../toolchain-external-custom/Config.in.options   | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/toolchain/toolchain-external/toolchain-external-custom/Config.in.options b/toolchain/toolchain-external/toolchain-external-custom/Config.in.options
index 4639232bfb..6a9c4e5114 100644
--- a/toolchain/toolchain-external/toolchain-external-custom/Config.in.options
+++ b/toolchain/toolchain-external/toolchain-external-custom/Config.in.options
@@ -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
-- 
2.17.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Buildroot] [PATCH v2] toolchain-external: add fortran support option for custom external toolchains
  2018-10-20 18:12 [Buildroot] [PATCH v2] toolchain-external: add fortran support option for custom external toolchains Romain Naour
@ 2018-10-20 18:26 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2018-10-20 18:26 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat, 20 Oct 2018 20:12:26 +0200, Romain Naour wrote:

> +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
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-20 18:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-20 18:12 [Buildroot] [PATCH v2] toolchain-external: add fortran support option for custom external toolchains Romain Naour
2018-10-20 18:26 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox