Update:

I have confirmed with the musl maintainers that musl currently does not support arbitrary/custom baud rates (e.g. via BOTHER/termios2). If such support is added in the future, it would likely be exposed through cfsetospeed(), but at present it is not implemented.

https://www.openwall.com/lists/musl/2026/02/12/1

Based on this, I will prepare and send a fix upstream to GDB to handle this correctly on musl systems. After that, we can proceed with upgrading GDB from 16.3 to 17.1. (https://sourceware.org/bugzilla/show_bug.cgi?id=33747)

Thanks,
Sunil Dora