From patchwork Wed Sep 27 16:23:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Santos X-Patchwork-Id: 819227 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.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3y2NS03MS5z9t5l for ; Thu, 28 Sep 2017 02:24:00 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id AE1E730776; Wed, 27 Sep 2017 16:23:56 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id noJjXRw-NPLx; Wed, 27 Sep 2017 16:23:55 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 63589304B4; Wed, 27 Sep 2017 16:23:55 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 4424A1BF8E5 for ; Wed, 27 Sep 2017 16:23:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 3F6AE89520 for ; Wed, 27 Sep 2017 16:23:54 +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 TNSAWSAhmR4C for ; Wed, 27 Sep 2017 16:23:52 +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 whitealder.osuosl.org (Postfix) with ESMTPS id 9B85389519 for ; Wed, 27 Sep 2017 16:23:52 +0000 (UTC) Received: from mail.datacom.ind.br (localhost [127.0.0.1]) by mail.datacom.ind.br (Postfix) with ESMTPS id E56511577280 for ; Wed, 27 Sep 2017 13:23:29 -0300 (BRT) Received: from localhost (localhost [127.0.0.1]) by mail.datacom.ind.br (Postfix) with ESMTP id D71FA1577271 for ; Wed, 27 Sep 2017 13:23:29 -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 w9fSqki2cNEO for ; Wed, 27 Sep 2017 13:23:29 -0300 (BRT) Received: from PEDELD011457.datacom.net (unknown [172.31.206.21]) by mail.datacom.ind.br (Postfix) with ESMTPSA id 723E015771D4 for ; Wed, 27 Sep 2017 13:23:29 -0300 (BRT) From: Carlos Santos To: buildroot@buildroot.org Date: Wed, 27 Sep 2017 13:23:31 -0300 Message-Id: <1506529411-26172-1-git-send-email-casantos@datacom.ind.br> X-Mailer: git-send-email 2.7.5 Subject: [Buildroot] [PATCH] 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. Signed-off-by: Carlos Santos --- package/coreutils/coreutils.mk | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/package/coreutils/coreutils.mk b/package/coreutils/coreutils.mk index 6a8a31b..721c711 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 +# 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),) +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