Przeglądaj źródła

dpkg-shlibdeps.pl: doesn't warn any more about libm.so.6 being unused

If the binary is also linked against libstdc++, the warning is suppressed
since g++ always add an implicit -lm.
Raphael Hertzog 18 lat temu
rodzic
commit
deaf2e577c
3 zmienionych plików z 12 dodań i 0 usunięć
  1. 6 0
      ChangeLog
  2. 3 0
      debian/changelog
  3. 3 0
      scripts/dpkg-shlibdeps.pl

+ 6 - 0
ChangeLog

@@ -1,3 +1,9 @@
+2007-12-08  Raphael Hertzog  <hertzog@debian.org>
+
+	* scripts/dpkg-shlibdeps.pl: Doesn't warn any more about libm.so.6
+	being unused if the binary is also linked against libstdc++ since
+	g++ always add an implicit -lm.
+
 2007-12-08  Raphael Hertzog  <hertzog@debian.org>
 
 	* scripts/Dpkg/Shlibs.pm (find_library): When it finds a library

+ 3 - 0
debian/changelog

@@ -21,6 +21,9 @@ dpkg (1.14.13) UNRELEASED; urgency=low
   * When dpkg-shlibdeps finds a lib in a directory which is just a symlink to
     another directory that is also considered, remember the other directory
     name as the canonical one. Closes: #453885
+  * dpkg-shlibdeps doesn't warn any more about libm.so.6 being unused if the
+    binary is also linked against libstdc++ since g++ always add an implicit
+    -lm. Closes: #454616
 
   [ Updated man pages translations ]
   * Swedish (Peter Karlsson)

+ 3 - 0
scripts/dpkg-shlibdeps.pl

@@ -255,6 +255,9 @@ foreach my $file (keys %exec) {
     # Warn about un-NEEDED libraries
     foreach my $soname (@sonames) {
 	unless ($soname_notfound{$soname} or $used_sonames{$soname}) {
+	    # Ignore warning for libm.so.6 if also linked against libstdc++
+	    next if ($soname =~ /^libm\.so\.\d+$/ and
+		     scalar grep(/^libstdc\+\+\.so\.\d+/, @sonames));
 	    warning(_g("%s shouldn't be linked with %s (it uses none of its " .
 	               "symbols)."), $file, $soname);
 	}