public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Drop $(EXEEXT) suffix from shared libraries
@ 2020-11-30  8:00 Dmitry V. Levin
  2020-11-30 20:35 ` Mark Wielaard
  0 siblings, 1 reply; 14+ messages in thread
From: Dmitry V. Levin @ 2020-11-30  8:00 UTC (permalink / raw)
  To: elfutils-devel

According to GNU Automake documentation [1], $(EXEEXT) is the suffix
that should be used for executables, it is not applicable for shared libraries.

[1] https://www.gnu.org/software/automake/manual/html_node/EXEEXT.html

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
---
 debuginfod/ChangeLog   | 4 ++++
 debuginfod/Makefile.am | 2 +-
 libasm/ChangeLog       | 4 ++++
 libasm/Makefile.am     | 2 +-
 libdw/ChangeLog        | 4 ++++
 libdw/Makefile.am      | 2 +-
 libelf/ChangeLog       | 4 ++++
 libelf/Makefile.am     | 2 +-
 8 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/debuginfod/ChangeLog b/debuginfod/ChangeLog
index aaffac7c..3039371f 100644
--- a/debuginfod/ChangeLog
+++ b/debuginfod/ChangeLog
@@ -1,3 +1,7 @@
+2020-11-30  Dmitry V. Levin  <ldv@altlinux.org>
+
+	* Makefile.am (libdebuginfod.so$(EXEEXT)): Drop $(EXEEXT) suffix.
+
 2020-11-25  Frank Ch. Eigler  <fche@redhat.com>
 
 	* debuginfod.cxx (step_ok_done): Correct typo in prom metric label.
diff --git a/debuginfod/Makefile.am b/debuginfod/Makefile.am
index 0af3b58c..352b4915 100644
--- a/debuginfod/Makefile.am
+++ b/debuginfod/Makefile.am
@@ -100,7 +100,7 @@ libdebuginfod_so_LDLIBS =
 else
 libdebuginfod_so_LDLIBS = $(libcurl_LIBS) $(fts_LIBS)
 endif
-libdebuginfod.so$(EXEEXT): $(srcdir)/libdebuginfod.map $(libdebuginfod_so_LIBS)
+libdebuginfod.so: $(srcdir)/libdebuginfod.map $(libdebuginfod_so_LIBS)
 	$(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \
 		-Wl,--soname,$@.$(VERSION) \
 		-Wl,--version-script,$<,--no-undefined \
diff --git a/libasm/ChangeLog b/libasm/ChangeLog
index d7ab8c42..29c23bad 100644
--- a/libasm/ChangeLog
+++ b/libasm/ChangeLog
@@ -1,3 +1,7 @@
+2020-11-30  Dmitry V. Levin  <ldv@altlinux.org>
+
+	* Makefile.am (libasm.so$(EXEEXT)): Drop $(EXEEXT) suffix.
+
 2020-10-29  Mark Wielaard  <mark@klomp.org>
 
 	* asm_align.c (__libasm_ensure_section_space): Use calloc, not
diff --git a/libasm/Makefile.am b/libasm/Makefile.am
index b2bff929..4b55d530 100644
--- a/libasm/Makefile.am
+++ b/libasm/Makefile.am
@@ -63,7 +63,7 @@ endif
 
 libasm_so_LIBS = libasm_pic.a
 libasm_so_SOURCES =
-libasm.so$(EXEEXT): $(srcdir)/libasm.map $(libasm_so_LIBS) $(libasm_so_DEPS)
+libasm.so: $(srcdir)/libasm.map $(libasm_so_LIBS) $(libasm_so_DEPS)
 	$(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \
 		-Wl,--soname,$@.$(VERSION) \
 		-Wl,--version-script,$<,--no-undefined \
diff --git a/libdw/ChangeLog b/libdw/ChangeLog
index 6f8ebea6..fbe2abc0 100644
--- a/libdw/ChangeLog
+++ b/libdw/ChangeLog
@@ -1,3 +1,7 @@
+2020-11-30  Dmitry V. Levin  <ldv@altlinux.org>
+
+	* Makefile.am (libdw.so$(EXEEXT)): Drop $(EXEEXT) suffix.
+
 2020-11-01  Érico N. Rolim  <erico.erc@gmail.com>
 
 	* Makefile.am (libdw_so_LDLIBS): Add fts_LIBS.
diff --git a/libdw/Makefile.am b/libdw/Makefile.am
index 1dbb3d5e..f21ee6ae 100644
--- a/libdw/Makefile.am
+++ b/libdw/Makefile.am
@@ -111,7 +111,7 @@ libdw_so_LIBS = ../libebl/libebl_pic.a ../backends/libebl_backends_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$(EXEEXT): $(srcdir)/libdw.map $(libdw_so_LIBS) $(libdw_so_DEPS)
+libdw.so: $(srcdir)/libdw.map $(libdw_so_LIBS) $(libdw_so_DEPS)
 	$(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \
 		-Wl,--soname,$@.$(VERSION),--enable-new-dtags \
 		-Wl,--version-script,$<,--no-undefined \
diff --git a/libelf/ChangeLog b/libelf/ChangeLog
index d685872d..0a9e36a2 100644
--- a/libelf/ChangeLog
+++ b/libelf/ChangeLog
@@ -1,3 +1,7 @@
+2020-11-30  Dmitry V. Levin  <ldv@altlinux.org>
+
+	* Makefile.am (libelf.so$(EXEEXT)): Drop $(EXEEXT) suffix.
+
 2020-11-06  Mark Wielaard  <mark@klomp.org>
 
 	* elf-knowledge.h (SH_ENTSIZE_HASH): Update comment.
diff --git a/libelf/Makefile.am b/libelf/Makefile.am
index d5d63f73..f8f2afeb 100644
--- a/libelf/Makefile.am
+++ b/libelf/Makefile.am
@@ -113,7 +113,7 @@ endif
 
 libelf_so_LIBS = libelf_pic.a
 libelf_so_SOURCES =
-libelf.so$(EXEEXT): $(srcdir)/libelf.map $(libelf_so_LIBS) $(libelf_so_DEPS)
+libelf.so: $(srcdir)/libelf.map $(libelf_so_LIBS) $(libelf_so_DEPS)
 	$(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \
 		-Wl,--soname,$@.$(VERSION) \
 		-Wl,--version-script,$<,--no-undefined \
-- 
ldv

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] Drop $(EXEEXT) suffix from shared libraries
  2020-11-30  8:00 [PATCH] Drop $(EXEEXT) suffix from shared libraries Dmitry V. Levin
@ 2020-11-30 20:35 ` Mark Wielaard
  2020-12-06 11:49   ` Mark Wielaard
  0 siblings, 1 reply; 14+ messages in thread
From: Mark Wielaard @ 2020-11-30 20:35 UTC (permalink / raw)
  To: Dmitry V. Levin; +Cc: elfutils-devel, Ulf Hermann

On Mon, Nov 30, 2020 at 08:00:00AM +0000, Dmitry V. Levin wrote:
> According to GNU Automake documentation [1], $(EXEEXT) is the suffix
> that should be used for executables, it is not applicable for shared libraries.
> 
> [1] https://www.gnu.org/software/automake/manual/html_node/EXEEXT.html

I think you are right and this patch is correct.  This probably only
affects non-posix or windows setups.  Ulf (on CC now) was working on
building on windows (although I think we never integrated all the
patches for that). Maybe he has an opinion on this patch?

Thanks,

Mark

> Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
> ---
>  debuginfod/ChangeLog   | 4 ++++
>  debuginfod/Makefile.am | 2 +-
>  libasm/ChangeLog       | 4 ++++
>  libasm/Makefile.am     | 2 +-
>  libdw/ChangeLog        | 4 ++++
>  libdw/Makefile.am      | 2 +-
>  libelf/ChangeLog       | 4 ++++
>  libelf/Makefile.am     | 2 +-
>  8 files changed, 20 insertions(+), 4 deletions(-)
> 
> diff --git a/debuginfod/ChangeLog b/debuginfod/ChangeLog
> index aaffac7c..3039371f 100644
> --- a/debuginfod/ChangeLog
> +++ b/debuginfod/ChangeLog
> @@ -1,3 +1,7 @@
> +2020-11-30  Dmitry V. Levin  <ldv@altlinux.org>
> +
> +	* Makefile.am (libdebuginfod.so$(EXEEXT)): Drop $(EXEEXT) suffix.
> +
>  2020-11-25  Frank Ch. Eigler  <fche@redhat.com>
>  
>  	* debuginfod.cxx (step_ok_done): Correct typo in prom metric label.
> diff --git a/debuginfod/Makefile.am b/debuginfod/Makefile.am
> index 0af3b58c..352b4915 100644
> --- a/debuginfod/Makefile.am
> +++ b/debuginfod/Makefile.am
> @@ -100,7 +100,7 @@ libdebuginfod_so_LDLIBS =
>  else
>  libdebuginfod_so_LDLIBS = $(libcurl_LIBS) $(fts_LIBS)
>  endif
> -libdebuginfod.so$(EXEEXT): $(srcdir)/libdebuginfod.map $(libdebuginfod_so_LIBS)
> +libdebuginfod.so: $(srcdir)/libdebuginfod.map $(libdebuginfod_so_LIBS)
>  	$(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \
>  		-Wl,--soname,$@.$(VERSION) \
>  		-Wl,--version-script,$<,--no-undefined \
> diff --git a/libasm/ChangeLog b/libasm/ChangeLog
> index d7ab8c42..29c23bad 100644
> --- a/libasm/ChangeLog
> +++ b/libasm/ChangeLog
> @@ -1,3 +1,7 @@
> +2020-11-30  Dmitry V. Levin  <ldv@altlinux.org>
> +
> +	* Makefile.am (libasm.so$(EXEEXT)): Drop $(EXEEXT) suffix.
> +
>  2020-10-29  Mark Wielaard  <mark@klomp.org>
>  
>  	* asm_align.c (__libasm_ensure_section_space): Use calloc, not
> diff --git a/libasm/Makefile.am b/libasm/Makefile.am
> index b2bff929..4b55d530 100644
> --- a/libasm/Makefile.am
> +++ b/libasm/Makefile.am
> @@ -63,7 +63,7 @@ endif
>  
>  libasm_so_LIBS = libasm_pic.a
>  libasm_so_SOURCES =
> -libasm.so$(EXEEXT): $(srcdir)/libasm.map $(libasm_so_LIBS) $(libasm_so_DEPS)
> +libasm.so: $(srcdir)/libasm.map $(libasm_so_LIBS) $(libasm_so_DEPS)
>  	$(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \
>  		-Wl,--soname,$@.$(VERSION) \
>  		-Wl,--version-script,$<,--no-undefined \
> diff --git a/libdw/ChangeLog b/libdw/ChangeLog
> index 6f8ebea6..fbe2abc0 100644
> --- a/libdw/ChangeLog
> +++ b/libdw/ChangeLog
> @@ -1,3 +1,7 @@
> +2020-11-30  Dmitry V. Levin  <ldv@altlinux.org>
> +
> +	* Makefile.am (libdw.so$(EXEEXT)): Drop $(EXEEXT) suffix.
> +
>  2020-11-01  Érico N. Rolim  <erico.erc@gmail.com>
>  
>  	* Makefile.am (libdw_so_LDLIBS): Add fts_LIBS.
> diff --git a/libdw/Makefile.am b/libdw/Makefile.am
> index 1dbb3d5e..f21ee6ae 100644
> --- a/libdw/Makefile.am
> +++ b/libdw/Makefile.am
> @@ -111,7 +111,7 @@ libdw_so_LIBS = ../libebl/libebl_pic.a ../backends/libebl_backends_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$(EXEEXT): $(srcdir)/libdw.map $(libdw_so_LIBS) $(libdw_so_DEPS)
> +libdw.so: $(srcdir)/libdw.map $(libdw_so_LIBS) $(libdw_so_DEPS)
>  	$(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \
>  		-Wl,--soname,$@.$(VERSION),--enable-new-dtags \
>  		-Wl,--version-script,$<,--no-undefined \
> diff --git a/libelf/ChangeLog b/libelf/ChangeLog
> index d685872d..0a9e36a2 100644
> --- a/libelf/ChangeLog
> +++ b/libelf/ChangeLog
> @@ -1,3 +1,7 @@
> +2020-11-30  Dmitry V. Levin  <ldv@altlinux.org>
> +
> +	* Makefile.am (libelf.so$(EXEEXT)): Drop $(EXEEXT) suffix.
> +
>  2020-11-06  Mark Wielaard  <mark@klomp.org>
>  
>  	* elf-knowledge.h (SH_ENTSIZE_HASH): Update comment.
> diff --git a/libelf/Makefile.am b/libelf/Makefile.am
> index d5d63f73..f8f2afeb 100644
> --- a/libelf/Makefile.am
> +++ b/libelf/Makefile.am
> @@ -113,7 +113,7 @@ endif
>  
>  libelf_so_LIBS = libelf_pic.a
>  libelf_so_SOURCES =
> -libelf.so$(EXEEXT): $(srcdir)/libelf.map $(libelf_so_LIBS) $(libelf_so_DEPS)
> +libelf.so: $(srcdir)/libelf.map $(libelf_so_LIBS) $(libelf_so_DEPS)
>  	$(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \
>  		-Wl,--soname,$@.$(VERSION) \
>  		-Wl,--version-script,$<,--no-undefined \
> -- 
> ldv

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] Drop $(EXEEXT) suffix from shared libraries
  2020-11-30 20:35 ` Mark Wielaard
@ 2020-12-06 11:49   ` Mark Wielaard
  2020-12-09 19:55     ` Mark Wielaard
  0 siblings, 1 reply; 14+ messages in thread
From: Mark Wielaard @ 2020-12-06 11:49 UTC (permalink / raw)
  To: Dmitry V. Levin; +Cc: elfutils-devel, Ulf Hermann

On Mon, 2020-11-30 at 21:35 +0100, Mark Wielaard wrote:
> On Mon, Nov 30, 2020 at 08:00:00AM +0000, Dmitry V. Levin wrote:
> > According to GNU Automake documentation [1], $(EXEEXT) is the
> > suffix
> > that should be used for executables, it is not applicable for
> > shared libraries.
> > 
> > [1] 
> > https://www.gnu.org/software/automake/manual/html_node/EXEEXT.html
> 
> I think you are right and this patch is correct.  This probably only
> affects non-posix or windows setups.  Ulf (on CC now) was working on
> building on windows (although I think we never integrated all the
> patches for that). Maybe he has an opinion on this patch?

Lets assume that no objection equals patch is good (for now, we can
always revert or change it later of course).

Pushed.

Thanks,

Mark

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] Drop $(EXEEXT) suffix from shared libraries
  2020-12-06 11:49   ` Mark Wielaard
@ 2020-12-09 19:55     ` Mark Wielaard
  2020-12-09 22:04       ` Dmitry V. Levin
  0 siblings, 1 reply; 14+ messages in thread
From: Mark Wielaard @ 2020-12-09 19:55 UTC (permalink / raw)
  To: Dmitry V. Levin; +Cc: elfutils-devel

On Sun, 2020-12-06 at 12:49 +0100, Mark Wielaard wrote:
> On Mon, 2020-11-30 at 21:35 +0100, Mark Wielaard wrote:
> > On Mon, Nov 30, 2020 at 08:00:00AM +0000, Dmitry V. Levin wrote:
> > > According to GNU Automake documentation [1], $(EXEEXT) is the
> > > suffix
> > > that should be used for executables, it is not applicable for
> > > shared libraries.
> > > 
> > > [1] 
> > > https://www.gnu.org/software/automake/manual/html_node/EXEEXT.html
> > 
> > I think you are right and this patch is correct.  This probably only
> > affects non-posix or windows setups.  Ulf (on CC now) was working on
> > building on windows (although I think we never integrated all the
> > patches for that). Maybe he has an opinion on this patch?
> 
> Lets assume that no objection equals patch is good (for now, we can
> always revert or change it later of course).

hmmm, I do now get warnings from autoreconf 2.69:

autoreconf: running: automake --add-missing --copy --force-missing
libasm/Makefile.am:66: warning: deprecated feature: target 'libasm.so' overrides 'libasm.so$(EXEEXT)'
libasm/Makefile.am:66: change your target to read 'libasm.so$(EXEEXT)'
/usr/share/automake-1.13/am/program.am: target 'libasm.so$(EXEEXT)' was defined here
libasm/Makefile.am:37:   while processing program 'libasm.so'
libdw/Makefile.am:114: warning: deprecated feature: target 'libdw.so' overrides 'libdw.so$(EXEEXT)'
libdw/Makefile.am:114: change your target to read 'libdw.so$(EXEEXT)'
/usr/share/automake-1.13/am/program.am: target 'libdw.so$(EXEEXT)' was defined here
libdw/Makefile.am:38:   while processing program 'libdw.so'
libelf/Makefile.am:116: warning: deprecated feature: target 'libelf.so' overrides 'libelf.so$(EXEEXT)'
libelf/Makefile.am:116: change your target to read 'libelf.so$(EXEEXT)'
/usr/share/automake-1.13/am/program.am: target 'libelf.so$(EXEEXT)' was defined here
libelf/Makefile.am:38:   while processing program 'libelf.so'
autoreconf: Leaving directory `.'

Is this because I am using automake 1.13 and I really should upgrade to
something newer? Or do newer automakes also yell and scream about this?

Thanks,

Mark

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] Drop $(EXEEXT) suffix from shared libraries
  2020-12-09 19:55     ` Mark Wielaard
@ 2020-12-09 22:04       ` Dmitry V. Levin
  2020-12-09 22:20         ` Dmitry V. Levin
  0 siblings, 1 reply; 14+ messages in thread
From: Dmitry V. Levin @ 2020-12-09 22:04 UTC (permalink / raw)
  To: Mark Wielaard; +Cc: elfutils-devel

On Wed, Dec 09, 2020 at 08:55:23PM +0100, Mark Wielaard wrote:
> On Sun, 2020-12-06 at 12:49 +0100, Mark Wielaard wrote:
> > On Mon, 2020-11-30 at 21:35 +0100, Mark Wielaard wrote:
> > > On Mon, Nov 30, 2020 at 08:00:00AM +0000, Dmitry V. Levin wrote:
> > > > According to GNU Automake documentation [1], $(EXEEXT) is the
> > > > suffix
> > > > that should be used for executables, it is not applicable for
> > > > shared libraries.
> > > > 
> > > > [1] 
> > > > https://www.gnu.org/software/automake/manual/html_node/EXEEXT.html
> > > 
> > > I think you are right and this patch is correct.  This probably only
> > > affects non-posix or windows setups.  Ulf (on CC now) was working on
> > > building on windows (although I think we never integrated all the
> > > patches for that). Maybe he has an opinion on this patch?
> > 
> > Lets assume that no objection equals patch is good (for now, we can
> > always revert or change it later of course).
> 
> hmmm, I do now get warnings from autoreconf 2.69:
> 
> autoreconf: running: automake --add-missing --copy --force-missing
> libasm/Makefile.am:66: warning: deprecated feature: target 'libasm.so' overrides 'libasm.so$(EXEEXT)'
> libasm/Makefile.am:66: change your target to read 'libasm.so$(EXEEXT)'
> /usr/share/automake-1.13/am/program.am: target 'libasm.so$(EXEEXT)' was defined here
> libasm/Makefile.am:37:   while processing program 'libasm.so'
> libdw/Makefile.am:114: warning: deprecated feature: target 'libdw.so' overrides 'libdw.so$(EXEEXT)'
> libdw/Makefile.am:114: change your target to read 'libdw.so$(EXEEXT)'
> /usr/share/automake-1.13/am/program.am: target 'libdw.so$(EXEEXT)' was defined here
> libdw/Makefile.am:38:   while processing program 'libdw.so'
> libelf/Makefile.am:116: warning: deprecated feature: target 'libelf.so' overrides 'libelf.so$(EXEEXT)'
> libelf/Makefile.am:116: change your target to read 'libelf.so$(EXEEXT)'
> /usr/share/automake-1.13/am/program.am: target 'libelf.so$(EXEEXT)' was defined here
> libelf/Makefile.am:38:   while processing program 'libelf.so'
> autoreconf: Leaving directory `.'
> 
> Is this because I am using automake 1.13 and I really should upgrade to
> something newer? Or do newer automakes also yell and scream about this?

I see the same set of warnings with automake 1.16.3 too, although 
for some reason there are no complains about libdebuginfod.so target.

There must be something odd with automake, I'll have a look.


-- 
ldv

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] Drop $(EXEEXT) suffix from shared libraries
  2020-12-09 22:04       ` Dmitry V. Levin
@ 2020-12-09 22:20         ` Dmitry V. Levin
  2020-12-09 22:42           ` Mark Wielaard
  0 siblings, 1 reply; 14+ messages in thread
From: Dmitry V. Levin @ 2020-12-09 22:20 UTC (permalink / raw)
  To: Mark Wielaard; +Cc: elfutils-devel

On Thu, Dec 10, 2020 at 01:04:14AM +0300, Dmitry V. Levin wrote:
> On Wed, Dec 09, 2020 at 08:55:23PM +0100, Mark Wielaard wrote:
> > On Sun, 2020-12-06 at 12:49 +0100, Mark Wielaard wrote:
> > > On Mon, 2020-11-30 at 21:35 +0100, Mark Wielaard wrote:
> > > > On Mon, Nov 30, 2020 at 08:00:00AM +0000, Dmitry V. Levin wrote:
> > > > > According to GNU Automake documentation [1], $(EXEEXT) is the
> > > > > suffix
> > > > > that should be used for executables, it is not applicable for
> > > > > shared libraries.
> > > > > 
> > > > > [1] 
> > > > > https://www.gnu.org/software/automake/manual/html_node/EXEEXT.html
> > > > 
> > > > I think you are right and this patch is correct.  This probably only
> > > > affects non-posix or windows setups.  Ulf (on CC now) was working on
> > > > building on windows (although I think we never integrated all the
> > > > patches for that). Maybe he has an opinion on this patch?
> > > 
> > > Lets assume that no objection equals patch is good (for now, we can
> > > always revert or change it later of course).
> > 
> > hmmm, I do now get warnings from autoreconf 2.69:
> > 
> > autoreconf: running: automake --add-missing --copy --force-missing
> > libasm/Makefile.am:66: warning: deprecated feature: target 'libasm.so' overrides 'libasm.so$(EXEEXT)'
> > libasm/Makefile.am:66: change your target to read 'libasm.so$(EXEEXT)'
> > /usr/share/automake-1.13/am/program.am: target 'libasm.so$(EXEEXT)' was defined here
> > libasm/Makefile.am:37:   while processing program 'libasm.so'
> > libdw/Makefile.am:114: warning: deprecated feature: target 'libdw.so' overrides 'libdw.so$(EXEEXT)'
> > libdw/Makefile.am:114: change your target to read 'libdw.so$(EXEEXT)'
> > /usr/share/automake-1.13/am/program.am: target 'libdw.so$(EXEEXT)' was defined here
> > libdw/Makefile.am:38:   while processing program 'libdw.so'
> > libelf/Makefile.am:116: warning: deprecated feature: target 'libelf.so' overrides 'libelf.so$(EXEEXT)'
> > libelf/Makefile.am:116: change your target to read 'libelf.so$(EXEEXT)'
> > /usr/share/automake-1.13/am/program.am: target 'libelf.so$(EXEEXT)' was defined here
> > libelf/Makefile.am:38:   while processing program 'libelf.so'
> > autoreconf: Leaving directory `.'
> > 
> > Is this because I am using automake 1.13 and I really should upgrade to
> > something newer? Or do newer automakes also yell and scream about this?
> 
> I see the same set of warnings with automake 1.16.3 too, although 
> for some reason there are no complains about libdebuginfod.so target.
> 
> There must be something odd with automake, I'll have a look.

OK, there was no mystery at all:

$ git grep '_PROGRAMS.*_LIBRARIES'
libasm/Makefile.am:noinst_PROGRAMS = $(noinst_LIBRARIES:_pic.a=.so)
libdw/Makefile.am:noinst_PROGRAMS = $(noinst_LIBRARIES:_pic.a=.so)
libelf/Makefile.am:noinst_PROGRAMS = $(noinst_LIBRARIES:_pic.a=.so)

In other words, automake was told that libasm.so, libdw.so, and libelf.so
are noinst_PROGRAMS, and rightfully decided that they shall have $(EXEEXT)
suffix.

What was the reason for including these libraries into noinst_PROGRAMS?


-- 
ldv

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] Drop $(EXEEXT) suffix from shared libraries
  2020-12-09 22:20         ` Dmitry V. Levin
@ 2020-12-09 22:42           ` Mark Wielaard
  2020-12-09 23:09             ` Dmitry V. Levin
  0 siblings, 1 reply; 14+ messages in thread
From: Mark Wielaard @ 2020-12-09 22:42 UTC (permalink / raw)
  To: Dmitry V. Levin; +Cc: elfutils-devel

Hi Dmitry,

On Thu, 2020-12-10 at 01:20 +0300, Dmitry V. Levin wrote:
> OK, there was no mystery at all:
> 
> $ git grep '_PROGRAMS.*_LIBRARIES'
> libasm/Makefile.am:noinst_PROGRAMS = $(noinst_LIBRARIES:_pic.a=.so)
> libdw/Makefile.am:noinst_PROGRAMS = $(noinst_LIBRARIES:_pic.a=.so)
> libelf/Makefile.am:noinst_PROGRAMS = $(noinst_LIBRARIES:_pic.a=.so)
> 
> In other words, automake was told that libasm.so, libdw.so, and libelf.so
> are noinst_PROGRAMS, and rightfully decided that they shall have $(EXEEXT)
> suffix.
> 
> What was the reason for including these libraries into noinst_PROGRAMS?

Unfortunately our version control only goes back 15 years and this
particular change was from before that. I think they are noinst because
they have explicit install rules. But it probably should have been
noinst_DATA instead. The old backends libraries (when we would still
create and install that before commit 4f937e24d) used noinst_DATA
instead.

But using noinst_DATA instead gives the following warnings:

libasm/Makefile.am:66: warning: variable 'libasm_so_SOURCES' is defined but no program or
libasm/Makefile.am:66: library has 'libasm_so' as canonical name (possible typo)
libdw/Makefile.am:114: warning: variable 'libdw_so_SOURCES' is defined but no program or
libdw/Makefile.am:114: library has 'libdw_so' as canonical name (possible typo)
libelf/Makefile.am:116: warning: variable 'libelf_so_SOURCES' is defined but no program or
libelf/Makefile.am:116: library has 'libelf_so' as canonical name (possible typo)

And just adding them to noinst_LIBRARIES says:

libasm/Makefile.am:37: error: 'libasm.so' is not a standard library name
libasm/Makefile.am:37: did you mean 'libasm.a'?
libdw/Makefile.am:38: error: 'libdw.so' is not a standard library name
libdw/Makefile.am:38: did you mean 'libdw.a'?
libelf/Makefile.am:38: error: 'libelf.so' is not a standard library name
libelf/Makefile.am:38: did you mean 'libelf.a'?

Hohum. I don't know what the correct hack/tweak is in this case.

Cheers,

Mark

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] Drop $(EXEEXT) suffix from shared libraries
  2020-12-09 22:42           ` Mark Wielaard
@ 2020-12-09 23:09             ` Dmitry V. Levin
  2020-12-09 23:34               ` [PATCH] Fix automake warnings Dmitry V. Levin
  0 siblings, 1 reply; 14+ messages in thread
From: Dmitry V. Levin @ 2020-12-09 23:09 UTC (permalink / raw)
  To: Mark Wielaard; +Cc: elfutils-devel

On Wed, Dec 09, 2020 at 11:42:44PM +0100, Mark Wielaard wrote:
> Hi Dmitry,
> 
> On Thu, 2020-12-10 at 01:20 +0300, Dmitry V. Levin wrote:
> > OK, there was no mystery at all:
> > 
> > $ git grep '_PROGRAMS.*_LIBRARIES'
> > libasm/Makefile.am:noinst_PROGRAMS = $(noinst_LIBRARIES:_pic.a=.so)
> > libdw/Makefile.am:noinst_PROGRAMS = $(noinst_LIBRARIES:_pic.a=.so)
> > libelf/Makefile.am:noinst_PROGRAMS = $(noinst_LIBRARIES:_pic.a=.so)
> > 
> > In other words, automake was told that libasm.so, libdw.so, and libelf.so
> > are noinst_PROGRAMS, and rightfully decided that they shall have $(EXEEXT)
> > suffix.
> > 
> > What was the reason for including these libraries into noinst_PROGRAMS?
> 
> Unfortunately our version control only goes back 15 years and this
> particular change was from before that. I think they are noinst because
> they have explicit install rules. But it probably should have been
> noinst_DATA instead. The old backends libraries (when we would still
> create and install that before commit 4f937e24d) used noinst_DATA
> instead.
> 
> But using noinst_DATA instead gives the following warnings:
> 
> libasm/Makefile.am:66: warning: variable 'libasm_so_SOURCES' is defined but no program or
> libasm/Makefile.am:66: library has 'libasm_so' as canonical name (possible typo)
> libdw/Makefile.am:114: warning: variable 'libdw_so_SOURCES' is defined but no program or
> libdw/Makefile.am:114: library has 'libdw_so' as canonical name (possible typo)
> libelf/Makefile.am:116: warning: variable 'libelf_so_SOURCES' is defined but no program or
> libelf/Makefile.am:116: library has 'libelf_so' as canonical name (possible typo)

Apparently, these lib*_so_SOURCES are no longer needed with noinst_DATA
and could be safely removed.  At least it works for me this way with
automake 1.16.3.


-- 
ldv

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH] Fix automake warnings
  2020-12-09 23:09             ` Dmitry V. Levin
@ 2020-12-09 23:34               ` Dmitry V. Levin
  2020-12-10 10:09                 ` Mark Wielaard
  0 siblings, 1 reply; 14+ messages in thread
From: Dmitry V. Levin @ 2020-12-09 23:34 UTC (permalink / raw)
  To: Mark Wielaard; +Cc: elfutils-devel

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.

Reported-by: Mark Wielaard <mark@klomp.org>
Fixes: 2f02e8151094 ("Drop $(EXEEXT) suffix from shared libraries")
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
---
 libasm/ChangeLog   | 5 +++++
 libasm/Makefile.am | 3 +--
 libdw/ChangeLog    | 5 +++++
 libdw/Makefile.am  | 3 +--
 libelf/ChangeLog   | 5 +++++
 libelf/Makefile.am | 3 +--
 6 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/libasm/ChangeLog b/libasm/ChangeLog
index 29c23bad..427aa741 100644
--- a/libasm/ChangeLog
+++ b/libasm/ChangeLog
@@ -1,3 +1,8 @@
+2020-12-09  Dmitry V. Levin  <ldv@altlinux.org>
+
+	* Makefile.am (noinst_PROGRAMS): Rename to noinst_DATA.
+	(libasm_so_SOURCES): Remove.
+
 2020-11-30  Dmitry V. Levin  <ldv@altlinux.org>
 
 	* Makefile.am (libasm.so$(EXEEXT)): Drop $(EXEEXT) suffix.
diff --git a/libasm/Makefile.am b/libasm/Makefile.am
index 4b55d530..b50fd947 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) \
diff --git a/libdw/ChangeLog b/libdw/ChangeLog
index fbe2abc0..3eefcc86 100644
--- a/libdw/ChangeLog
+++ b/libdw/ChangeLog
@@ -1,3 +1,8 @@
+2020-12-09  Dmitry V. Levin  <ldv@altlinux.org>
+
+	* Makefile.am (noinst_PROGRAMS): Rename to noinst_DATA.
+	(libdw_so_SOURCES): Remove.
+
 2020-11-30  Dmitry V. Levin  <ldv@altlinux.org>
 
 	* Makefile.am (libdw.so$(EXEEXT)): Drop $(EXEEXT) suffix.
diff --git a/libdw/Makefile.am b/libdw/Makefile.am
index f21ee6ae..cc18a3d1 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 \
diff --git a/libelf/ChangeLog b/libelf/ChangeLog
index 0a9e36a2..646a3429 100644
--- a/libelf/ChangeLog
+++ b/libelf/ChangeLog
@@ -1,3 +1,8 @@
+2020-12-09  Dmitry V. Levin  <ldv@altlinux.org>
+
+	* Makefile.am (noinst_PROGRAMS): Rename to noinst_DATA.
+	(libelf_so_SOURCES): Remove.
+
 2020-11-30  Dmitry V. Levin  <ldv@altlinux.org>
 
 	* Makefile.am (libelf.so$(EXEEXT)): Drop $(EXEEXT) suffix.
diff --git a/libelf/Makefile.am b/libelf/Makefile.am
index f8f2afeb..31046d18 100644
--- a/libelf/Makefile.am
+++ b/libelf/Makefile.am
@@ -36,7 +36,7 @@ VERSION = 1
 
 lib_LIBRARIES = libelf.a
 noinst_LIBRARIES = libelf_pic.a
-noinst_PROGRAMS = $(noinst_LIBRARIES:_pic.a=.so)
+noinst_DATA = $(noinst_LIBRARIES:_pic.a=.so)
 include_HEADERS = libelf.h gelf.h nlist.h
 
 noinst_HEADERS = abstract.h common.h exttypes.h gelf_xlate.h libelfP.h \
@@ -112,7 +112,6 @@ libelf_so_LDLIBS += -lpthread
 endif
 
 libelf_so_LIBS = libelf_pic.a
-libelf_so_SOURCES =
 libelf.so: $(srcdir)/libelf.map $(libelf_so_LIBS) $(libelf_so_DEPS)
 	$(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \
 		-Wl,--soname,$@.$(VERSION) \
-- 
ldv

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] Fix automake warnings
  2020-12-09 23:34               ` [PATCH] Fix automake warnings Dmitry V. Levin
@ 2020-12-10 10:09                 ` Mark Wielaard
  2020-12-10 10:30                   ` Dmitry V. Levin
  0 siblings, 1 reply; 14+ messages in thread
From: Mark Wielaard @ 2020-12-10 10:09 UTC (permalink / raw)
  To: Dmitry V. Levin; +Cc: elfutils-devel

[-- Attachment #1: Type: text/plain, Size: 1100 bytes --]

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

[-- Attachment #2: 0001-Fix-automake-warnings.patch --]
[-- Type: text/x-patch, Size: 5545 bytes --]

From 3ca5ef319500129ed574596f178c4a4667b9ed3b Mon Sep 17 00:00:00 2001
From: "Dmitry V. Levin" <ldv@altlinux.org>
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 <ldv@altlinux.org>
Signed-off-by: Mark Wielaard <mark@klomp.org>
---
 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  <ldv@altlinux.org>
+
+	* Makefile.am (noinst_PROGRAMS): Rename to noinst_DATA.
+	(libasm_so_SOURCES): Remove.
+	(CLEANFILES): Add libelf.so.
+
 2020-11-30  Dmitry V. Levin  <ldv@altlinux.org>
 
 	* 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  <ldv@altlinux.org>
+
+	* Makefile.am (noinst_PROGRAMS): Rename to noinst_DATA.
+	(libdw_so_SOURCES): Remove.
+	(MOSTLYCLEANFILES): Add libdw.so.
+
 2020-11-30  Dmitry V. Levin  <ldv@altlinux.org>
 
 	* 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.map
 
-MOSTLYCLEANFILES = $(am_libdw_pic_a_OBJECTS) libdw.so.$(VERSION)
+MOSTLYCLEANFILES = $(am_libdw_pic_a_OBJECTS) libdw.so libdw.so.$(VERSION)
diff --git a/libelf/ChangeLog b/libelf/ChangeLog
index 0a9e36a2..edb6a020 100644
--- a/libelf/ChangeLog
+++ b/libelf/ChangeLog
@@ -1,3 +1,9 @@
+2020-12-09  Dmitry V. Levin  <ldv@altlinux.org>
+
+	* Makefile.am (noinst_PROGRAMS): Rename to noinst_DATA.
+	(libelf_so_SOURCES): Remove.
+	(CLEANFILES): Add libasm.so.
+
 2020-11-30  Dmitry V. Levin  <ldv@altlinux.org>
 
 	* Makefile.am (libelf.so$(EXEEXT)): Drop $(EXEEXT) suffix.
diff --git a/libelf/Makefile.am b/libelf/Makefile.am
index f8f2afeb..a5f9eaa4 100644
--- a/libelf/Makefile.am
+++ b/libelf/Makefile.am
@@ -36,7 +36,7 @@ VERSION = 1
 
 lib_LIBRARIES = libelf.a
 noinst_LIBRARIES = libelf_pic.a
-noinst_PROGRAMS = $(noinst_LIBRARIES:_pic.a=.so)
+noinst_DATA = $(noinst_LIBRARIES:_pic.a=.so)
 include_HEADERS = libelf.h gelf.h nlist.h
 
 noinst_HEADERS = abstract.h common.h exttypes.h gelf_xlate.h libelfP.h \
@@ -112,7 +112,6 @@ libelf_so_LDLIBS += -lpthread
 endif
 
 libelf_so_LIBS = libelf_pic.a
-libelf_so_SOURCES =
 libelf.so: $(srcdir)/libelf.map $(libelf_so_LIBS) $(libelf_so_DEPS)
 	$(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \
 		-Wl,--soname,$@.$(VERSION) \
@@ -135,4 +134,4 @@ uninstall: uninstall-am
 
 EXTRA_DIST = libelf.map
 
-CLEANFILES += $(am_libelf_pic_a_OBJECTS) libelf.so.$(VERSION)
+CLEANFILES += $(am_libelf_pic_a_OBJECTS) libelf.so libelf.so.$(VERSION)
-- 
2.18.4


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] Fix automake warnings
  2020-12-10 10:09                 ` Mark Wielaard
@ 2020-12-10 10:30                   ` Dmitry V. Levin
  2020-12-10 11:28                     ` Mark Wielaard
  0 siblings, 1 reply; 14+ messages in thread
From: Dmitry V. Levin @ 2020-12-10 10:30 UTC (permalink / raw)
  To: Mark Wielaard; +Cc: elfutils-devel

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" <ldv@altlinux.org>
> 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 <ldv@altlinux.org>
> Signed-off-by: Mark Wielaard <mark@klomp.org>
> ---
>  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  <ldv@altlinux.org>
> +
> +	* 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  <ldv@altlinux.org>
>  
>  	* 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  <ldv@altlinux.org>
> +
> +	* 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  <ldv@altlinux.org>
>  
>  	* 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.map
>  
> -MOSTLYCLEANFILES = $(am_libdw_pic_a_OBJECTS) libdw.so.$(VERSION)
> +MOSTLYCLEANFILES = $(am_libdw_pic_a_OBJECTS) libdw.so libdw.so.$(VERSION)
> diff --git a/libelf/ChangeLog b/libelf/ChangeLog
> index 0a9e36a2..edb6a020 100644
> --- a/libelf/ChangeLog
> +++ b/libelf/ChangeLog
> @@ -1,3 +1,9 @@
> +2020-12-09  Dmitry V. Levin  <ldv@altlinux.org>
> +
> +	* Makefile.am (noinst_PROGRAMS): Rename to noinst_DATA.
> +	(libelf_so_SOURCES): Remove.
> +	(CLEANFILES): Add libasm.so.

Add libelf.so.$(VERSION).

> +
>  2020-11-30  Dmitry V. Levin  <ldv@altlinux.org>
>  
>  	* Makefile.am (libelf.so$(EXEEXT)): Drop $(EXEEXT) suffix.
> diff --git a/libelf/Makefile.am b/libelf/Makefile.am
> index f8f2afeb..a5f9eaa4 100644
> --- a/libelf/Makefile.am
> +++ b/libelf/Makefile.am
> @@ -36,7 +36,7 @@ VERSION = 1
>  
>  lib_LIBRARIES = libelf.a
>  noinst_LIBRARIES = libelf_pic.a
> -noinst_PROGRAMS = $(noinst_LIBRARIES:_pic.a=.so)
> +noinst_DATA = $(noinst_LIBRARIES:_pic.a=.so)
>  include_HEADERS = libelf.h gelf.h nlist.h
>  
>  noinst_HEADERS = abstract.h common.h exttypes.h gelf_xlate.h libelfP.h \
> @@ -112,7 +112,6 @@ libelf_so_LDLIBS += -lpthread
>  endif
>  
>  libelf_so_LIBS = libelf_pic.a
> -libelf_so_SOURCES =
>  libelf.so: $(srcdir)/libelf.map $(libelf_so_LIBS) $(libelf_so_DEPS)
>  	$(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \
>  		-Wl,--soname,$@.$(VERSION) \
> @@ -135,4 +134,4 @@ uninstall: uninstall-am
>  
>  EXTRA_DIST = libelf.map
>  
> -CLEANFILES += $(am_libelf_pic_a_OBJECTS) libelf.so.$(VERSION)
> +CLEANFILES += $(am_libelf_pic_a_OBJECTS) libelf.so libelf.so.$(VERSION)
> -- 


-- 
ldv

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] Fix automake warnings
  2020-12-10 10:30                   ` Dmitry V. Levin
@ 2020-12-10 11:28                     ` Mark Wielaard
  2020-12-10 11:52                       ` Dmitry V. Levin
  0 siblings, 1 reply; 14+ messages in thread
From: Mark Wielaard @ 2020-12-10 11:28 UTC (permalink / raw)
  To: Dmitry V. Levin; +Cc: elfutils-devel

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  <ldv@altlinux.org>
> > +
> > +	* 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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] Fix automake warnings
  2020-12-10 11:28                     ` Mark Wielaard
@ 2020-12-10 11:52                       ` Dmitry V. Levin
  2020-12-10 11:57                         ` Mark Wielaard
  0 siblings, 1 reply; 14+ messages in thread
From: Dmitry V. Levin @ 2020-12-10 11:52 UTC (permalink / raw)
  To: Mark Wielaard; +Cc: elfutils-devel

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  <ldv@altlinux.org>
> > > +
> > > +	* 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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] Fix automake warnings
  2020-12-10 11:52                       ` Dmitry V. Levin
@ 2020-12-10 11:57                         ` Mark Wielaard
  0 siblings, 0 replies; 14+ messages in thread
From: Mark Wielaard @ 2020-12-10 11:57 UTC (permalink / raw)
  To: Dmitry V. Levin; +Cc: elfutils-devel

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2020-12-10 11:57 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-30  8:00 [PATCH] Drop $(EXEEXT) suffix from shared libraries Dmitry V. Levin
2020-11-30 20:35 ` Mark Wielaard
2020-12-06 11:49   ` Mark Wielaard
2020-12-09 19:55     ` Mark Wielaard
2020-12-09 22:04       ` Dmitry V. Levin
2020-12-09 22:20         ` Dmitry V. Levin
2020-12-09 22:42           ` Mark Wielaard
2020-12-09 23:09             ` Dmitry V. Levin
2020-12-09 23:34               ` [PATCH] Fix automake warnings Dmitry V. Levin
2020-12-10 10:09                 ` Mark Wielaard
2020-12-10 10:30                   ` Dmitry V. Levin
2020-12-10 11:28                     ` Mark Wielaard
2020-12-10 11:52                       ` Dmitry V. Levin
2020-12-10 11:57                         ` Mark Wielaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).