I'm not entirely sure what the difference between mips-elf and mips-linux-gnu actually is for building the kernel - from here perhaps the elf toolchain uses a different calling convention from what the kernel wants? Either way, try changing the target triplet and rebuilding.
]]>./arch/mips/include/uapi/asm/sgidefs.h:18:2: error: #error Use a Linux compiler or give up.
#error Use a Linux compiler or give up.
P.S. When compiling any program, example helloworld, I get error what gcc can't find headers.
Therefore, I concluded that the problem in toolchain (maybe uncorrect install). I don't know if I'm right...
Maybe you know other source of the problem?
If you can't get your build to work and you are convinced that it is the toolchain, you could build a toolchain CLFS style - you should only need http://clfs.org/view/CLFS-SYSTEMD-TRUNK … utils.html, http://clfs.org/view/CLFS-SYSTEMD-TRUNK … tatic.html (properly packaged using a PKGBUILD, of course). I also have my own PKGBUILDs that work for MIPS - https://github.com/takahe-linux/pkgs/bl … s/PKGBUILD, https://github.com/takahe-linux/pkgs/bl … c/PKGBUILD - but you'll need to set some environmental variables before using them.
]]>