python, python3: fix to ensure libpython is stripped
authorPrzemyslaw Wrzos <przemyslaw.wrzos@calyptech.com>
Tue, 18 Feb 2014 20:40:07 +0000 (21:40 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Wed, 19 Feb 2014 07:53:59 +0000 (08:53 +0100)
The python and python3 builds mark libpython as read-only which
prevents it from being stripped out correctly for the target.

Signed-off-by: Przemyslaw Wrzos <przemyslaw.wrzos@calyptech.com>
Acked-by: Thomas De Schampheleire <thomas.de_schampheleire@alcatel-lucent.com>
Tested-by: Thomas De Schampheleire <thomas.de_schampheleire@alcatel-lucent.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/python/python.mk
package/python3/python3.mk

index 3b0a4ddfd53618a59e4e563c92b1afed0417b29b..94765cbb84c5352a193aa3ba3dfea9d2d499ae0a 100644 (file)
@@ -160,6 +160,15 @@ endef
 
 PYTHON_POST_INSTALL_TARGET_HOOKS += PYTHON_REMOVE_USELESS_FILES
 
+#
+# Make sure libpython gets stripped out on target
+#
+define PYTHON_ENSURE_LIBPYTHON_STRIPPED
+       chmod u+w $(TARGET_DIR)/usr/lib/libpython$(PYTHON_VERSION_MAJOR)*.so
+endef
+
+PYTHON_POST_INSTALL_TARGET_HOOKS += PYTHON_ENSURE_LIBPYTHON_STRIPPED
+
 PYTHON_AUTORECONF = YES
 
 # Provided to other packages
index 13f53f4f030032a868231f80b6b84f30cf767a24..880b66e3c5ce6b0ae3fd6c207d19df574d9bc105 100644 (file)
@@ -131,6 +131,15 @@ endef
 
 PYTHON3_POST_INSTALL_TARGET_HOOKS += PYTHON3_REMOVE_USELESS_FILES
 
+#
+# Make sure libpython gets stripped out on target
+#
+define PYTHON3_ENSURE_LIBPYTHON_STRIPPED
+       chmod u+w $(TARGET_DIR)/usr/lib/libpython$(PYTHON3_VERSION_MAJOR)*.so
+endef
+
+PYTHON3_POST_INSTALL_TARGET_HOOKS += PYTHON3_ENSURE_LIBPYTHON_STRIPPED
+
 PYTHON3_AUTORECONF = YES
 
 define PYTHON3_INSTALL_SYMLINK