Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
The specific problem you are facing here is the lack of a cross-compiler, combined with insufficient command line flags to the compiler and linker to workaround that fact.
The specific problem you are facing here is the lack of a cross-compiler, combined with insufficient command line flags to the compiler and linker to workaround that fact.
I figured out a simple fix, not sure if it'll work for everyone, but it works for me.
Add -m32 and -m elf_i386 to CFLAGS and LDFLAGS, respectively: