gcc: add support for fortran
authorDavid Kessler <djkessler@me.com>
Sat, 9 May 2015 17:40:54 +0000 (12:40 -0500)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 19 Jul 2015 12:48:33 +0000 (14:48 +0200)
Signed-off-by: David Kessler <DJKessler@me.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/gcc/Config.in.host
package/gcc/gcc-final/gcc-final.mk

index bd5c13fe0a118ee16759dddbc579807962cf8915..3d64b6f6784cb8dcbd9ed8141d803cc473e4550c 100644 (file)
@@ -117,6 +117,13 @@ config BR2_TOOLCHAIN_BUILDROOT_CXX
          C++ language and you want C++ libraries to be installed on
          your target system.
 
+config BR2_TOOLCHAIN_BUILDROOT_FORTRAN
+       bool "Enable Fortran support"
+       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.
+
 config BR2_GCC_ENABLE_TLS
        bool "Enable compiler tls support" if BR2_TOOLCHAIN_BUILDROOT_UCLIBC
        default y
index 16bf4eec651ae105f92d774afd22ed55cd532a6c..86b3c78b20554dab8f891c1c115f0b43e1b9f24c 100644 (file)
@@ -44,6 +44,7 @@ endef
 # Languages supported by the cross-compiler
 GCC_FINAL_CROSS_LANGUAGES-y = c
 GCC_FINAL_CROSS_LANGUAGES-$(BR2_INSTALL_LIBSTDCPP) += c++
+GCC_FINAL_CROSS_LANGUAGES-$(BR2_TOOLCHAIN_BUILDROOT_FORTRAN) += fortran
 GCC_FINAL_CROSS_LANGUAGES = $(subst $(space),$(comma),$(GCC_FINAL_CROSS_LANGUAGES-y))
 
 HOST_GCC_FINAL_CONF_OPTS = \
@@ -146,6 +147,10 @@ ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
 HOST_GCC_FINAL_USR_LIBS += libstdc++
 endif
 
+ifeq ($(BR2_TOOLCHAIN_BUILDROOT_FORTRAN),y)
+HOST_GCC_FINAL_USR_LIBS += libgfortran
+endif
+
 ifeq ($(BR2_GCC_ENABLE_OPENMP),y)
 HOST_GCC_FINAL_USR_LIBS += libgomp
 endif