@@ -120,11 +120,15 @@ config BR2_TOOLCHAIN_BUILDROOT_CXX
config BR2_TOOLCHAIN_BUILDROOT_FORTRAN
bool "Enable Fortran support"
+ depends on BR2_USE_WCHAR # libquadmath
help
Enable this option if you want your toolchain to support the
Fortran language and you want Fortran libraries to be
installed on your target system.
+comment "Fortran support needs a toolchain w/ wchar"
+ depends on !BR2_USE_WCHAR
+
config BR2_GCC_ENABLE_TLS
bool "Enable compiler tls support" if BR2_TOOLCHAIN_BUILDROOT_UCLIBC
default y
@@ -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_I386)$(BR2_x86_64),y)
+HOST_GCC_FINAL_USR_LIBS += libquadmath
+endif
endif
ifeq ($(BR2_GCC_ENABLE_OPENMP),y)
@@ -109,6 +109,11 @@ endif
# gcc 4.6.x quadmath requires wchar
ifneq ($(BR2_USE_WCHAR),y)
HOST_GCC_COMMON_CONF_OPTS += --disable-libquadmath
+else
+# fortran needs quadmath on x86 and x86_64
+ifeq ($(BR2_TOOLCHAIN_BUILDROOT_FORTRAN)$(BR2_I386)$(BR2_x86_64),yy)
+HOST_GCC_COMMON_CONF_OPTS += --enable-libquadmath
+endif
endif
# libsanitizer requires wordexp, not in default uClibc config. Also