Add flags to build correctly the kernel

this fix several bugs in the compilation, when used Linaro, taken from Googy-Max3-Kernel, all credits for @googyanas