From b676ddf6b48fa5990f8c13feffc4cd3fd0e4d4c2 Mon Sep 17 00:00:00 2001 From: Ximin Luo Date: Tue, 7 Jan 2020 12:47:26 +0000 Subject: [PATCH] disable dh_strip workaround. rlibs will have all debuginfo, they are not in dbgsym packages anyway --- debian/changelog | 3 +++ debian/rules | 21 +++++++++++++-------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/debian/changelog b/debian/changelog index 4ad25dd96b..6a69c1b4a0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,9 @@ rustc (1.40.0+dfsg1-6) UNRELEASED; urgency=medium * More python 2 -> 3 fixes. * Enable the wasm32-wasi target for code that needs a "real" libstd. + * Don't strip static rlibs. This sometimes breaks wasm, and more generally + the stripped debuginfo is actually totally lost rather than being moved + into the -dbgsym packages. Shared libraries are unaffected and work. -- Ximin Luo Sun, 05 Jan 2020 16:53:53 +0000 diff --git a/debian/rules b/debian/rules index f7fcddf6b2..a5648b2977 100755 --- a/debian/rules +++ b/debian/rules @@ -382,14 +382,19 @@ override_dh_missing: 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}"' - '{}' \; +# The below override is disabled on advice from #debian-devel, because: +# - only shared libs get the "split dbgsym package" treatment by dh_strip; +# static libs simply get their debuginfo discarded +# - strip(1) sometimes breaks wasm libs +# +#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