Remove stale references to libdl.a

Message ID 875yyn5gzt.fsf@oldenburg.str.redhat.com
State New
Headers show
Series
  • Remove stale references to libdl.a
Related show

Commit Message

Adhemerval Zanella via Libc-alpha June 9, 2021, 1:01 p.m.
Since commit 0c1c3a771eceec46e66ce1183cf988e2303bd373
("dlfcn: Move dlopen into libc") libdl.a is empty, so linking
against it is no longer necessary.

Tested on i686-linux-gnu and x86_64-linux-gnu.  Built with
build-many-glibcs.py.

---
 elf/Makefile                       | 7 +------
 sysdeps/powerpc/Makefile           | 1 -
 sysdeps/powerpc/powerpc64/Makefile | 1 -
 3 files changed, 1 insertion(+), 8 deletions(-)

Comments

Adhemerval Zanella via Libc-alpha June 9, 2021, 5:10 p.m. | #1
On 09/06/2021 10:01, Florian Weimer via Libc-alpha wrote:
> Since commit 0c1c3a771eceec46e66ce1183cf988e2303bd373

> ("dlfcn: Move dlopen into libc") libdl.a is empty, so linking

> against it is no longer necessary.

> 

> Tested on i686-linux-gnu and x86_64-linux-gnu.  Built with

> build-many-glibcs.py.


LGTM, thanks.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>


> 

> ---

>  elf/Makefile                       | 7 +------

>  sysdeps/powerpc/Makefile           | 1 -

>  sysdeps/powerpc/powerpc64/Makefile | 1 -

>  3 files changed, 1 insertion(+), 8 deletions(-)

> 

> diff --git a/elf/Makefile b/elf/Makefile

> index 6dbb03bbb2..5c47daee12 100644

> --- a/elf/Makefile

> +++ b/elf/Makefile

> @@ -1050,7 +1050,6 @@ unload7-ENV = MALLOC_PERTURB_=85

>  

>  $(objpfx)unload8.out: $(objpfx)unload8mod1.so $(objpfx)unload8mod1x.so

>  

> -$(objpfx)tst-tls9-static: $(common-objpfx)dlfcn/libdl.a

>  $(objpfx)tst-tls9-static.out: $(objpfx)tst-tlsmod5.so $(objpfx)tst-tlsmod6.so

>  

>  ifeq ($(have-z-execstack),yes)


Ok.

> @@ -1276,7 +1275,6 @@ $(objpfx)tst-leaks1-mem.out: $(objpfx)tst-leaks1.out

>  	$(common-objpfx)malloc/mtrace $(objpfx)tst-leaks1.mtrace > $@; \

>  	$(evaluate-test)

>  

> -$(objpfx)tst-leaks1-static: $(common-objpfx)dlfcn/libdl.a

>  $(objpfx)tst-leaks1-static-mem.out: $(objpfx)tst-leaks1-static.out

>  	$(common-objpfx)malloc/mtrace $(objpfx)tst-leaks1-static.mtrace > $@; \

>  	$(evaluate-test)


Ok.

> @@ -1533,7 +1531,6 @@ $(objpfx)tst-ldconfig-X.out : tst-ldconfig-X.sh $(objpfx)ldconfig

>  $(objpfx)tst-linkall-static: \

>    $(common-objpfx)math/libm.a \

>    $(common-objpfx)resolv/libresolv.a \

> -  $(common-objpfx)dlfcn/libdl.a \

>    $(common-objpfx)login/libutil.a \

>    $(common-objpfx)rt/librt.a \

>    $(common-objpfx)resolv/libanl.a \


Ok.

> @@ -1591,7 +1588,6 @@ $(objpfx)tst-absolute-zero: $(objpfx)tst-absolute-zero-lib.so

>  # against libdl.

>  $(objpfx)tst-libc_dlvsym-dso.so: $(libsupport)

>  $(objpfx)tst-libc_dlvsym.out: $(objpfx)tst-libc_dlvsym-dso.so

> -$(objpfx)tst-libc_dlvsym-static: $(common-objpfx)dlfcn/libdl.a

>  tst-libc_dlvsym-static-ENV = \

>    LD_LIBRARY_PATH=$(ld-library-path):$(common-objpfx)dlfcn

>  $(objpfx)tst-libc_dlvsym-static.out: $(objpfx)tst-libc_dlvsym-dso.so


Ok.

> @@ -1696,7 +1692,7 @@ $(objpfx)tst-single_threaded: $(objpfx)tst-single_threaded-mod1.so

>  $(objpfx)tst-single_threaded.out: \

>    $(objpfx)tst-single_threaded-mod2.so $(objpfx)tst-single_threaded-mod3.so

>  $(objpfx)tst-single_threaded-static-dlopen: \

> -  $(objpfx)tst-single_threaded-mod1.o $(common-objpfx)dlfcn/libdl.a

> +  $(objpfx)tst-single_threaded-mod1.o

>  $(objpfx)tst-single_threaded-static-dlopen.out: \

>    $(objpfx)tst-single_threaded-mod2.so

>  $(objpfx)tst-single_threaded-pthread: \


Ok.

> @@ -1834,6 +1830,5 @@ $(objpfx)tst-tls21: $(shared-thread-library)

>  $(objpfx)tst-tls21.out: $(objpfx)tst-tls21mod.so

>  $(objpfx)tst-tls21mod.so: $(tst-tls-many-dynamic-modules:%=$(objpfx)%.so)

>  

> -$(objpfx)tst-getauxval-static: $(common-objpfx)dlfcn/libdl.a

>  $(objpfx)tst-getauxval-static.out: $(objpfx)tst-auxvalmod.so

>  tst-getauxval-static-ENV = LD_LIBRARY_PATH=$(objpfx):$(common-objpfx)


Ok.

> diff --git a/sysdeps/powerpc/Makefile b/sysdeps/powerpc/Makefile

> index d1c71a0ca4..09860ffc01 100644

> --- a/sysdeps/powerpc/Makefile

> +++ b/sysdeps/powerpc/Makefile

> @@ -25,7 +25,6 @@ test-internal-extras += mod-cache-ppc

>  

>  mod-cache-ppc.so-no-z-defs = yes

>  tst-cache-ppc-static-dlopen-ENV = LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)elf

> -$(objpfx)tst-cache-ppc-static-dlopen: $(common-objpfx)dlfcn/libdl.a

>  $(objpfx)tst-cache-ppc-static-dlopen.out: $(objpfx)mod-cache-ppc.so

>  

>  $(objpfx)tst-cache-ppc: $(objpfx)mod-cache-ppc.so


Ok.

> diff --git a/sysdeps/powerpc/powerpc64/Makefile b/sysdeps/powerpc/powerpc64/Makefile

> index dd49dbbce2..679d5e49ba 100644

> --- a/sysdeps/powerpc/powerpc64/Makefile

> +++ b/sysdeps/powerpc/powerpc64/Makefile

> @@ -59,7 +59,6 @@ tests += tst-setjmp-bug21895-static

>  tests-static += tst-setjmp-bug21895-static

>  modules-names += setjmp-bug21895

>  

> -$(objpfx)tst-setjmp-bug21895-static: $(common-objpfx)dlfcn/libdl.a

>  $(objpfx)tst-setjmp-bug21895-static.out: $(objpfx)setjmp-bug21895.so

>  

>  tst-setjmp-bug21895-static-ENV = \

> 


Ok.

Patch

diff --git a/elf/Makefile b/elf/Makefile
index 6dbb03bbb2..5c47daee12 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -1050,7 +1050,6 @@  unload7-ENV = MALLOC_PERTURB_=85
 
 $(objpfx)unload8.out: $(objpfx)unload8mod1.so $(objpfx)unload8mod1x.so
 
-$(objpfx)tst-tls9-static: $(common-objpfx)dlfcn/libdl.a
 $(objpfx)tst-tls9-static.out: $(objpfx)tst-tlsmod5.so $(objpfx)tst-tlsmod6.so
 
 ifeq ($(have-z-execstack),yes)
@@ -1276,7 +1275,6 @@  $(objpfx)tst-leaks1-mem.out: $(objpfx)tst-leaks1.out
 	$(common-objpfx)malloc/mtrace $(objpfx)tst-leaks1.mtrace > $@; \
 	$(evaluate-test)
 
-$(objpfx)tst-leaks1-static: $(common-objpfx)dlfcn/libdl.a
 $(objpfx)tst-leaks1-static-mem.out: $(objpfx)tst-leaks1-static.out
 	$(common-objpfx)malloc/mtrace $(objpfx)tst-leaks1-static.mtrace > $@; \
 	$(evaluate-test)
@@ -1533,7 +1531,6 @@  $(objpfx)tst-ldconfig-X.out : tst-ldconfig-X.sh $(objpfx)ldconfig
 $(objpfx)tst-linkall-static: \
   $(common-objpfx)math/libm.a \
   $(common-objpfx)resolv/libresolv.a \
-  $(common-objpfx)dlfcn/libdl.a \
   $(common-objpfx)login/libutil.a \
   $(common-objpfx)rt/librt.a \
   $(common-objpfx)resolv/libanl.a \
@@ -1591,7 +1588,6 @@  $(objpfx)tst-absolute-zero: $(objpfx)tst-absolute-zero-lib.so
 # against libdl.
 $(objpfx)tst-libc_dlvsym-dso.so: $(libsupport)
 $(objpfx)tst-libc_dlvsym.out: $(objpfx)tst-libc_dlvsym-dso.so
-$(objpfx)tst-libc_dlvsym-static: $(common-objpfx)dlfcn/libdl.a
 tst-libc_dlvsym-static-ENV = \
   LD_LIBRARY_PATH=$(ld-library-path):$(common-objpfx)dlfcn
 $(objpfx)tst-libc_dlvsym-static.out: $(objpfx)tst-libc_dlvsym-dso.so
@@ -1696,7 +1692,7 @@  $(objpfx)tst-single_threaded: $(objpfx)tst-single_threaded-mod1.so
 $(objpfx)tst-single_threaded.out: \
   $(objpfx)tst-single_threaded-mod2.so $(objpfx)tst-single_threaded-mod3.so
 $(objpfx)tst-single_threaded-static-dlopen: \
-  $(objpfx)tst-single_threaded-mod1.o $(common-objpfx)dlfcn/libdl.a
+  $(objpfx)tst-single_threaded-mod1.o
 $(objpfx)tst-single_threaded-static-dlopen.out: \
   $(objpfx)tst-single_threaded-mod2.so
 $(objpfx)tst-single_threaded-pthread: \
@@ -1834,6 +1830,5 @@  $(objpfx)tst-tls21: $(shared-thread-library)
 $(objpfx)tst-tls21.out: $(objpfx)tst-tls21mod.so
 $(objpfx)tst-tls21mod.so: $(tst-tls-many-dynamic-modules:%=$(objpfx)%.so)
 
-$(objpfx)tst-getauxval-static: $(common-objpfx)dlfcn/libdl.a
 $(objpfx)tst-getauxval-static.out: $(objpfx)tst-auxvalmod.so
 tst-getauxval-static-ENV = LD_LIBRARY_PATH=$(objpfx):$(common-objpfx)
diff --git a/sysdeps/powerpc/Makefile b/sysdeps/powerpc/Makefile
index d1c71a0ca4..09860ffc01 100644
--- a/sysdeps/powerpc/Makefile
+++ b/sysdeps/powerpc/Makefile
@@ -25,7 +25,6 @@  test-internal-extras += mod-cache-ppc
 
 mod-cache-ppc.so-no-z-defs = yes
 tst-cache-ppc-static-dlopen-ENV = LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)elf
-$(objpfx)tst-cache-ppc-static-dlopen: $(common-objpfx)dlfcn/libdl.a
 $(objpfx)tst-cache-ppc-static-dlopen.out: $(objpfx)mod-cache-ppc.so
 
 $(objpfx)tst-cache-ppc: $(objpfx)mod-cache-ppc.so
diff --git a/sysdeps/powerpc/powerpc64/Makefile b/sysdeps/powerpc/powerpc64/Makefile
index dd49dbbce2..679d5e49ba 100644
--- a/sysdeps/powerpc/powerpc64/Makefile
+++ b/sysdeps/powerpc/powerpc64/Makefile
@@ -59,7 +59,6 @@  tests += tst-setjmp-bug21895-static
 tests-static += tst-setjmp-bug21895-static
 modules-names += setjmp-bug21895
 
-$(objpfx)tst-setjmp-bug21895-static: $(common-objpfx)dlfcn/libdl.a
 $(objpfx)tst-setjmp-bug21895-static.out: $(objpfx)setjmp-bug21895.so
 
 tst-setjmp-bug21895-static-ENV = \