]> git.proxmox.com Git - rustc.git/commitdiff
Strip rlib files properly
authorXimin Luo <infinity0@debian.org>
Thu, 14 Sep 2017 10:51:21 +0000 (12:51 +0200)
committerXimin Luo <infinity0@debian.org>
Thu, 14 Sep 2017 10:51:21 +0000 (12:51 +0200)
debian/TODO.Debian
debian/libstd-rust-dev.lintian-overrides
debian/rules

index 98ed6f7abde2c997f73ecf8f47747f894c50e76b..15c022b48f33c7adfc51c5d9772a77c07870624f 100644 (file)
@@ -1,4 +1,3 @@
-2. Strip rlibs, they are not being stripped currently
 3. Upstream updated the "install_std" functionality to install libstd for all
    targets that were built. For a cross-build this is both the native and the
    foreign arches. Probably, we can either (a) get rid of d-cross-compile-install.patch
index 61b3c11c48f1bec05fb8110268d667f19fe33e54..bba06da83ef48ee794123bd8dcc59ba497384090 100644 (file)
@@ -1,3 +1,8 @@
 # I assure you, dear lintian, that "/usr/lib/rustlib/x86_64-unknown-linux-gnu/"
 # is indeed an arch-specific directory.
 libstd-rust-dev binary: arch-dependent-file-not-in-arch-specific-directory
+
+# See debhelper bug #875780. This override is commented out because it's not
+# always needed, but we want it here for documentation purposes. Basically,
+# if you see it then you probably don't need to worry about it.
+#libstd-rust-dev: unstripped-static-library usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/lib*.rlib(*)
index bf29e38b75d0a9a991a5519b09073602d7714484..b73229548dd798fad8ab43b0a8f682ae1bbe05f7 100755 (executable)
@@ -301,6 +301,15 @@ override_dh_installdocs:
 override_dh_compress:
        dh_compress -X.woff
 
+override_dh_strip:
+       # Work around #35733, #468333
+       find debian/libstd-rust-dev/ -name '*.rlib' -execdir mv '{}' '{}.a' \;
+       # This is expected to print out lots of "File format unrecognized" warnings about
+       # rust.metadata.bin and *.deflate but the .o files inside the rlibs should be stripped
+       # Some files are still omitted because of #875780 however.
+       dh_strip -v
+       find debian/libstd-rust-dev/ -name '*.rlib.a' -execdir sh -c 'mv "$$1" "$${1%.a}"' - '{}' \;
+
 override_dh_makeshlibs:
        dh_makeshlibs -V