summaryrefslogtreecommitdiffstats
path: root/package/python3/python3.mk
diff options
context:
space:
mode:
Diffstat (limited to 'package/python3/python3.mk')
-rw-r--r--package/python3/python3.mk10
1 files changed, 10 insertions, 0 deletions
diff --git a/package/python3/python3.mk b/package/python3/python3.mk
index fd5709a92e..a37b791a87 100644
--- a/package/python3/python3.mk
+++ b/package/python3/python3.mk
@@ -147,7 +147,17 @@ define PYTHON3_TOUCH_GRAMMAR_FILES
touch $(@D)/Include/graminit.h $(@D)/Python/graminit.c
endef
+# This prevents the Python Makefile from regenerating the
+# Python/importlib.h header if Lib/importlib/_bootstrap.py has changed
+# because its generation is broken in a cross-compilation environment
+# and importlib.h is not used.
+
+define PYTHON3_TOUCH_IMPORTLIB_H
+ touch $(@D)/Python/importlib.h
+endef
+
PYTHON3_POST_PATCH_HOOKS += PYTHON3_TOUCH_GRAMMAR_FILES
+PYTHON3_POST_PATCH_HOOKS += PYTHON3_TOUCH_IMPORTLIB_H
#
# Remove useless files. In the config/ directory, only the Makefile
OpenPOWER on IntegriCloud