Generally speaking, gcc has an ‘arch’ flag which should take care of this. This may mean that you need to edit Makefiles if you such are provided by the manufacturer – hopefully you don’t need to ‘roll your own’ driver for this. The Debian kernel is not so good as the equivalent Ubuntu kernel at auto-detecting hardware (which is one reason why Debian installs usually boot faster- but there is no direct equivalence between versions of the two distros, really). If you don’t have a human-readable Makefile to work with (or even if you do), you’ll probably need to search within gnu.org for better informaton. If you can provide more details of the architecture involved, I can be of more help- but honestly, gcc either supports it or it does not, and GNU is the place to find out about that.