Browse Source

package/python-numpy: use fortran compiler when available

python-numpy can be built using fortran compiler if available. Pass the
F90 environment variable to setup.py to make sure it picks up the
cross-compiler. Otherwise, use --fcompiler to make sure it doesn't
accidentally pick up the host compiler.

Don't do anything like this for host compilation. We don't care whether
or not it uses fortran.

Signed-off-by: Guillaume W. Bres <guillaume.bressaix@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Guillaume W. Bres 5 years ago
parent
commit
1842a1cb2c
1 changed files with 5 additions and 0 deletions
  1. 5 0
      package/python-numpy/python-numpy.mk

+ 5 - 0
package/python-numpy/python-numpy.mk

@@ -25,7 +25,12 @@ else
 PYTHON_NUMPY_ENV += BLAS=None LAPACK=None
 endif
 
+ifeq ($(BR2_TOOLCHAIN_HAS_FORTRAN),y)
+PYTHON_NUMPY_BUILD_OPTS = --fcompiler=gnu95
+PYTHON_NUMPY_ENV += F90=$(TARGET_FC)
+else
 PYTHON_NUMPY_BUILD_OPTS = --fcompiler=None
+endif
 
 define PYTHON_NUMPY_CONFIGURE_CMDS
 	-rm -f $(@D)/site.cfg