Skip to content

Commit

Permalink
package/gcc: fix fortran support
Browse files Browse the repository at this point in the history
Fortran depends on libquadmath, which requires a toolchain with wchar
support.

So:
- make sure libquadmath is enable and installed when fortran is enabled;
- propagate the wchar dependency (from libquadmath) to fortran, and add
  a comment when fortran is not available.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
  • Loading branch information
tSed committed Mar 18, 2016
1 parent ae69ebb commit 82b0c58
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions package/gcc/Config.in.host
Expand Up @@ -111,11 +111,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
Expand Down
2 changes: 1 addition & 1 deletion package/gcc/gcc-final/gcc-final.mk
Expand Up @@ -153,7 +153,7 @@ HOST_GCC_FINAL_USR_LIBS += libstdc++
endif

ifeq ($(BR2_TOOLCHAIN_BUILDROOT_FORTRAN),y)
HOST_GCC_FINAL_USR_LIBS += libgfortran
HOST_GCC_FINAL_USR_LIBS += libgfortran libquadmath
endif

ifeq ($(BR2_GCC_ENABLE_OPENMP),y)
Expand Down
5 changes: 5 additions & 0 deletions package/gcc/gcc.mk
Expand Up @@ -116,6 +116,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
Expand Down

0 comments on commit 82b0c58

Please sign in to comment.