summaryrefslogtreecommitdiffstats
path: root/package/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'package/gcc')
-rw-r--r--package/gcc/Config.in.host7
-rw-r--r--package/gcc/gcc-final/gcc-final.mk4
2 files changed, 11 insertions, 0 deletions
diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
index 44a72f10cb..7d09b515d0 100644
--- a/package/gcc/Config.in.host
+++ b/package/gcc/Config.in.host
@@ -118,8 +118,15 @@ config BR2_TOOLCHAIN_BUILDROOT_CXX
C++ language and you want C++ libraries to be installed on
your target system.
+comment "Fortran support needs a toolchain w/ wchar"
+ depends on BR2_TOOLCHAIN_HAS_LIBQUADMATH
+ depends on !BR2_USE_WCHAR # libquadmath
+
config BR2_TOOLCHAIN_BUILDROOT_FORTRAN
bool "Enable Fortran support"
+ # on architecture building libquadmath, wchar is required
+ depends on !BR2_TOOLCHAIN_HAS_LIBQUADMATH || \
+ (BR2_TOOLCHAIN_HAS_LIBQUADMATH && BR2_USE_WCHAR)
help
Enable this option if you want your toolchain to support the
Fortran language and you want Fortran libraries to be
diff --git a/package/gcc/gcc-final/gcc-final.mk b/package/gcc/gcc-final/gcc-final.mk
index 78ceebad05..284d34cb1e 100644
--- a/package/gcc/gcc-final/gcc-final.mk
+++ b/package/gcc/gcc-final/gcc-final.mk
@@ -163,6 +163,10 @@ endif
ifeq ($(BR2_TOOLCHAIN_BUILDROOT_FORTRAN),y)
HOST_GCC_FINAL_USR_LIBS += libgfortran
+# fortran needs quadmath on x86 and x86_64
+ifeq ($(BR2_TOOLCHAIN_HAS_LIBQUADMATH),y)
+HOST_GCC_FINAL_USR_LIBS += libquadmath
+endif
endif
ifeq ($(BR2_GCC_ENABLE_OPENMP),y)
OpenPOWER on IntegriCloud