diff options
Diffstat (limited to 'gdb/contrib/cc-with-tweaks.sh')
-rwxr-xr-x | gdb/contrib/cc-with-tweaks.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/contrib/cc-with-tweaks.sh b/gdb/contrib/cc-with-tweaks.sh index ccc9c5a3f98..fbb2b88f640 100755 --- a/gdb/contrib/cc-with-tweaks.sh +++ b/gdb/contrib/cc-with-tweaks.sh @@ -36,6 +36,7 @@ # (More documentation is to come.) # ARGS determine what is done. They can be: +# -Z invoke objcopy --compress-debug-sections # -z compress using dwz # -m compress using dwz -m # -i make an index @@ -74,9 +75,11 @@ want_index=false want_dwz=false want_multi=false want_dwp=false +want_objcopy_compress=false while [ $# -gt 0 ]; do case "$1" in + -Z) want_objcopy_compress=true ;; -z) want_dwz=true ;; -i) want_index=true ;; -m) want_multi=true ;; @@ -138,6 +141,12 @@ then exit 1 fi +if [ "$want_objcopy_compress" = true ]; then + $OBJCOPY --compress-debug-sections "$output_file" + rc=$? + [ $rc != 0 ] && exit $rc +fi + if [ "$want_index" = true ]; then $GDB --batch-silent -nx -ex "set auto-load no" -ex "file $output_file" -ex "save gdb-index $output_dir" rc=$? |