summaryrefslogtreecommitdiffstats
path: root/package/openmpi/openmpi.mk
diff options
context:
space:
mode:
authorVicente Olivert Riera <Vincent.Riera@imgtec.com>2016-07-07 16:47:33 +0100
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-07-08 10:31:59 +0200
commitcc8e222d01c82ed0ecee27929c520a09a841482b (patch)
tree9c0aba68328d109c685480db0d75b19de26e4808 /package/openmpi/openmpi.mk
parent7446bf29584c78f7b448b99ad90c760b8bad9da1 (diff)
downloadbuildroot-cc8e222d01c82ed0ecee27929c520a09a841482b.tar.gz
buildroot-cc8e222d01c82ed0ecee27929c520a09a841482b.zip
openmpi: add Fortran support for MIPS32
We include a file containing cached values for Fortran tests that are performed at the configure step. These tests fail when cross-compiling and this is known upstream. See: https://www.open-mpi.org/community/lists/users/2013/01/21186.php In that thread the upstream maintainer admits that "cross compiling OpenMPI is a known issue" and the way to workaround this is to "pre-populate configure's answers to the Fortran tests (so that it doesn't actually have to run anything)" Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com> [Thomas: use the config cache mechanism to preseed the cache variables.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/openmpi/openmpi.mk')
-rw-r--r--package/openmpi/openmpi.mk23
1 files changed, 21 insertions, 2 deletions
diff --git a/package/openmpi/openmpi.mk b/package/openmpi/openmpi.mk
index 8871eaf10f..379ce572fb 100644
--- a/package/openmpi/openmpi.mk
+++ b/package/openmpi/openmpi.mk
@@ -13,8 +13,27 @@ OPENMPI_LICENSE_FILES = LICENSE
OPENMPI_INSTALL_STAGING = YES
OPENMPI_CONF_OPTS = --disable-vt
-# Disable fortran by default until we add BR2_TOOLCHAIN_HAS_FORTRAN
-# hidden symbol to our toolchain infrastructure
+# Enabling Fortran support requires pre-seeding the configure script
+# with various values that cannot be guessed, so we provide cache
+# files for various architectures.
+
+ifeq ($(BR2_TOOLCHAIN_HAS_FORTRAN),y)
+ifeq ($(BR2_mips)$(BR2_mipsel),y)
+OPENMPI_FORTRAN_CONF_CACHE = package/openmpi/openmpi-mips32-fortran.cache
+endif
+endif
+
+ifneq ($(OPENMPI_FORTRAN_CONF_CACHE),)
+define OPENMPI_COPY_FORTRAN_CACHE
+ cp $(OPENMPI_FORTRAN_CONF_CACHE) $(@D)/openmpi-config.cache
+endef
+
+OPENMPI_POST_PATCH_HOOKS += OPENMPI_COPY_FORTRAN_CACHE
+OPENMPI_CONF_OPTS += \
+ --enable-mpi-fortran=yes \
+ --cache-file=$(@D)/openmpi-config.cache
+else
OPENMPI_CONF_OPTS += --enable-mpi-fortran=no
+endif
$(eval $(autotools-package))
OpenPOWER on IntegriCloud