package/gdb: add optional support for xz
authorBernd Kuhls <bernd.kuhls@t-online.de>
Wed, 10 Feb 2016 20:59:08 +0000 (21:59 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 16 Feb 2016 22:14:07 +0000 (23:14 +0100)
When xz was compiled before, gdb will use it as optional dependency:

$ output/host/usr/bin/i586-buildroot-linux-uclibc-readelf -a output/target/usr/bin/gdb | grep NEEDED
 0x00000001 (NEEDED)                     Shared library: [libdl.so.1]
 0x00000001 (NEEDED)                     Shared library: [libncurses.so.5]
 0x00000001 (NEEDED)                     Shared library: [libz.so.1]
 0x00000001 (NEEDED)                     Shared library: [libm.so.1]
 0x00000001 (NEEDED)                     Shared library: [liblzma.so.5]
 0x00000001 (NEEDED)                     Shared library: [libc.so.1]

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/gdb/gdb.mk

index 3b0f501db8d5d5f13a44fe3682d89377dc419269..32d52eb3a1f49f97752d2f6c13cff6b85ebd28c7 100644 (file)
@@ -118,6 +118,13 @@ else
 GDB_CONF_OPTS += --without-expat
 endif
 
+ifeq ($(BR2_PACKAGE_XZ),y)
+GDB_CONF_OPTS += --with-lzma
+GDB_DEPENDENCIES += xz
+else
+GDB_CONF_OPTS += --without-lzma
+endif
+
 ifeq ($(BR2_PACKAGE_ZLIB),y)
 GDB_CONF_OPTS += --with-zlib
 GDB_DEPENDENCIES += zlib