diff options
author | Carlos Santos <casantos@datacom.ind.br> | 2018-04-01 17:39:05 +0200 |
---|---|---|
committer | Peter Korsgaard <peter@korsgaard.com> | 2018-04-01 22:50:09 +0200 |
commit | 256bb383fb7d30ea0df81c65550eef4aac9a9215 (patch) | |
tree | 3fdb2942c91aa0a4dd0ace3191183a52872d21e1 /package/coreutils | |
parent | 225c8aaf27af908ce8a9ef5fb3fde4eb9d0cdc94 (diff) | |
download | buildroot-256bb383fb7d30ea0df81c65550eef4aac9a9215.tar.gz buildroot-256bb383fb7d30ea0df81c65550eef4aac9a9215.zip |
coreutils: use single binary in symlink method
The symlink method is faster, since there is no shell fork/exec, and
provides extra space savings.
Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
[Thomas: use the symlinks method not only for the merged /usr case,
but also in the non-merged case to be consistent, and therefore adjust
the logic that was moving the shell wrappers to a logic that recreates
the symlinks.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/coreutils')
-rw-r--r-- | package/coreutils/coreutils.mk | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/package/coreutils/coreutils.mk b/package/coreutils/coreutils.mk index 8880e77dcc..4ef888829f 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 --enable-single-binary=symlinks \ $(if $(BR2_TOOLCHAIN_USES_MUSL),--with-included-regex) COREUTILS_CONF_ENV = ac_cv_c_restrict=no \ ac_cv_func_chown_works=yes \ @@ -103,9 +103,10 @@ endif ifeq ($(BR2_ROOTFS_MERGED_USR),) define COREUTILS_CLEANUP_BIN - # some things go in root rather than usr + # some things go in /bin rather than /usr/bin $(foreach f,$(COREUTILS_BIN_PROGS), \ - mv -f $(TARGET_DIR)/usr/bin/$(f) $(TARGET_DIR)/bin/$(f) + rm -f $(TARGET_DIR)/usr/bin/$(f) && \ + ln -sf ../usr/bin/coreutils $(TARGET_DIR)/bin/$(f) ) endef COREUTILS_POST_INSTALL_TARGET_HOOKS += COREUTILS_CLEANUP_BIN |