Improve portability
This should fix https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1070495
The first 3 commits have been submitted upstream: https://lists.sr.ht/~mpu/qbe/patches/57628
The last commit is a suggestion of how to maintain a Debian diff, you might want to deal with it in a different way (e.g. explicit patch files under debian/patches/). I can rework this MR if that's the case.
Edited by Antonio Terceiro