diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2015-09-22 21:33:48 +0200 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2015-09-22 22:05:44 +0200 |
commit | b3658bc01bec22a5c3c70e818918c12d2bc0baf5 (patch) | |
tree | 838adb52c2fd6bb3e6db65720c7cf4a1b353d1c1 /pkgs/build-support/setup-hooks/separate-debug-info.sh | |
parent | f46fe7b909a4385c576e1ac612b5b8e076a3b338 (diff) |
separateDebugInfo: compress it by default
Using zlib should be cheap enough and save lots of HDD space. Case study (glib): 11 MB -> 4 MB.
Diffstat (limited to 'pkgs/build-support/setup-hooks/separate-debug-info.sh')
-rw-r--r-- | pkgs/build-support/setup-hooks/separate-debug-info.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pkgs/build-support/setup-hooks/separate-debug-info.sh b/pkgs/build-support/setup-hooks/separate-debug-info.sh index 317f13beffdd1..1f27cb0ffd613 100644 --- a/pkgs/build-support/setup-hooks/separate-debug-info.sh +++ b/pkgs/build-support/setup-hooks/separate-debug-info.sh @@ -30,7 +30,14 @@ _separateDebugInfo() { # Extract the debug info. header "separating debug info from $i (build ID $id)" mkdir -p "$dst/${id:0:2}" - objcopy --only-keep-debug "$i" "$dst/${id:0:2}/${id:2}.debug" + objcopy --only-keep-debug "$i" "$dst/${id:0:2}/${id:2}.debug" --compress-debug-sections strip --strip-debug "$i" done } + +# - We might prefer to compress the debug info during link-time already, +# but our ld doesn't support --compress-debug-sections=zlib (yet). +# - Debug info may cause due to excessive memory usage during linking. +# Using -Wa,--compress-debug-sections should help with that; +# further interesting information: https://gcc.gnu.org/wiki/DebugFission + |