From patchwork Wed Sep 27 18:25:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Santos X-Patchwork-Id: 819273 X-Patchwork-Delegate: thomas.petazzoni@free-electrons.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3y2R8N3qpyz9tXQ for ; Thu, 28 Sep 2017 04:25:40 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 5FA6788A8E; Wed, 27 Sep 2017 18:25:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fDVpbevOxYSl; Wed, 27 Sep 2017 18:25:37 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 566F888A76; Wed, 27 Sep 2017 18:25:37 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 7FD9F1C1EDE for ; Wed, 27 Sep 2017 18:25:36 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 74D6183F1D for ; Wed, 27 Sep 2017 18:25:36 +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 WrjpRuymNjWd for ; Wed, 27 Sep 2017 18:25:35 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.datacom.ind.br (mx.datacom.ind.br [177.66.5.10]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 8433883F07 for ; Wed, 27 Sep 2017 18:25:35 +0000 (UTC) Received: from mail.datacom.ind.br (localhost [127.0.0.1]) by mail.datacom.ind.br (Postfix) with ESMTPS id 43AE2155A420 for ; Wed, 27 Sep 2017 15:25:13 -0300 (BRT) Received: from localhost (localhost [127.0.0.1]) by mail.datacom.ind.br (Postfix) with ESMTP id 35A4A155A41E for ; Wed, 27 Sep 2017 15:25:13 -0300 (BRT) Received: from mail.datacom.ind.br ([127.0.0.1]) by localhost (mail.datacom.ind.br [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 3yEuo0qfBw2B for ; Wed, 27 Sep 2017 15:25:13 -0300 (BRT) Received: from PEDELD011457.datacom.net (unknown [172.31.206.21]) by mail.datacom.ind.br (Postfix) with ESMTPSA id CB30715435BA for ; Wed, 27 Sep 2017 15:25:12 -0300 (BRT) From: Carlos Santos To: buildroot@buildroot.org Date: Wed, 27 Sep 2017 15:25:24 -0300 Message-Id: <1506536724-10603-1-git-send-email-casantos@datacom.ind.br> X-Mailer: git-send-email 2.7.5 In-Reply-To: <1506529411-26172-1-git-send-email-casantos@datacom.ind.br> References: <1506529411-26172-1-git-send-email-casantos@datacom.ind.br> Subject: [Buildroot] [PATCH v2] coreutils: use single binary in symlink method, with merged usr X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 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" The symlink method is faster, since there is no shell fork/exec, and provides extra space savings. Keep using the shebang method without merged usr, because it makes easier to move binaries into other directories. Change-Id: Iad19df24a7428f8a3c0d87d62da57c659b0378d1 Signed-off-by: Carlos Santos --- package/coreutils/coreutils.mk | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/package/coreutils/coreutils.mk b/package/coreutils/coreutils.mk index 6a8a31b..4b9dc99 100644 --- a/package/coreutils/coreutils.mk +++ b/package/coreutils/coreutils.mk @@ -14,7 +14,7 @@ COREUTILS_LICENSE_FILES = COPYING COREUTILS_AUTORECONF = YES COREUTILS_GETTEXTIZE = YES -COREUTILS_CONF_OPTS = --disable-rpath --enable-single-binary=shebangs \ +COREUTILS_CONF_OPTS = --disable-rpath \ $(if $(BR2_TOOLCHAIN_USES_MUSL),--with-included-regex) COREUTILS_CONF_ENV = ac_cv_c_restrict=no \ ac_cv_func_chown_works=yes \ @@ -101,9 +101,15 @@ COREUTILS_CONF_OPTS += --with-openssl=yes COREUTILS_DEPENDENCIES += openssl endif -ifeq ($(BR2_ROOTFS_MERGED_USR),) +# Build as a single binary for some neat space savings. Use the symlink method +# with merged usr. Otherwise use the shebang method since it allows us to move +# binaries into other directories whereas for symlink that wouldn't be so easy. +ifeq ($(BR2_ROOTFS_MERGED_USR),y) +COREUTILS_CONF_OPTS += --enable-single-binary=symlinks +else +COREUTILS_CONF_OPTS += --enable-single-binary=shebangs define COREUTILS_CLEANUP_BIN - # some things go in root rather than usr + # some things go in /bin rather than /usr/bin for f in $(COREUTILS_BIN_PROGS); do \ mv -f $(TARGET_DIR)/usr/bin/$$f $(TARGET_DIR)/bin/$$f || exit 1; \ done