From patchwork Thu Jan 23 03:40:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Przemyslaw Wrzos X-Patchwork-Id: 313448 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id D81CD2C00AC for ; Thu, 23 Jan 2014 14:40:58 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 56D108BD75; Thu, 23 Jan 2014 03:40:57 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DdcIgvg2yA15; Thu, 23 Jan 2014 03:40:55 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id ED8A48BD96; Thu, 23 Jan 2014 03:40:54 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id E1ACA1C204E for ; Thu, 23 Jan 2014 03:40:53 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id CB3A48BFE0 for ; Thu, 23 Jan 2014 03:40:53 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id g01Sj1UQigVj for ; Thu, 23 Jan 2014 03:40:52 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from brick.calyptech.com (calypt.lnk.telstra.net [110.143.187.16]) by whitealder.osuosl.org (Postfix) with ESMTP id BDC608BFBF for ; Thu, 23 Jan 2014 03:40:51 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by brick.calyptech.com (Postfix) with ESMTP id 7013980273; Thu, 23 Jan 2014 14:40:48 +1100 (EST) X-Virus-Scanned: by amavisd-new-2.6.4 (20090625) (Debian) at calyptech.com Received: from brick.calyptech.com ([127.0.0.1]) by localhost (brick.calyptech.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WsVTOm6buNTl; Thu, 23 Jan 2014 14:40:47 +1100 (EST) Received: from localhost.localdomain (unknown [192.168.1.24]) by brick.calyptech.com (Postfix) with ESMTPSA id B181C80266; Thu, 23 Jan 2014 14:40:47 +1100 (EST) From: Przemyslaw Wrzos To: buildroot@busybox.net Date: Thu, 23 Jan 2014 14:40:38 +1100 Message-Id: <1390448438-13114-1-git-send-email-przemyslaw.wrzos@calyptech.com> X-Mailer: git-send-email 1.8.3.2 Subject: [Buildroot] [PATCH] python: fix to ensure libpython is stripped X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net 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 Acked-by: Thomas De Schampheleire Tested-by: Thomas De Schampheleire --- package/python/python.mk | 9 +++++++++ package/python3/python3.mk | 9 +++++++++ 2 files changed, 18 insertions(+) NOTE: Resubmitting as part of patchwork cleanup #6. diff --git a/package/python/python.mk b/package/python/python.mk index 6a6aaac..69662c3 100644 --- a/package/python/python.mk +++ b/package/python/python.mk @@ -162,6 +162,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 $(eval $(autotools-package)) diff --git a/package/python3/python3.mk b/package/python3/python3.mk index b5e9689..6cbe772 100644 --- a/package/python3/python3.mk +++ b/package/python3/python3.mk @@ -149,6 +149,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