glibc, toolchain-external: copy libthread_db when gdb is enabled
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 29 Oct 2013 20:54:02 +0000 (21:54 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 30 Oct 2013 18:10:28 +0000 (19:10 +0100)
As Samuel Martin noticed, libthread_db is not only needed when
cross-gdb+gdbserver is used, but also when the native gdb is used on
the target. As a consequence, this patch modifies the glibc package
and the external toolchain logic to ensure that libthread_db is copied
to the target either when the native gdb or gdbserver is enabled, by
relying on the BR2_PACKAGE_GDB option, which is enabled when native
gdb and/or gdbserver are enabled.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/glibc/glibc.mk
toolchain/toolchain-external/toolchain-external.mk

index 0dab4926a30cdd44ce5059cccdb40aef94c0f7ad..2e7fe82a820651b4d5896d3635c8dcd9fc403b18 100644 (file)
@@ -116,7 +116,7 @@ GLIBC_LIBS_LIB = \
        libnsl.so.* libpthread.so.* libresolv.so.* librt.so.* libutil.so.*   \
        libnss_files.so.* libnss_dns.so.*
 
-ifeq ($(BR2_PACKAGE_GDB_SERVER),y)
+ifeq ($(BR2_PACKAGE_GDB),y)
 GLIBC_LIBS_LIB += libthread_db.so.*
 endif
 
index 668e9c33b84b5e6d2d8a3f16790324be90de14d0..2722600511065d0701538b0632820c1516693a13 100644 (file)
@@ -63,7 +63,7 @@ LIB_EXTERNAL_LIBS+=ld*.so.*
 endif
 ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
 LIB_EXTERNAL_LIBS+=libpthread.so.*
-ifneq ($(BR2_PACKAGE_GDB_SERVER)$(BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY),)
+ifneq ($(BR2_PACKAGE_GDB)$(BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY),)
 LIB_EXTERNAL_LIBS+=libthread_db.so.*
 endif # gdbserver
 endif # ! no threads