summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2019-12-06 08:49:26 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2019-12-06 08:49:29 +0100
commitb298644220fa7e6fe4436dc5c9ee9beb111f544e (patch)
tree141b54ca83a7b7a86dc0876798bc5b8e96fc9d68
parentdd747c9e827295529bbdc8ee01b527067357b727 (diff)
downloadptxdist-2019.12.0.tar.gz
ptxdist-2019.12.0.tar.xz
python3-numpy: avoid host search pathsptxdist-2019.12.0
If no site.cfg is defined, then numpy will search in /usr and /usr/local for various headers and libraries. As a result, those paths may be added to the compiler command-line and building fails with 'Bad search path' errors. Create a site.cfg with empty library_dirs and include_dirs to avoid this. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--rules/python3-numpy.make10
1 files changed, 10 insertions, 0 deletions
diff --git a/rules/python3-numpy.make b/rules/python3-numpy.make
index f89237321..ac3b81611 100644
--- a/rules/python3-numpy.make
+++ b/rules/python3-numpy.make
@@ -35,6 +35,16 @@ PYTHON3_NUMPY_LICENSE_FILES := \
PYTHON3_NUMPY_CONF_TOOL := python3
# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/python3-numpy.prepare:
+ @$(call targetinfo)
+ @$(call world/prepare, PYTHON3_NUMPY)
+ @echo -e '[DEFAULT]\nlibrary_dirs =\ninclude_dirs =' > $(PYTHON3_NUMPY_DIR)/site.cfg
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
# Target-Install
# ----------------------------------------------------------------------------