[pve-devel] [PATCH RFC manager 2/2] Do not link against libdl since we use none of its symbols

Wolfgang Bumiller w.bumiller at proxmox.com
Wed Jul 19 09:44:05 CEST 2017


On Tue, Jul 18, 2017 at 05:37:28PM +0200, Emmanuel Kasper wrote:
> This fixes the warning:
> dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/pve-manager/usr/bin/pvemailforward was not linked against libdl.so.2 (it uses none of the library's symbols)
> ---
>  bin/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/bin/Makefile b/bin/Makefile
> index c7fca9f8..c93d9c38 100644
> --- a/bin/Makefile
> +++ b/bin/Makefile
> @@ -66,7 +66,7 @@ pvereport.1.pod: pvereport
>  	mv $@.tmp $@
>  
>  pvemailforward: pvemailforward.c
> -	gcc $< -o $@ -g -O2 -Wall -ldl -lc
> +	gcc $< -o $@ -g -O2 -Wall -lc

Did this instead:

+       $(CC) $(CPPFLAGS) $(CFLAGS) -Wall -g -O2 $< -o $@

-lc is superfluous as well and dpkg-buildpackage provides
CC/CPPFLAGS/CFLAGS with things like -D_FORTIFY_SOURCE=2 or
-fstack-protector-strong.
Doesn't really change much for a tiny wrapper like pvemailforward, but
still...




More information about the pve-devel mailing list