All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] The external toolchain can be used statically.
@ 2010-12-07 15:48 Serj Kalichev
  2010-12-08  0:08 ` Mike Frysinger
  0 siblings, 1 reply; 7+ messages in thread
From: Serj Kalichev @ 2010-12-07 15:48 UTC (permalink / raw)
  To: buildroot

I tried to build minimal busybox-only project for using as initramfs. I use
external buildroot toolchain. The buildroot copy the .so libraries from
external toolchain to the target dir unconditionally. But I build busybox
statically and don't need shared libraries (the size of resulted image is too
big with unneeded libraries).

The patch use BR2_PREFER_STATIC_LIB to find out if the project prefer
static linking and if the static linking is preferred don't copy shared
libraries to the target dir.

Signed-off-by: Serj Kalichev <serj.kalichev@gmail.com>
---
 toolchain/toolchain-external/ext-tool.mk |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk
index 7e4645d..895ef5f 100644
--- a/toolchain/toolchain-external/ext-tool.mk
+++ b/toolchain/toolchain-external/ext-tool.mk
@@ -99,6 +99,7 @@ else
 	$(Q)$(call check_glibc,$(SYSROOT_DIR))
 endif
 	mkdir -p $(TARGET_DIR)/lib
+ifneq ($(BR2_PREFER_STATIC_LIB),y)
 	@echo "Copy external toolchain libraries to target..."
 	$(Q)for libs in $(LIB_EXTERNAL_LIBS); do \
 		$(call copy_toolchain_lib_root,$(ARCH_SYSROOT_DIR),$$libs,/lib,$(BR2_TOOLCHAIN_EXTERNAL_STRIP)); \
@@ -106,6 +107,7 @@ endif
 	$(Q)for libs in $(USR_LIB_EXTERNAL_LIBS); do \
 		$(call copy_toolchain_lib_root,$(ARCH_SYSROOT_DIR),$$libs,/usr/lib,$(BR2_TOOLCHAIN_EXTERNAL_STRIP)); \
 	done
+endif
 	@echo "Copy external toolchain sysroot to staging..."
 	$(Q)$(call copy_toolchain_sysroot,$(SYSROOT_DIR),$(ARCH_SYSROOT_DIR),$(ARCH_SUBDIR))
 	# Create lib64 symbolic links if needed
-- 
1.7.3.3

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-12-08 11:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-07 15:48 [Buildroot] [PATCH] The external toolchain can be used statically Serj Kalichev
2010-12-08  0:08 ` Mike Frysinger
     [not found]   ` <AANLkTikFg6m92-ovN5cf6E29-owMVLY_K20twJ1eqy66@mail.gmail.com>
2010-12-08  7:21     ` [Buildroot] Fwd: " Pkun
2010-12-08 10:40   ` [Buildroot] " Pkun
2010-12-08 10:48     ` Mike Frysinger
2010-12-08 11:26       ` Pkun
2010-12-08 11:31         ` Mike Frysinger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.