Parcourir la source

package/elfutils: new option to enable building libdebuginfod for target

This does not make debug info available, but allows building programs
that link against libdebuginfod.

Signed-off-by: Fiona Klute (WIWA) <fiona.klute@gmx.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Fiona Klute (WIWA) il y a 5 mois
Parent
commit
dc115ca708
2 fichiers modifiés avec 17 ajouts et 2 suppressions
  1. 10 0
      package/elfutils/Config.in
  2. 7 2
      package/elfutils/elfutils.mk

+ 10 - 0
package/elfutils/Config.in

@@ -33,4 +33,14 @@ comment "elfutils programs needs a glibc toolchain w/ C++"
 	depends on !BR2_TOOLCHAIN_USES_GLIBC \
 		|| !BR2_INSTALL_LIBSTDCPP
 
+config BR2_PACKAGE_ELFUTILS_LIBDEBUGINFOD
+	bool "Build libdebuginfod"
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4 # json-c
+	select BR2_PACKAGE_JSON_C
+	select BR2_PACKAGE_LIBCURL
+	help
+	  This option enables building libdebuginfod. Note that this
+	  only builds the library, it does not provide any service or
+	  data to download debug info.
+
 endif

+ 7 - 2
package/elfutils/elfutils.mk

@@ -49,8 +49,13 @@ ifeq ($(BR2_microblaze),y)
 ELFUTILS_CONF_OPTS += --disable-symbol-versioning
 endif
 
-# disable for now, needs "distro" support
-ELFUTILS_CONF_OPTS += --disable-libdebuginfod --disable-debuginfod
+ifeq ($(BR2_PACKAGE_ELFUTILS_LIBDEBUGINFOD),y)
+ELFUTILS_CONF_OPTS += --enable-libdebuginfod
+ELFUTILS_DEPENDENCIES += json-c libcurl
+else
+ELFUTILS_CONF_OPTS += --disable-libdebuginfod
+endif
+ELFUTILS_CONF_OPTS += --disable-debuginfod
 HOST_ELFUTILS_CONF_OPTS += --disable-libdebuginfod --disable-debuginfod
 
 ELFUTILS_CONF_ENV += \