From 1842a1cb2c7baebbc6e0f78993dac7953fd3309c Mon Sep 17 00:00:00 2001 From: "Guillaume W. Bres" Date: Sat, 27 Jun 2020 15:08:04 +0200 Subject: [PATCH] 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 Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- package/python-numpy/python-numpy.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package/python-numpy/python-numpy.mk b/package/python-numpy/python-numpy.mk index 9e8b032b78..417fe81f57 100644 --- a/package/python-numpy/python-numpy.mk +++ b/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