toolchain: modify the wildcard logic for shared libraries copying
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 8 Oct 2013 18:17:06 +0000 (20:17 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Wed, 9 Oct 2013 13:15:06 +0000 (15:15 +0200)
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.<x> 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 <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/glibc/glibc.mk
toolchain/helpers.mk
toolchain/toolchain-external/toolchain-external.mk

index 4d89caff029ee9b6230955909b177b7521ff59e3..0dab4926a30cdd44ce5059cccdb40aef94c0f7ad 100644 (file)
@@ -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
index 27b67100fc607afbb8debd39705359f0a0ee1d41..37f2cf9b442f71543b5b2e1f9eed17fbf6c4c85b 100644 (file)
@@ -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 \
index aaf49945a9e797bffa17c0f0c6e86f3b4dcaa4fa..2bfe64a888516c0cd443297cf17473f830ecce4d 100644 (file)
 #  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))