From patchwork Tue Oct 8 18:17:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 281554 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id A91D62C0098 for ; Wed, 9 Oct 2013 05:20:16 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id B9DD5329FB; Tue, 8 Oct 2013 18:20:15 +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 3EK1gsw3pWzg; Tue, 8 Oct 2013 18:20:09 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id B0B76329B0; Tue, 8 Oct 2013 18:19:17 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 6A3111BFA7E for ; Tue, 8 Oct 2013 18:19:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 42AC232A01 for ; Tue, 8 Oct 2013 18:19:12 +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 CDiqKjtS8s7O for ; Tue, 8 Oct 2013 18:19:11 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.free-electrons.com (top.free-electrons.com [176.31.233.9]) by silver.osuosl.org (Postfix) with ESMTP id 3D04532E28 for ; Tue, 8 Oct 2013 18:17:24 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 106) id 6E12B8F8; Tue, 8 Oct 2013 20:17:35 +0200 (CEST) Received: from localhost (AToulouse-651-1-189-203.w109-222.abo.wanadoo.fr [109.222.124.203]) by mail.free-electrons.com (Postfix) with ESMTPSA id 2DB8A8EC for ; Tue, 8 Oct 2013 20:17:35 +0200 (CEST) From: Thomas Petazzoni To: buildroot@uclibc.org Date: Tue, 8 Oct 2013 20:17:06 +0200 Message-Id: <1381256237-27948-10-git-send-email-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1381256237-27948-1-git-send-email-thomas.petazzoni@free-electrons.com> References: <1381256237-27948-1-git-send-email-thomas.petazzoni@free-electrons.com> Subject: [Buildroot] [PATCHv3 09/20] toolchain: modify the wildcard logic for shared libraries copying 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 Until now, the copy_toolchain_lib_root function took as argument the base name of a library (e.g: libm.so), and was assuming that the usual scheme libm.so. being a symbolic link to the real library was used. However, with musl based toolchains, the C library is named libc.so directly, with no symbolic link at all. Therefore, this commit changes the copy_toolchain_lib_root to move the responsibility of using a wildcard or not after the library name the caller's responsibility. So, all the existing LIB_EXTERNAL_LIBS values are modified to have a .* at the end, so that the behavior is effectively unchanged. Signed-off-by: Thomas Petazzoni --- package/glibc/glibc.mk | 8 ++++---- toolchain/helpers.mk | 2 +- toolchain/toolchain-external/toolchain-external.mk | 10 +++++----- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package/glibc/glibc.mk b/package/glibc/glibc.mk index 4d89caf..0dab492 100644 --- a/package/glibc/glibc.mk +++ b/package/glibc/glibc.mk @@ -112,12 +112,12 @@ endef # GLIBC_LIBS_LIB = \ - ld*.so libc.so libcrypt.so libdl.so libgcc_s.so libm.so \ - libnsl.so libpthread.so libresolv.so librt.so libutil.so \ - libnss_files.so libnss_dns.so + ld*.so.* libc.so.* libcrypt.so.* libdl.so.* libgcc_s.so.* libm.so.* \ + libnsl.so.* libpthread.so.* libresolv.so.* librt.so.* libutil.so.* \ + libnss_files.so.* libnss_dns.so.* ifeq ($(BR2_PACKAGE_GDB_SERVER),y) -GLIBC_LIBS_LIB += libthread_db.so +GLIBC_LIBS_LIB += libthread_db.so.* endif define GLIBC_INSTALL_TARGET_CMDS diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk index 27b6710..37f2cf9 100644 --- a/toolchain/helpers.mk +++ b/toolchain/helpers.mk @@ -54,7 +54,7 @@ copy_toolchain_lib_root = \ $${ARCH_SYSROOT_DIR}/$${ARCH_LIB_DIR} \ $${ARCH_SYSROOT_DIR}/usr/$${ARCH_LIB_DIR} \ $${SUPPORT_LIB_DIR} ; do \ - LIBSPATH=`find $${dir} -maxdepth 1 -name "$${LIB}.*" 2>/dev/null` ; \ + LIBSPATH=`find $${dir} -maxdepth 1 -name "$${LIB}" 2>/dev/null` ; \ if test -n "$${LIBSPATH}" ; then \ break ; \ fi \ diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk index aaf4994..2bfe64a 100644 --- a/toolchain/toolchain-external/toolchain-external.mk +++ b/toolchain/toolchain-external/toolchain-external.mk @@ -55,21 +55,21 @@ # of Buildroot is handled identical for the 2 toolchain types. ifeq ($(BR2_TOOLCHAIN_EXTERNAL_GLIBC)$(BR2_TOOLCHAIN_EXTERNAL_UCLIBC),y) -LIB_EXTERNAL_LIBS+=ld*.so libc.so libcrypt.so libdl.so libgcc_s.so libm.so libnsl.so libresolv.so librt.so libutil.so +LIB_EXTERNAL_LIBS+=ld*.so.* libc.so.* libcrypt.so.* libdl.so.* libgcc_s.so.* libm.so.* libnsl.so.* libresolv.so.* librt.so.* libutil.so.* ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) -LIB_EXTERNAL_LIBS+=libpthread.so +LIB_EXTERNAL_LIBS+=libpthread.so.* ifneq ($(BR2_PACKAGE_GDB_SERVER)$(BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY),) -LIB_EXTERNAL_LIBS+=libthread_db.so +LIB_EXTERNAL_LIBS+=libthread_db.so.* endif # gdbserver endif # ! no threads endif ifeq ($(BR2_TOOLCHAIN_EXTERNAL_GLIBC),y) -LIB_EXTERNAL_LIBS+=libnss_files.so libnss_dns.so +LIB_EXTERNAL_LIBS+=libnss_files.so.* libnss_dns.so.* endif ifeq ($(BR2_INSTALL_LIBSTDCPP),y) -USR_LIB_EXTERNAL_LIBS+=libstdc++.so +USR_LIB_EXTERNAL_LIBS+=libstdc++.so.* endif LIB_EXTERNAL_LIBS+=$(call qstrip,$(BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS))