When linking against libgcc.a, there is an unresolved (in musl libc) external __write() referenced from libgcc/config/arm/linux-atomic-64bit.c, so make the patch replace it with libc write(2).