[riot-commits] [RIOT-OS/RIOT] 63c475: toolchain/cflags: enable dwarf compression.

benpicco noreply at github.com
Tue Sep 10 10:31:47 CEST 2019


  Branch: refs/heads/master
  Home:   https://github.com/RIOT-OS/RIOT
  Commit: 63c475cd4da31c2abb522454460b7643d0807c70
      https://github.com/RIOT-OS/RIOT/commit/63c475cd4da31c2abb522454460b7643d0807c70
  Author: Juan Carrano <j.carrano at fu-berlin.de>
  Date:   2019-09-02 (Mon, 02 Sep 2019)

  Changed paths:
    M cpu/esp32/Makefile.include
    M cpu/esp8266/Makefile.include
    M makefiles/arch/atmega.inc.mk
    M makefiles/arch/mips.inc.mk
    M makefiles/arch/msp430.inc.mk
    M makefiles/cflags.inc.mk

  Log Message:
  -----------
  toolchain/cflags: enable dwarf compression.

Use the -gz option to compress ELF sections containing DWARF information.
This saves around 50% of disk space, without any side effects.

See https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gcc/Debugging-Options.html#Debugging-Options
for more infomation on this option.

Some platforms have an outdated toolchain that does not support -gz so
the flag is blacklisted there. Even then, the results are quite impressive.

I used @cladmi's `buildtest` branch (https://github.com/cladmi/RIOT/tree/wip/du/buildtest)
with this change and compiled the `examples/default` application:

```
$ BUILD_IN_DOCKER=1 DOCKER="sudo docker" make -C examples/default buildtest-indocker
```

The size was obtained with:

```
$ find output -name "*.bin.bindirsize" -type f -exec tail  -n1 '{}' \; | cut -f 1 | awk '{s+=$1} END {printf "%.0f", s}'
```

Results:

- Vanilla: 10328112 KB (~10GB).
- with -gz: 4982788 KB (~5GB).

This was inspired by #8496.


  Commit: 3aa8bc0d7001f2304225295fe53e46ba58e3d22d
      https://github.com/RIOT-OS/RIOT/commit/3aa8bc0d7001f2304225295fe53e46ba58e3d22d
  Author: benpicco <benpicco at googlemail.com>
  Date:   2019-09-10 (Tue, 10 Sep 2019)

  Changed paths:
    M cpu/esp32/Makefile.include
    M cpu/esp8266/Makefile.include
    M makefiles/arch/atmega.inc.mk
    M makefiles/arch/mips.inc.mk
    M makefiles/arch/msp430.inc.mk
    M makefiles/cflags.inc.mk

  Log Message:
  -----------
  Merge pull request #12150 from jcarrano/compress-debuginfo

toolchain/cflags: enable dwarf compression (save 50% HDD)


Compare: https://github.com/RIOT-OS/RIOT/compare/3d8c4d52d108...3aa8bc0d7001


More information about the commits mailing list