package/busybox: Fallback to -g2 in if -g3 is enabled.
PATCH 1/1 package/busybox: Fallback to -g2 in if -g3 is enabled.
Linker process hangs if busybox was built with -g3, so fallback to -g2 in this case.
The issue can be reproduced for example with qemu_aarch64_virt_defconfig by selecting BR2_DEBUG_3.
Signed-off-by Dmitry Chestnykh <[email protected]>
--- package/busybox/busybox.mk | 5 +++++ 1 file changed, 5 insertions(+)
package/busybox/busybox.mk +5 -0
@@ -18,6 +18,11 @@ BUSYBOX_IGNORE_CVES += CVE-2022-28391 BUSYBOX_CFLAGS = \ $(TARGET_CFLAGS) +# Linking hangs with -g3, fallback to -g2 +ifeq ($(BR2_DEBUG_3),y) + BUSYBOX_CFLAGS += -g2 +endif + BUSYBOX_LDFLAGS = \ $(TARGET_LDFLAGS)
Signature · 6 lines
2.44.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hello Dmitry,
Quoted 6 lines · On Tue, 16 Apr 2024 22:27:36 +0300 Dmitry Chestnykh <[email protected]>…
Linker process hangs if busybox was built with -g3, so fallback to -g2 in this case.
The issue can be reproduced for example withqemu_aarch64_virt_defconfigby selectingBR2_DEBUG_3.Signed-off-by Dmitry Chestnykh <[email protected]>
Thanks for your patch. However, this is more of a workaround than a real fix, indeed the linker shouldn't hang at -g3.
Does this happen on all architectures? Does it happen regardless of the compiler optimization level selected? Did you report the bug to upstream binutils?
Thanks a lot,
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot