spim-6.5-r1 doesn't respect user set CFLAGS, which leads to bug 90473, it defines -D__i386__, where on amd64 systems, -D__x86_64__ is defined. These parameters are used to decide whether we want to inlcude the amd64 or x86 version of the headers
fixed it myself
*** Bug 90473 has been marked as a duplicate of this bug. ***