]> git.donarmstrong.com Git - debhelper.git/blobdiff - dh_makeshlibs
Use cross-binutils helpers when cross-compiling
[debhelper.git] / dh_makeshlibs
index 0eb96b02fe1f086a9b76619d67955929c851a175..652def3a2b63226de5fe1c40cbf7caf8c363b37a 100755 (executable)
@@ -21,9 +21,19 @@ libraries, and generates a shlibs file for the libraries it finds.
 It also adds a call to ldconfig in the postinst and postrm scripts (in
 V3 mode and above only) to any packages in which it finds shared libraries.
 
-If a L<dpkg-gensymbols(1)> symbol file is found in debian/package.symbols
-(or debian/package.symbols.arch), dpkg-gensymbols will be called
-to process and install the symbols file.
+=head1 FILES
+
+=over 4
+
+=item debian/I<package>.symbols
+
+=item debian/I<package>.symbols.I<arch>
+
+These symbols files, if present, are passed to L<dpkg-gensymbols(1)> to
+be processed and installed. Use the I<arch> specific names if you need
+to provide different symbols files for different architectures.
+
+=back
 
 =head1 OPTIONS
 
@@ -108,8 +118,16 @@ init(options => {
        "m=s", => \$dh{M_PARAMS},
        "major=s" => \$dh{M_PARAMS},
        "version-info:s" => \$dh{V_FLAG},
+       "add-udeb=s" => \$dh{SHLIBS_UDEB},
 });
 
+my $od = "objdump";
+# cross-compiling?
+if (dpkg_architecture_value("DEB_BUILD_GNU_TYPE")
+    ne dpkg_architecture_value("DEB_HOST_GNU_TYPE")) {
+       $od=dpkg_architecture_value("DEB_HOST_GNU_TYPE") . "-objdump";
+}
+
 foreach my $package (@{$dh{DOPACKAGES}}) {
        next if is_udeb($package);
        
@@ -135,7 +153,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
        open (FIND, "find $tmp -type f \\( -name '*.so' -or -name '*.so.*' \\) $exclude |");
        while (<FIND>) {
                my ($library, $major);
-               my $objdump=`objdump -p $_`;
+               my $objdump=`$od -p $_`;
                if ($objdump=~m/\s+SONAME\s+(.+)\.so\.(.+)/) {
                        # proper soname format
                        $library=$1;