[PATCH][RFC] readelf: partial support of ZSTD compression

Martin Liška mliska@suse.cz
Mon Oct 24 12:17:17 GMT 2022


On 10/24/22 13:41, Dmitry V. Levin wrote:
> On Mon, Oct 24, 2022 at 01:09:59PM +0200, Martin Liška wrote:
> [...]
>> One TODO I see is that:
>> +libelf_so_LDLIBS = $(libelf_so_DEPS) -lz -lzstd
>>
>> should be conditional based on HAVE_ZSTD. But I don't know how to do that?
> 
> I suppose you're talking about libzstd_LIBS.

Hm, can't see it after autoreconf -fi and ./configure.

> 
> [...]
>> diff --git a/m4/zstd.m4 b/m4/zstd.m4
>> new file mode 100644
>> index 00000000..6da4db68
>> --- /dev/null
>> +++ b/m4/zstd.m4
>> @@ -0,0 +1,23 @@
>> +dnl Copyright (C) 2022 Free Software Foundation, Inc.
>> +dnl This file is free software, distributed under the terms of the GNU
>> +dnl General Public License.  As a special exception to the GNU General
>> +dnl Public License, this file may be distributed as part of a program
>> +dnl that contains a configuration script generated by Autoconf, under
>> +dnl the same distribution terms as the rest of that program.
>> +
>> +dnl Enable features using the zstd library.
>> +AC_DEFUN([AC_ZSTD], [
>> +AC_ARG_WITH(zstd,
>> +  [AS_HELP_STRING([--with-zstd], [support zstd compressed debug sections (default=auto)])],
>> +  [], [with_zstd=auto])
> 
> Where does this code come from?
> I though the "AC_" prefix is reserved for the GNU Autoconf.

It comes from binutils './config/zstd.m4' file.

> Also, looks like it would be more appropriate to call it --enable-zstd
> rather than --with-zstd.
> 

Ah, I see.

Thanks,
Martin



More information about the Elfutils-devel mailing list