* [Buildroot] [PATCH v2 1/2] openmpi: add Fortran support for MIPS32
@ 2016-07-07 15:47 Vicente Olivert Riera
2016-07-07 15:47 ` [Buildroot] [PATCH v2 2/2] openmpi: add Fortran support for MIPS64 Vicente Olivert Riera
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Vicente Olivert Riera @ 2016-07-07 15:47 UTC (permalink / raw)
To: buildroot
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>
---
Changes v1 -> v2:
- Nothing.
package/openmpi/openmpi.mk | 12 ++++-
.../openmpi_mips32_fortran_cached_values.mk | 51 ++++++++++++++++++++++
2 files changed, 61 insertions(+), 2 deletions(-)
create mode 100644 package/openmpi/openmpi_mips32_fortran_cached_values.mk
diff --git a/package/openmpi/openmpi.mk b/package/openmpi/openmpi.mk
index 8871eaf..47f42be 100644
--- a/package/openmpi/openmpi.mk
+++ b/package/openmpi/openmpi.mk
@@ -13,8 +13,16 @@ 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
+ifeq ($(BR2_TOOLCHAIN_HAS_FORTRAN),y)
+
+# Enable Fortran for MIPS32
+ifeq ($(BR2_mips)$(BR2_mipsel),y)
+OPENMPI_CONF_OPTS += --enable-mpi-fortran=yes
+include $(TOPDIR)/package/openmpi/openmpi_mips32_fortran_cached_values.mk
+endif
+
+else
OPENMPI_CONF_OPTS += --enable-mpi-fortran=no
+endif
$(eval $(autotools-package))
diff --git a/package/openmpi/openmpi_mips32_fortran_cached_values.mk b/package/openmpi/openmpi_mips32_fortran_cached_values.mk
new file mode 100644
index 0000000..4962d88
--- /dev/null
+++ b/package/openmpi/openmpi_mips32_fortran_cached_values.mk
@@ -0,0 +1,51 @@
+OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_CHARACTER=1
+OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_LOGICAL=4
+OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_LOGICALp1=1
+OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_LOGICALp2=2
+OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_LOGICALp4=4
+OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_LOGICALp8=8
+OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_INTEGER=4
+OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_INTEGERp1=1
+OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_INTEGERp2=2
+OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_INTEGERp4=4
+OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_INTEGERp8=8
+OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_REAL=4
+OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_REALp4=4
+OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_REALp8=8
+OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_DOUBLE_PRECISION=8
+OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_COMPLEX=8
+OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_COMPLEXp8=8
+OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_COMPLEXp16=16
+OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_DOUBLE_COMPLEX=16
+OPENMPI_CONF_ENV += ompi_cv_fortran_alignment_CHARACTER=1
+OPENMPI_CONF_ENV += ompi_cv_fortran_alignment_LOGICAL=4
+OPENMPI_CONF_ENV += ompi_cv_fortran_alignment_LOGICALp1=1
+OPENMPI_CONF_ENV += ompi_cv_fortran_alignment_LOGICALp2=2
+OPENMPI_CONF_ENV += ompi_cv_fortran_alignment_LOGICALp4=4
+OPENMPI_CONF_ENV += ompi_cv_fortran_alignment_LOGICALp8=8
+OPENMPI_CONF_ENV += ompi_cv_fortran_alignment_INTEGER=4
+OPENMPI_CONF_ENV += ompi_cv_fortran_alignment_INTEGERp1=1
+OPENMPI_CONF_ENV += ompi_cv_fortran_alignment_INTEGERp2=2
+OPENMPI_CONF_ENV += ompi_cv_fortran_alignment_INTEGERp4=4
+OPENMPI_CONF_ENV += ompi_cv_fortran_alignment_INTEGERp8=8
+OPENMPI_CONF_ENV += ompi_cv_fortran_alignment_REAL=4
+OPENMPI_CONF_ENV += ompi_cv_fortran_alignment_REALp4=4
+OPENMPI_CONF_ENV += ompi_cv_fortran_alignment_REALp8=8
+OPENMPI_CONF_ENV += ompi_cv_fortran_alignment_DOUBLE_PRECISION=8
+OPENMPI_CONF_ENV += ompi_cv_fortran_alignment_COMPLEX=4
+OPENMPI_CONF_ENV += ompi_cv_fortran_alignment_COMPLEXp8=4
+OPENMPI_CONF_ENV += ompi_cv_fortran_alignment_COMPLEXp16=8
+OPENMPI_CONF_ENV += ompi_cv_fortran_alignment_DOUBLE_COMPLEX=8
+OPENMPI_CONF_ENV += ompi_cv_fortran_kind_value_C_SIGNED_CHAR=1
+OPENMPI_CONF_ENV += ompi_cv_fortran_kind_value_C_SHORT=2
+OPENMPI_CONF_ENV += ompi_cv_fortran_kind_value_C_INT=4
+OPENMPI_CONF_ENV += ompi_cv_fortran_kind_value_C_INT16_T=2
+OPENMPI_CONF_ENV += ompi_cv_fortran_kind_value_C_INT32_T=4
+OPENMPI_CONF_ENV += ompi_cv_fortran_kind_value_C_INT64_T=8
+OPENMPI_CONF_ENV += ompi_cv_fortran_kind_value_C_LONG_LONG=8
+OPENMPI_CONF_ENV += ompi_cv_fortran_kind_value_C_FLOAT=4
+OPENMPI_CONF_ENV += ompi_cv_fortran_kind_value_C_FLOAT_COMPLEX=4
+OPENMPI_CONF_ENV += ompi_cv_fortran_kind_value_C_DOUBLE=8
+OPENMPI_CONF_ENV += ompi_cv_fortran_kind_value_C_DOUBLE_COMPLEX=8
+OPENMPI_CONF_ENV += ompi_cv_fortran_true_value=1
+OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_type_test_mpi_handle_=4
--
2.7.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v2 2/2] openmpi: add Fortran support for MIPS64
2016-07-07 15:47 [Buildroot] [PATCH v2 1/2] openmpi: add Fortran support for MIPS32 Vicente Olivert Riera
@ 2016-07-07 15:47 ` Vicente Olivert Riera
2016-07-07 20:40 ` [Buildroot] [PATCH v2 1/2] openmpi: add Fortran support for MIPS32 Yann E. MORIN
2016-07-08 8:56 ` Thomas Petazzoni
2 siblings, 0 replies; 5+ messages in thread
From: Vicente Olivert Riera @ 2016-07-07 15:47 UTC (permalink / raw)
To: buildroot
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>
---
Changes v1 -> v2:
- Commit log fixed.
package/openmpi/openmpi.mk | 4 ++
.../openmpi_mips64_fortran_cached_values.mk | 60 ++++++++++++++++++++++
2 files changed, 64 insertions(+)
create mode 100644 package/openmpi/openmpi_mips64_fortran_cached_values.mk
diff --git a/package/openmpi/openmpi.mk b/package/openmpi/openmpi.mk
index 47f42be..a2e79aa 100644
--- a/package/openmpi/openmpi.mk
+++ b/package/openmpi/openmpi.mk
@@ -19,6 +19,10 @@ ifeq ($(BR2_TOOLCHAIN_HAS_FORTRAN),y)
ifeq ($(BR2_mips)$(BR2_mipsel),y)
OPENMPI_CONF_OPTS += --enable-mpi-fortran=yes
include $(TOPDIR)/package/openmpi/openmpi_mips32_fortran_cached_values.mk
+# Enable Fortran for MIPS64
+else ifeq ($(BR2_mips64)$(BR2_mips64el),y)
+OPENMPI_CONF_OPTS += --enable-mpi-fortran=yes
+include $(TOPDIR)/package/openmpi/openmpi_mips64_fortran_cached_values.mk
endif
else
diff --git a/package/openmpi/openmpi_mips64_fortran_cached_values.mk b/package/openmpi/openmpi_mips64_fortran_cached_values.mk
new file mode 100644
index 0000000..d0070b3
--- /dev/null
+++ b/package/openmpi/openmpi_mips64_fortran_cached_values.mk
@@ -0,0 +1,60 @@
+OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_CHARACTER=1
+OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_LOGICAL=4
+OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_LOGICALp1=1
+OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_LOGICALp2=2
+OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_LOGICALp4=4
+OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_LOGICALp8=8
+OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_INTEGER=4
+OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_INTEGERp1=1
+OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_INTEGERp2=2
+OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_INTEGERp4=4
+OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_INTEGERp8=8
+OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_INTEGERp16=16
+OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_REAL=4
+OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_REALp4=4
+OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_REALp8=8
+OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_REALp16=16
+OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_DOUBLE_PRECISION=8
+OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_COMPLEX=8
+OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_COMPLEXp8=8
+OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_COMPLEXp16=16
+OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_COMPLEXp32=32
+OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_DOUBLE_COMPLEX=16
+OPENMPI_CONF_ENV += ompi_cv_fortran_alignment_CHARACTER=1
+OPENMPI_CONF_ENV += ompi_cv_fortran_alignment_LOGICAL=4
+OPENMPI_CONF_ENV += ompi_cv_fortran_alignment_LOGICALp1=1
+OPENMPI_CONF_ENV += ompi_cv_fortran_alignment_LOGICALp2=2
+OPENMPI_CONF_ENV += ompi_cv_fortran_alignment_LOGICALp4=4
+OPENMPI_CONF_ENV += ompi_cv_fortran_alignment_LOGICALp8=8
+OPENMPI_CONF_ENV += ompi_cv_fortran_alignment_INTEGER=4
+OPENMPI_CONF_ENV += ompi_cv_fortran_alignment_INTEGERp1=1
+OPENMPI_CONF_ENV += ompi_cv_fortran_alignment_INTEGERp2=2
+OPENMPI_CONF_ENV += ompi_cv_fortran_alignment_INTEGERp4=4
+OPENMPI_CONF_ENV += ompi_cv_fortran_alignment_INTEGERp8=8
+OPENMPI_CONF_ENV += ompi_cv_fortran_alignment_REAL=4
+OPENMPI_CONF_ENV += ompi_cv_fortran_alignment_REALp4=4
+OPENMPI_CONF_ENV += ompi_cv_fortran_alignment_REALp8=8
+OPENMPI_CONF_ENV += ompi_cv_fortran_alignment_REALp16=16
+OPENMPI_CONF_ENV += ompi_cv_fortran_alignment_DOUBLE_PRECISION=8
+OPENMPI_CONF_ENV += ompi_cv_fortran_alignment_COMPLEX=4
+OPENMPI_CONF_ENV += ompi_cv_fortran_alignment_COMPLEXp8=4
+OPENMPI_CONF_ENV += ompi_cv_fortran_alignment_COMPLEXp16=8
+OPENMPI_CONF_ENV += ompi_cv_fortran_alignment_COMPLEXp32=16
+OPENMPI_CONF_ENV += ompi_cv_fortran_alignment_DOUBLE_COMPLEX=8
+OPENMPI_CONF_ENV += ompi_cv_fortran_kind_value_C_SIGNED_CHAR=1
+OPENMPI_CONF_ENV += ompi_cv_fortran_kind_value_C_SHORT=2
+OPENMPI_CONF_ENV += ompi_cv_fortran_kind_value_C_INT=4
+OPENMPI_CONF_ENV += ompi_cv_fortran_kind_value_C_INT16_T=2
+OPENMPI_CONF_ENV += ompi_cv_fortran_kind_value_C_INT32_T=4
+OPENMPI_CONF_ENV += ompi_cv_fortran_kind_value_C_INT64_T=8
+OPENMPI_CONF_ENV += ompi_cv_fortran_kind_value_C_LONG_LONG=8
+OPENMPI_CONF_ENV += ompi_cv_fortran_kind_value_C_LONG_DOUBLE=16
+OPENMPI_CONF_ENV += ompi_cv_fortran_kind_value_C_LONG_DOUBLE_COMPLEX=16
+OPENMPI_CONF_ENV += ompi_cv_fortran_kind_value_C_FLOAT=4
+OPENMPI_CONF_ENV += ompi_cv_fortran_kind_value_C_FLOAT_COMPLEX=4
+OPENMPI_CONF_ENV += ompi_cv_fortran_kind_value_C_DOUBLE=8
+OPENMPI_CONF_ENV += ompi_cv_fortran_kind_value_C_DOUBLE_COMPLEX=8
+OPENMPI_CONF_ENV += ompi_cv_fortran_kind_value_0=0
+OPENMPI_CONF_ENV += ompi_cv_real16_c_equiv=yes
+OPENMPI_CONF_ENV += ompi_cv_fortran_true_value=1
+OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_type_test_mpi_handle_=4
--
2.7.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v2 1/2] openmpi: add Fortran support for MIPS32
2016-07-07 15:47 [Buildroot] [PATCH v2 1/2] openmpi: add Fortran support for MIPS32 Vicente Olivert Riera
2016-07-07 15:47 ` [Buildroot] [PATCH v2 2/2] openmpi: add Fortran support for MIPS64 Vicente Olivert Riera
@ 2016-07-07 20:40 ` Yann E. MORIN
2016-07-08 8:56 ` Thomas Petazzoni
2 siblings, 0 replies; 5+ messages in thread
From: Yann E. MORIN @ 2016-07-07 20:40 UTC (permalink / raw)
To: buildroot
Vicente, All,
On 2016-07-07 16:47 +0100, Vicente Olivert Riera spake thusly:
> 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
Too bad... :-/
> 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)"
Meh... :-/
> Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
> ---
> Changes v1 -> v2:
> - Nothing.
>
> package/openmpi/openmpi.mk | 12 ++++-
> .../openmpi_mips32_fortran_cached_values.mk | 51 ++++++++++++++++++++++
> 2 files changed, 61 insertions(+), 2 deletions(-)
> create mode 100644 package/openmpi/openmpi_mips32_fortran_cached_values.mk
>
> diff --git a/package/openmpi/openmpi.mk b/package/openmpi/openmpi.mk
> index 8871eaf..47f42be 100644
> --- a/package/openmpi/openmpi.mk
> +++ b/package/openmpi/openmpi.mk
> @@ -13,8 +13,16 @@ 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
> +ifeq ($(BR2_TOOLCHAIN_HAS_FORTRAN),y)
> +
> +# Enable Fortran for MIPS32
> +ifeq ($(BR2_mips)$(BR2_mipsel),y)
> +OPENMPI_CONF_OPTS += --enable-mpi-fortran=yes
> +include $(TOPDIR)/package/openmpi/openmpi_mips32_fortran_cached_values.mk
No nedd for the leading $(TOPDIR)/ as $(TOPDIR) is guaranteed by
Buildroot to be the CWD when running Buildroot.
> +endif
> +
> +else
> OPENMPI_CONF_OPTS += --enable-mpi-fortran=no
> +endif
>
> $(eval $(autotools-package))
> diff --git a/package/openmpi/openmpi_mips32_fortran_cached_values.mk b/package/openmpi/openmpi_mips32_fortran_cached_values.mk
> new file mode 100644
> index 0000000..4962d88
> --- /dev/null
> +++ b/package/openmpi/openmpi_mips32_fortran_cached_values.mk
> @@ -0,0 +1,51 @@
> +OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_CHARACTER=1
> +OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_LOGICAL=4
> +OPENMPI_CONF_ENV += ompi_cv_fortran_sizeof_LOGICALp1=1
[--SNIP--]
I would have wrote it like that:
OPENMPI_CONF_ENV += \
ompi_cv_fortran_sizeof_CHARACTER=1 \
ompi_cv_fortran_sizeof_LOGICAL=4 \
ompi_cv_fortran_sizeof_LOGICALp1=1 \
[...]
Otherwise, I don;t see a better solution, indeed... :-/
Or, instead of passing it in the environment, we can provide a configure
cache file, no?
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v2 1/2] openmpi: add Fortran support for MIPS32
2016-07-07 15:47 [Buildroot] [PATCH v2 1/2] openmpi: add Fortran support for MIPS32 Vicente Olivert Riera
2016-07-07 15:47 ` [Buildroot] [PATCH v2 2/2] openmpi: add Fortran support for MIPS64 Vicente Olivert Riera
2016-07-07 20:40 ` [Buildroot] [PATCH v2 1/2] openmpi: add Fortran support for MIPS32 Yann E. MORIN
@ 2016-07-08 8:56 ` Thomas Petazzoni
2016-07-08 10:11 ` Vicente Olivert Riera
2 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2016-07-08 8:56 UTC (permalink / raw)
To: buildroot
Hello,
On Thu, 7 Jul 2016 16:47:33 +0100, Vicente Olivert Riera wrote:
> 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>
After discussing with Yann, we have changed your solution to use the
"config cache" mechanism of autoconf, which allows to preseed in a file
a number of configuration variables. It makes the whole thing a little
bit cleaner. It looks like this:
# 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
else ifeq ($(BR2_mips64)$(BR2_mips64el),y)
OPENMPI_FORTRAN_CONF_CACHE = package/openmpi/openmpi-mips64-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
And the openmpi-mips*-fortran.cache simply contain the list of
variables.
I've adjusted your two commits to this mechanism, and applied.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v2 1/2] openmpi: add Fortran support for MIPS32
2016-07-08 8:56 ` Thomas Petazzoni
@ 2016-07-08 10:11 ` Vicente Olivert Riera
0 siblings, 0 replies; 5+ messages in thread
From: Vicente Olivert Riera @ 2016-07-08 10:11 UTC (permalink / raw)
To: buildroot
Hello Thomas,
On 08/07/16 10:56, Thomas Petazzoni wrote:
> Hello,
>
> On Thu, 7 Jul 2016 16:47:33 +0100, Vicente Olivert Riera wrote:
>> 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>
>
> After discussing with Yann, we have changed your solution to use the
> "config cache" mechanism of autoconf, which allows to preseed in a file
> a number of configuration variables. It makes the whole thing a little
> bit cleaner. It looks like this:
>
> # 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
> else ifeq ($(BR2_mips64)$(BR2_mips64el),y)
> OPENMPI_FORTRAN_CONF_CACHE = package/openmpi/openmpi-mips64-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
>
> And the openmpi-mips*-fortran.cache simply contain the list of
> variables.
>
> I've adjusted your two commits to this mechanism, and applied.
ok, perfect. Thanks a lot.
Regards,
Vincent.
> Thanks!
>
> Thomas
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-07-08 10:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-07 15:47 [Buildroot] [PATCH v2 1/2] openmpi: add Fortran support for MIPS32 Vicente Olivert Riera
2016-07-07 15:47 ` [Buildroot] [PATCH v2 2/2] openmpi: add Fortran support for MIPS64 Vicente Olivert Riera
2016-07-07 20:40 ` [Buildroot] [PATCH v2 1/2] openmpi: add Fortran support for MIPS32 Yann E. MORIN
2016-07-08 8:56 ` Thomas Petazzoni
2016-07-08 10:11 ` Vicente Olivert Riera
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox