From abb831b0b457a7d2e05e71f01784e4b457e4ea72 Mon Sep 17 00:00:00 2001 From: Aleksei Vetrov Date: Fri, 10 Nov 2023 14:49:03 +0000 Subject: elfutils: refactor transitive dependencies Soong doesn't have propagation for static library dependencies. Add "elfutils_transitive_defaults" to have "static_libs" that are applied to all static libraries that use elfutils. This have to be included explicitly by all elfutils users. Bug: 169779783 Bug: 309972007 Change-Id: I8802906257857f54710c351c5dcf4323c50aacbb Signed-off-by: Aleksei Vetrov --- Android.bp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Android.bp b/Android.bp index 1563dcd1..9146e4a3 100644 --- a/Android.bp +++ b/Android.bp @@ -39,8 +39,19 @@ license { ], } +// Properties to apply to all static libraries that use elfutils. +// Soong doesn't have propagation for static library dependencies, +// and this have to be included explicitly by elfutils users. +cc_defaults { + name: "elfutils_transitive_defaults", + static_libs: [ + "libz", + ], +} + cc_defaults { name: "elfutils_defaults", + defaults: ["elfutils_transitive_defaults"], cflags: [ "-DHAVE_CONFIG_H", "-D_GNU_SOURCE", @@ -75,8 +86,6 @@ cc_library { srcs: ["libelf/*.c",], - static_libs: ["libz"], - export_include_dirs: ["libelf"], target: { @@ -139,7 +148,6 @@ cc_library_host_static { musl: { static_libs: [ "libfts", - "libz", ], }, }, -- cgit v1.2.3 From 100547ceb3989c3913511872b42268c0dc08e867 Mon Sep 17 00:00:00 2001 From: Aleksei Vetrov Date: Fri, 10 Nov 2023 14:46:04 +0000 Subject: libdwfl: enable ZSTD compressed debug info support Add zstd as elfutils dependency fix post_update script to allow ZSTD, update config. Bug: 309972007 Test: TH Test: ./post_update.sh Change-Id: I9372ccee5a1c59479c24c65255410b094f3f6ee0 Signed-off-by: Aleksei Vetrov --- Android.bp | 2 +- config.h | 4 ++-- post_update.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Android.bp b/Android.bp index 9146e4a3..848df077 100644 --- a/Android.bp +++ b/Android.bp @@ -46,6 +46,7 @@ cc_defaults { name: "elfutils_transitive_defaults", static_libs: [ "libz", + "libzstd", ], } @@ -169,7 +170,6 @@ cc_library_host_static { // Do not enabled compression support "libdwfl/bzip2.c", "libdwfl/lzma.c", - "libdwfl/zstd.c", // Those headers are incompatible with clang due to nested function // definitions. "libdwfl/dwfl_segment_report_module.c", diff --git a/config.h b/config.h index 873627e0..fb46250a 100644 --- a/config.h +++ b/config.h @@ -189,10 +189,10 @@ #define USE_ZLIB 1 /* Support ZSTD (zst) decompression via -lzstd. */ -/* #undef USE_ZSTD */ +#define USE_ZSTD 1 /* zstd compression support */ -/* #undef USE_ZSTD_COMPRESS */ +#define USE_ZSTD_COMPRESS 1 /* Version number of package */ #define VERSION "0.189" diff --git a/post_update.sh b/post_update.sh index 7072c8f4..9079e374 100755 --- a/post_update.sh +++ b/post_update.sh @@ -11,7 +11,7 @@ if [ "$1" != "" ]; then cd $1 fi -autoreconf -i && ./configure --enable-maintainer-mode --disable-debuginfod --disable-libdebuginfod --without-lzma --without-bzlib --without-zstd +autoreconf -i && ./configure --enable-maintainer-mode --disable-debuginfod --disable-libdebuginfod --without-lzma --without-bzlib # if called from the external_updater, do not apply any patches as it will do # that for us -- cgit v1.2.3