boot: Only build with debug symbols in developer mode
authorJan Janssen <medhefgo@web.de>
Wed, 26 Jan 2022 23:35:36 +0000 (23:35 +0000)
committerLuca Boccassi <bluca@debian.org>
Wed, 26 Jan 2022 23:35:36 +0000 (23:35 +0000)
commitedf1531111cd5bab7f05e6325a7e183e6e9af656
treed19926bd74113075408e010e296a28bcb8a5ea60
parentfe571c0e41fd6f04ffa96b4b738542756c227fab
boot: Only build with debug symbols in developer mode

Origin: https://github.com/systemd/systemd/commit/76fb85316e9c629b79762457d9515cb632112a6a

The debug symbols are of very limited use in proper deployments
unlike with regular userspace. Unless someone goes through the pain
of setting up an EFI debugger (assuming their firmware even supports
this in the first place) any provided debug symbols will just be
useless.
Debugging under QEMU is possible, but even then it is non-trivial
to set up, so anyone willing to go that far can just build in
developer mode.

Meanwhile, at least x86 firmware tends to refuse binaries that contain
debug symbols. We do strip the files when converted to PE anyway, but
the elf file needs to stay around on other arches as objcopy does not
support PE as input there.

Also, the generated debug symbols seem to be not reproducible when
building with LTO. Whether this is an issue in tooling or our side
is unclear. This works around this issue.

Gbp-Pq: Name boot-Only-build-with-debug-symbols-in-developer-mode.patch
src/boot/efi/meson.build