Re: [PATCH] Fix automake warnings
On Thu, 2020-12-10 at 02:34 +0300, Dmitry V. Levin wrote: > Apparently, commit 2f02e81510946a4c8e9157ad0b72d92894b9acd7 that > removed > $(EXEEXT) suffix from shared libraries was incomplete: it missed the > fact that some libraries were included into noinst_PROGRAMS, > resulting > to the following automake warnings: > > libasm/Makefile.am:66: warning: deprecated feature: target > 'libasm.so' overrides 'libasm.so$(EXEEXT)' > libdw/Makefile.am:114: warning: deprecated feature: target 'libdw.so' > overrides 'libdw.so$(EXEEXT)' > libelf/Makefile.am:116: warning: deprecated feature: target > 'libelf.so' overrides 'libelf.so$(EXEEXT)' > > Fix this by renaming noinst_PROGRAMS to noinst_DATA and removing no > longer needed lib{asm,dw,elf}_so_SOURCES variables. Very nice. I have one small issue, with automake 1.13.4 when removing the lib{asm,dw,elf}_so_SOURCES variables no clean rule is generated anymore for these files. So make clean leaves the .so behind. This is easily fixed by adding them to CLEANFILES. Does the attached variant work for you? Thanks, Mark From 3ca5ef319500129ed574596f178c4a4667b9ed3b Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Thu, 10 Dec 2020 02:34:55 +0300 Subject: [PATCH] Fix automake warnings Apparently, commit 2f02e81510946a4c8e9157ad0b72d92894b9acd7 that removed $(EXEEXT) suffix from shared libraries was incomplete: it missed the fact that some libraries were included into noinst_PROGRAMS, resulting to the following automake warnings: libasm/Makefile.am:66: warning: deprecated feature: target 'libasm.so' overrides 'libasm.so$(EXEEXT)' libdw/Makefile.am:114: warning: deprecated feature: target 'libdw.so' overrides 'libdw.so$(EXEEXT)' libelf/Makefile.am:116: warning: deprecated feature: target 'libelf.so' overrides 'libelf.so$(EXEEXT)' Fix this by renaming noinst_PROGRAMS to noinst_DATA and removing no longer needed lib{asm,dw,elf}_so_SOURCES variables and add lib{asm,dw,elf).so to CLEANFILES. Fixes: 2f02e8151094 ("Drop $(EXEEXT) suffix from shared libraries") Signed-off-by: Dmitry V. Levin Signed-off-by: Mark Wielaard --- libasm/ChangeLog | 6 ++ libasm/Makefile.am | 5 ++--- libdw/ChangeLog| 6 ++ libdw/Makefile.am | 5 ++--- libelf/ChangeLog | 6 ++ libelf/Makefile.am | 5 ++--- 6 files changed, 24 insertions(+), 9 deletions(-) diff --git a/libasm/ChangeLog b/libasm/ChangeLog index 29c23bad..5e95b99e 100644 --- a/libasm/ChangeLog +++ b/libasm/ChangeLog @@ -1,3 +1,9 @@ +2020-12-09 Dmitry V. Levin + + * Makefile.am (noinst_PROGRAMS): Rename to noinst_DATA. + (libasm_so_SOURCES): Remove. + (CLEANFILES): Add libelf.so. + 2020-11-30 Dmitry V. Levin * Makefile.am (libasm.so$(EXEEXT)): Drop $(EXEEXT) suffix. diff --git a/libasm/Makefile.am b/libasm/Makefile.am index 4b55d530..7eba81f9 100644 --- a/libasm/Makefile.am +++ b/libasm/Makefile.am @@ -35,7 +35,7 @@ VERSION = 1 lib_LIBRARIES = libasm.a noinst_LIBRARIES = libasm_pic.a -noinst_PROGRAMS = $(noinst_LIBRARIES:_pic.a=.so) +noinst_DATA = $(noinst_LIBRARIES:_pic.a=.so) pkginclude_HEADERS = libasm.h libasm_a_SOURCES = asm_begin.c asm_abort.c asm_end.c asm_error.c \ @@ -62,7 +62,6 @@ libasm_so_LDLIBS += -lpthread endif libasm_so_LIBS = libasm_pic.a -libasm_so_SOURCES = libasm.so: $(srcdir)/libasm.map $(libasm_so_LIBS) $(libasm_so_DEPS) $(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \ -Wl,--soname,$@.$(VERSION) \ @@ -87,4 +86,4 @@ uninstall: uninstall-am noinst_HEADERS = libasmP.h symbolhash.h EXTRA_DIST = libasm.map -CLEANFILES += $(am_libasm_pic_a_OBJECTS) libasm.so.$(VERSION) +CLEANFILES += $(am_libasm_pic_a_OBJECTS) libasm.so libasm.so.$(VERSION) diff --git a/libdw/ChangeLog b/libdw/ChangeLog index fbe2abc0..2d552544 100644 --- a/libdw/ChangeLog +++ b/libdw/ChangeLog @@ -1,3 +1,9 @@ +2020-12-09 Dmitry V. Levin + + * Makefile.am (noinst_PROGRAMS): Rename to noinst_DATA. + (libdw_so_SOURCES): Remove. + (MOSTLYCLEANFILES): Add libdw.so. + 2020-11-30 Dmitry V. Levin * Makefile.am (libdw.so$(EXEEXT)): Drop $(EXEEXT) suffix. diff --git a/libdw/Makefile.am b/libdw/Makefile.am index f21ee6ae..6b7834af 100644 --- a/libdw/Makefile.am +++ b/libdw/Makefile.am @@ -36,7 +36,7 @@ VERSION = 1 lib_LIBRARIES = libdw.a noinst_LIBRARIES = libdw_pic.a -noinst_PROGRAMS = $(noinst_LIBRARIES:_pic.a=.so) +noinst_DATA = $(noinst_LIBRARIES:_pic.a=.so) include_HEADERS = dwarf.h pkginclude_HEADERS = libdw.h known-dwarf.h @@ -110,7 +110,6 @@ libdw_so_LIBS = ../libebl/libebl_pic.a ../backends/libebl_backends_pic.a \ ../libdwfl/libdwfl_pic.a libdw_so_DEPS = ../lib/libeu.a ../libelf/libelf.so libdw_so_LDLIBS = $(libdw_so_DEPS) -ldl -lz $(argp_LDADD) $(fts_LIBS) $(obstack_LIBS) $(zip_LIBS) -pthread -libdw_so_SOURCES = libdw.so: $(srcdir)/libdw.map $(libdw_so_LIBS) $(libdw_so_DEPS) $(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \ -Wl,--soname,$@.$(VERSION),--enable-new-dtags \ @@ -152,4 +151,4 @@ noinst_HEADERS = libdwP.h memory-access.h dwarf_abbrev_hash.h \ EXTRA_DIST = libdw
Re: [PATCH] Fix automake warnings
On Thu, Dec 10, 2020 at 11:09:21AM +0100, Mark Wielaard wrote: > On Thu, 2020-12-10 at 02:34 +0300, Dmitry V. Levin wrote: > > Apparently, commit 2f02e81510946a4c8e9157ad0b72d92894b9acd7 that > > removed > > $(EXEEXT) suffix from shared libraries was incomplete: it missed the > > fact that some libraries were included into noinst_PROGRAMS, > > resulting > > to the following automake warnings: > > > > libasm/Makefile.am:66: warning: deprecated feature: target > > 'libasm.so' overrides 'libasm.so$(EXEEXT)' > > libdw/Makefile.am:114: warning: deprecated feature: target 'libdw.so' > > overrides 'libdw.so$(EXEEXT)' > > libelf/Makefile.am:116: warning: deprecated feature: target > > 'libelf.so' overrides 'libelf.so$(EXEEXT)' > > > > Fix this by renaming noinst_PROGRAMS to noinst_DATA and removing no > > longer needed lib{asm,dw,elf}_so_SOURCES variables. > > Very nice. I have one small issue, with automake 1.13.4 when removing > the lib{asm,dw,elf}_so_SOURCES variables no clean rule is generated > anymore for these files. So make clean leaves the .so behind. This is > easily fixed by adding them to CLEANFILES. Sorry, haven't tested this with distcheck, thank you for noticing. > Does the attached variant work for you? Yes, with a few very minor ChangeLog and commit message corrections, see below. > Thanks, > > Mark > From 3ca5ef319500129ed574596f178c4a4667b9ed3b Mon Sep 17 00:00:00 2001 > From: "Dmitry V. Levin" > Date: Thu, 10 Dec 2020 02:34:55 +0300 > Subject: [PATCH] Fix automake warnings > > Apparently, commit 2f02e81510946a4c8e9157ad0b72d92894b9acd7 that removed > $(EXEEXT) suffix from shared libraries was incomplete: it missed the > fact that some libraries were included into noinst_PROGRAMS, resulting > to the following automake warnings: > > libasm/Makefile.am:66: warning: deprecated feature: target 'libasm.so' > overrides 'libasm.so$(EXEEXT)' > libdw/Makefile.am:114: warning: deprecated feature: target 'libdw.so' > overrides 'libdw.so$(EXEEXT)' > libelf/Makefile.am:116: warning: deprecated feature: target 'libelf.so' > overrides 'libelf.so$(EXEEXT)' > > Fix this by renaming noinst_PROGRAMS to noinst_DATA and removing no > longer needed lib{asm,dw,elf}_so_SOURCES variables and add lib{asm,dw,elf).so > to CLEANFILES. "add lib{asm,dw,elf).so.1", lib{asm,dw,elf).so are already there. > > Fixes: 2f02e8151094 ("Drop $(EXEEXT) suffix from shared libraries") > Signed-off-by: Dmitry V. Levin > Signed-off-by: Mark Wielaard > --- > libasm/ChangeLog | 6 ++ > libasm/Makefile.am | 5 ++--- > libdw/ChangeLog| 6 ++ > libdw/Makefile.am | 5 ++--- > libelf/ChangeLog | 6 ++ > libelf/Makefile.am | 5 ++--- > 6 files changed, 24 insertions(+), 9 deletions(-) > > diff --git a/libasm/ChangeLog b/libasm/ChangeLog > index 29c23bad..5e95b99e 100644 > --- a/libasm/ChangeLog > +++ b/libasm/ChangeLog > @@ -1,3 +1,9 @@ > +2020-12-09 Dmitry V. Levin > + > + * Makefile.am (noinst_PROGRAMS): Rename to noinst_DATA. > + (libasm_so_SOURCES): Remove. > + (CLEANFILES): Add libelf.so. Add libasm.so.$(VERSION). > + > 2020-11-30 Dmitry V. Levin > > * Makefile.am (libasm.so$(EXEEXT)): Drop $(EXEEXT) suffix. > diff --git a/libasm/Makefile.am b/libasm/Makefile.am > index 4b55d530..7eba81f9 100644 > --- a/libasm/Makefile.am > +++ b/libasm/Makefile.am > @@ -35,7 +35,7 @@ VERSION = 1 > > lib_LIBRARIES = libasm.a > noinst_LIBRARIES = libasm_pic.a > -noinst_PROGRAMS = $(noinst_LIBRARIES:_pic.a=.so) > +noinst_DATA = $(noinst_LIBRARIES:_pic.a=.so) > pkginclude_HEADERS = libasm.h > > libasm_a_SOURCES = asm_begin.c asm_abort.c asm_end.c asm_error.c \ > @@ -62,7 +62,6 @@ libasm_so_LDLIBS += -lpthread > endif > > libasm_so_LIBS = libasm_pic.a > -libasm_so_SOURCES = > libasm.so: $(srcdir)/libasm.map $(libasm_so_LIBS) $(libasm_so_DEPS) > $(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \ > -Wl,--soname,$@.$(VERSION) \ > @@ -87,4 +86,4 @@ uninstall: uninstall-am > noinst_HEADERS = libasmP.h symbolhash.h > EXTRA_DIST = libasm.map > > -CLEANFILES += $(am_libasm_pic_a_OBJECTS) libasm.so.$(VERSION) > +CLEANFILES += $(am_libasm_pic_a_OBJECTS) libasm.so libasm.so.$(VERSION) > diff --git a/libdw/ChangeLog b/libdw/ChangeLog > index fbe2abc0..2d552544 100644 > --- a/libdw/ChangeLog > +++ b/libdw/ChangeLog > @@ -1,3 +1,9 @@ > +2020-12-09 Dmitry V. Levin > + > + * Makefile.am (noinst_PROGRAMS): Rename to noinst_DATA. > + (libdw_so_SOURCES): Remove. > + (MOSTLYCLEANFILES): Add libdw.so. Add libdw.so.$(VERSION). > + > 2020-11-30 Dmitry V. Levin > > * Makefile.am (libdw.so$(EXEEXT)): Drop $(EXEEXT) suffix. > diff --git a/libdw/Makefile.am b/libdw/Makefile.am > index f21ee6ae..6b7834af 100644 > --- a/libdw/Makefile.am > +++ b/libdw/Makefile.am > @@ -36,7 +36,7 @@ VERSION = 1 > > lib_LIBRARIES = libdw.a > noinst_LIBRARIES = libdw_pic.a > -noinst_PROGRAMS = $(noinst_LIBRARIES:_pic.a=.so) > +noinst_DATA = $(noinst_LIBRARIES:_pic.a=.so) > >
Re: [PATCH] Fix automake warnings
Hi Dmitry, On Thu, 2020-12-10 at 13:30 +0300, Dmitry V. Levin wrote: > On Thu, Dec 10, 2020 at 11:09:21AM +0100, Mark Wielaard wrote: > > Very nice. I have one small issue, with automake 1.13.4 when removing > > the lib{asm,dw,elf}_so_SOURCES variables no clean rule is generated > > anymore for these files. So make clean leaves the .so behind. This is > > easily fixed by adding them to CLEANFILES. > > Sorry, haven't tested this with distcheck, thank you for noticing. > > > Does the attached variant work for you? > > Yes, with a few very minor ChangeLog and commit message corrections, see > below. > [...] > > Fix this by renaming noinst_PROGRAMS to noinst_DATA and removing no > > longer needed lib{asm,dw,elf}_so_SOURCES variables and add > > lib{asm,dw,elf).so > > to CLEANFILES. > > "add lib{asm,dw,elf).so.1", lib{asm,dw,elf).so are already there. It is the other way around. It might be because I added lib{asm,dw,elf).so before the existing lib{asm,dw,elf).so.1 that the diff looks like it is adding the .1 variants. > > diff --git a/libasm/ChangeLog b/libasm/ChangeLog > > index 29c23bad..5e95b99e 100644 > > --- a/libasm/ChangeLog > > +++ b/libasm/ChangeLog > > @@ -1,3 +1,9 @@ > > +2020-12-09 Dmitry V. Levin > > + > > + * Makefile.am (noinst_PROGRAMS): Rename to noinst_DATA. > > + (libasm_so_SOURCES): Remove. > > + (CLEANFILES): Add libelf.so. > > Add libasm.so.$(VERSION). > [...] > > @@ -87,4 +86,4 @@ uninstall: uninstall-am > > noinst_HEADERS = libasmP.h symbolhash.h > > EXTRA_DIST = libasm.map > > > > -CLEANFILES += $(am_libasm_pic_a_OBJECTS) libasm.so.$(VERSION) > > +CLEANFILES += $(am_libasm_pic_a_OBJECTS) libasm.so libasm.so.$(VERSION) Look, libasm.so was inserted before libasm.so.$(VERSION) All these Makefiles do define VERSION = 1. Cheers, Mark
Re: [PATCH] Fix automake warnings
On Thu, Dec 10, 2020 at 12:28:35PM +0100, Mark Wielaard wrote: > Hi Dmitry, > > On Thu, 2020-12-10 at 13:30 +0300, Dmitry V. Levin wrote: > > On Thu, Dec 10, 2020 at 11:09:21AM +0100, Mark Wielaard wrote: > > > Very nice. I have one small issue, with automake 1.13.4 when removing > > > the lib{asm,dw,elf}_so_SOURCES variables no clean rule is generated > > > anymore for these files. So make clean leaves the .so behind. This is > > > easily fixed by adding them to CLEANFILES. > > > > Sorry, haven't tested this with distcheck, thank you for noticing. > > > > > Does the attached variant work for you? > > > > Yes, with a few very minor ChangeLog and commit message corrections, see > > below. > > [...] > > > Fix this by renaming noinst_PROGRAMS to noinst_DATA and removing no > > > longer needed lib{asm,dw,elf}_so_SOURCES variables and add > > > lib{asm,dw,elf).so > > > to CLEANFILES. > > > > "add lib{asm,dw,elf).so.1", lib{asm,dw,elf).so are already there. > > It is the other way around. It might be because I added > lib{asm,dw,elf).so before the existing lib{asm,dw,elf).so.1 that the > diff looks like it is adding the .1 variants. Indeed. > > > diff --git a/libasm/ChangeLog b/libasm/ChangeLog > > > index 29c23bad..5e95b99e 100644 > > > --- a/libasm/ChangeLog > > > +++ b/libasm/ChangeLog > > > @@ -1,3 +1,9 @@ > > > +2020-12-09 Dmitry V. Levin > > > + > > > + * Makefile.am (noinst_PROGRAMS): Rename to noinst_DATA. > > > + (libasm_so_SOURCES): Remove. > > > + (CLEANFILES): Add libelf.so. > > > > Add libasm.so.$(VERSION). It has to be libasm.so. Likewise, libelf/ChangeLog should mention libelf.so instead of libasm.so. -- ldv
Re: [PATCH] Fix automake warnings
Hi Dmitry, On Thu, 2020-12-10 at 14:52 +0300, Dmitry V. Levin wrote: > On Thu, Dec 10, 2020 at 12:28:35PM +0100, Mark Wielaard wrote: > > > > + * Makefile.am (noinst_PROGRAMS): Rename to noinst_DATA. > > > > + (libasm_so_SOURCES): Remove. > > > > + (CLEANFILES): Add libelf.so. > > > > > > Add libasm.so.$(VERSION). > > It has to be libasm.so. > > Likewise, libelf/ChangeLog should mention libelf.so instead of > libasm.so. Aha, o, oops. I see, I was too quick with my copy/paste. Double checked everything and pushed with the correct names. Thanks, Mark
Re: [PATCH 1/2] link_map: Pull release_buffer() into file scope
Hi Timm, On Mon, 2020-12-07 at 12:11 +0100, Timm Bäder via Elfutils-devel wrote: > Get rid of a nested function this way. Add a memory_closure struct to > keep the functions clean. Pushed with one fix. > @@ -319,7 +331,7 @@ report_r_debug (uint_fast8_t elfclass, uint_fast8_t > elfdata, >while (next != 0 && ++iterations < dwfl->lookup_elts) > { >if (read_addrs (next, 4)) > - return release_buffer (-1); > + return release_buffer (&memory_closure, &buffer, &buffer_available, 0); The last argument must be -1. Cheers, Mark
Re: [PATCH 2/2] link_map: Pull read_addrs() into file scope
Hi Timm, On Mon, 2020-12-07 at 12:11 +0100, Timm Bäder via Elfutils-devel wrote: > Get rid of a nested function this way. The whole idea behind using nested functions is that we don't need to pass around 9 arguments... But ok, it looks harmless. Pushed. Cheers, Mark
[PATCH] Remove unused Makefile variable GCC_INCLUDE
It appears to be unused since the first commit in the revision history. Signed-off-by: Dmitry V. Levin --- libasm/ChangeLog | 4 libasm/Makefile.am | 1 - libelf/ChangeLog | 4 libelf/Makefile.am | 2 +- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/libasm/ChangeLog b/libasm/ChangeLog index 1684688b..6268b26c 100644 --- a/libasm/ChangeLog +++ b/libasm/ChangeLog @@ -1,3 +1,7 @@ +2020-12-11 Dmitry V. Levin + + * Makefile.am (GCC_INCLUDE): Remove. + 2020-12-09 Dmitry V. Levin * Makefile.am (noinst_PROGRAMS): Rename to noinst_DATA. diff --git a/libasm/Makefile.am b/libasm/Makefile.am index 7eba81f9..c2b54811 100644 --- a/libasm/Makefile.am +++ b/libasm/Makefile.am @@ -30,7 +30,6 @@ include $(top_srcdir)/config/eu.am AM_CPPFLAGS += -I$(top_srcdir)/libelf -I$(top_srcdir)/libebl -I$(top_srcdir)/libdw -I$(top_srcdir)/libdwelf -GCC_INCLUDE = -I$(shell $(CC) -print-file-name=include) VERSION = 1 lib_LIBRARIES = libasm.a diff --git a/libelf/ChangeLog b/libelf/ChangeLog index 79c1a86c..38c0162a 100644 --- a/libelf/ChangeLog +++ b/libelf/ChangeLog @@ -1,3 +1,7 @@ +2020-12-11 Dmitry V. Levin + + * Makefile.am (GCC_INCLUDE): Remove. + 2020-12-09 Dmitry V. Levin * Makefile.am (noinst_PROGRAMS): Rename to noinst_DATA. diff --git a/libelf/Makefile.am b/libelf/Makefile.am index a5f9eaa4..560ed45f 100644 --- a/libelf/Makefile.am +++ b/libelf/Makefile.am @@ -31,7 +31,7 @@ include $(top_srcdir)/config/eu.am if BUILD_STATIC AM_CFLAGS += $(fpic_CFLAGS) endif -GCC_INCLUDE = -I$(shell $(CC) -print-file-name=include) + VERSION = 1 lib_LIBRARIES = libelf.a -- ldv
[PATCH] configure.ac: fix typo in error diagnostics
Fixes: da855fc9c ("Support building when fts and obstack aren't part of libc") Signed-off-by: Dmitry V. Levin --- ChangeLog| 4 configure.ac | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 71e80a25..563af0d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2020-12-11 Dmitry V. Levin + + * configure.ac (AC_MSG_FAILURE): Fix typo. + 2020-11-30 Dmitry V. Levin * configure.ac (LIBDEBUGINFOD_SONAME): New AC_SUBST variable. diff --git a/configure.ac b/configure.ac index 2f7316e8..6c3e05bf 100644 --- a/configure.ac +++ b/configure.ac @@ -559,7 +559,7 @@ saved_LIBS="$LIBS" AC_SEARCH_LIBS([_obstack_free], [obstack]) LIBS="$saved_LIBS" case "$ac_cv_search__obstack_free" in -no) AC_MSG_FAILURE([failed to find obstack_free]) ;; +no) AC_MSG_FAILURE([failed to find _obstack_free]) ;; -l*) obstack_LIBS="$ac_cv_search__obstack_free" ;; *) obstack_LIBS= ;; esac -- ldv
[PATCH] configure.ac: simplify argp check
Rewrite argp check using the same AC_SEARCH_LIBS based method used earlier in the fts check. Signed-off-by: Dmitry V. Levin --- ChangeLog| 2 ++ configure.ac | 31 --- 2 files changed, 10 insertions(+), 23 deletions(-) diff --git a/ChangeLog b/ChangeLog index 563af0d2..def6279a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2020-12-11 Dmitry V. Levin + * configure.ac: Rewrite argp check. + * configure.ac (AC_MSG_FAILURE): Fix typo. 2020-11-30 Dmitry V. Levin diff --git a/configure.ac b/configure.ac index 6c3e05bf..392f9155 100644 --- a/configure.ac +++ b/configure.ac @@ -520,29 +520,14 @@ if test "$ac_cv_implicit_fallthrough" = "yes"; then [Defined if __attribute__((fallthrough)) is supported]) fi -dnl Check if we have argp available from our libc -AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [#include ], - [int argc=1; char *argv[]={"test"}; argp_parse(0,argc,&argv,0,0,0); return 0;] - )], - [libc_has_argp="true"], - [libc_has_argp="false"] -) - -dnl If our libc doesn't provide argp, then test for libargp -if test "$libc_has_argp" = "false" ; then - AC_MSG_WARN("libc does not have argp") - AC_CHECK_LIB([argp], [argp_parse], [have_argp="true"], [have_argp="false"]) - - if test "$have_argp" = "false"; then - AC_MSG_ERROR("no libargp found") - else - argp_LDADD="-largp" - fi -else - argp_LDADD="" -fi +saved_LIBS="$LIBS" +AC_SEARCH_LIBS([argp_parse], [argp]) +LIBS="$saved_LIBS" +case "$ac_cv_search_argp_parse" in +no) AC_MSG_FAILURE([failed to find argp_parse]) ;; +-l*) argp_LDADD="$ac_cv_search_argp_parse" ;; +*) argp_LDADD= ;; +esac AC_SUBST([argp_LDADD]) saved_LIBS="$LIBS" -- ldv
[PATCH] Remove unused tests/configure.ac
tests/configure.ac was introduced 15 years ago by commit d7f8d0caa7a357f9f4765e5dc93255f5057eba2e. However, the ability to build tests as a separate project was broken by the same author 4 years later by commit 22359e265395fd2f8267190ef97f5417770e6206, if not earlier. An attempt to run autoreconf in tests would currently fail with the following automake error: automake: error: cannot open < config/eu.am: No such file or directory Apparently, nobody builds tests as a separate project for more than 10 years, so cleanup the remains of that unused and broken code. Signed-off-by: Dmitry V. Levin --- ChangeLog | 2 ++ configure.ac | 2 -- tests/ChangeLog| 9 +++ tests/Makefile.am | 36 ++-- tests/configure.ac | 58 -- 5 files changed, 18 insertions(+), 89 deletions(-) delete mode 100644 tests/configure.ac diff --git a/ChangeLog b/ChangeLog index def6279a..92efa22f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2020-12-11 Dmitry V. Levin + * configure.ac (AM_CONDITIONAL): Remove HAVE_LIBASM and STANDALONE. + * configure.ac: Rewrite argp check. * configure.ac (AC_MSG_FAILURE): Fix typo. diff --git a/configure.ac b/configure.ac index 392f9155..ed11d249 100644 --- a/configure.ac +++ b/configure.ac @@ -577,7 +577,6 @@ dnl CPU handling library. AC_CONFIG_FILES([libcpu/Makefile]) dnl Assembler library. -AM_CONDITIONAL(HAVE_LIBASM, true)dnl Used in tests/Makefile.am, which see. AC_CONFIG_FILES([libasm/Makefile]) dnl CPU-specific backend libraries. @@ -587,7 +586,6 @@ dnl Tools. AC_CONFIG_FILES([src/Makefile po/Makefile.in]) dnl Test suite. -AM_CONDITIONAL(STANDALONE, false)dnl Used in tests/Makefile.am, which see. AC_CONFIG_FILES([tests/Makefile]) dnl pkgconfig files diff --git a/tests/ChangeLog b/tests/ChangeLog index f5adc315..a3813ddc 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,12 @@ +2020-12-11 Dmitry V. Levin + + * configure.ac: Remove. + * Makefile.am [STANDALONE]: Remove. + (check_PROGRAMS): Add msg_tst, system-elf-libelf-test, and $(asm_TESTS) + unconditionally. + (TESTS): Add msg_tst, system-elf-libelf-test, $(asm_TESTS), and + run-disasm-bpf.sh unconditionally. + 2020-11-23 Frank Ch. Eigler * run-debuginfod-find.sh: Add sqlite error injection & stats. diff --git a/tests/Makefile.am b/tests/Makefile.am index 84f6e88e..3cca2251 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -19,15 +19,11 @@ include $(top_srcdir)/config/eu.am BUILD_RPATH = \$$ORIGIN/../libasm:\$$ORIGIN/../libdw:\$$ORIGIN/../backends:\$$ORIGIN/../libelf -AM_LDFLAGS = - -if !STANDALONE AM_CPPFLAGS += -I$(top_srcdir)/libasm -I$(top_srcdir)/libdw \ -I$(top_srcdir)/libdwfl -I$(top_srcdir)/libdwelf \ -I$(top_srcdir)/libebl -I$(top_srcdir)/libelf \ -I$(top_srcdir)/lib -I.. -AM_LDFLAGS += -Wl,-rpath-link,../libasm:../libdw:../libelf -endif +AM_LDFLAGS = -Wl,-rpath-link,../libasm:../libdw:../libelf if TESTS_RPATH AM_LDFLAGS += -Wl,-rpath,$(BUILD_RPATH) @@ -63,7 +59,9 @@ check_PROGRAMS = arextract arsymtest newfile saridx scnnames sectiondump \ all-dwarf-ranges unit-info next_cfi \ elfcopy addsections xlate_notes elfrdwrnop \ dwelf_elf_e_machine_string \ - getphdrnum leb128 read_unaligned + getphdrnum leb128 read_unaligned \ + msg_tst system-elf-libelf-test \ + $(asm_TESTS) asm_TESTS = asm-tst1 asm-tst2 asm-tst3 asm-tst4 asm-tst5 \ asm-tst6 asm-tst7 asm-tst8 asm-tst9 @@ -186,7 +184,9 @@ TESTS = run-arextract.sh run-arsymtest.sh run-ar.sh newfile test-nlist \ run-disasm-riscv64.sh \ run-pt_gnu_prop-tests.sh \ run-getphdrnum.sh run-test-includes.sh \ - leb128 read_unaligned + leb128 read_unaligned \ + msg_tst system-elf-libelf-test \ + $(asm_TESTS) run-disasm-bpf.sh if !BIARCH export ELFUTILS_DISABLE_BIARCH = 1 @@ -196,11 +196,6 @@ if !DEMANGLE export ELFUTILS_DISABLE_DEMANGLE = 1 endif -if !STANDALONE -check_PROGRAMS += msg_tst system-elf-libelf-test -TESTS += msg_tst system-elf-libelf-test -endif - if LZMA TESTS += run-readelf-s.sh run-dwflsyms.sh endif @@ -209,11 +204,6 @@ if HAVE_ZSTD TESTS += run-readelf-compressed-zstd.sh endif -if HAVE_LIBASM -check_PROGRAMS += $(asm_TESTS) -TESTS += $(asm_TESTS) run-disasm-bpf.sh -endif - if DEBUGINFOD check_PROGRAMS += debuginfod_build_id_find # With the dummy delegation doesn't work @@ -539,10 +529,6 @@ installed_TESTS_ENVIRONMENT = libdir=$(DESTDIR)$(libdir); \ installed_LOG_COMPILER = $(abs_srcdir)/test-wrapper.sh \ installed $(tests_rpath) \ '$(program_transform_name)' -if STANDALONE -TESTS_ENVIRONMENT = $(installed_TESTS_ENVIRONMENT) -LOG_COMPILER = $(installed_LOG_COMPILER) -else !ST