I assume that all the following steps will be performed in native / virtual Debian / Ubuntu-based 64-bit Linux environment. In 32-bit Linux-system the Socionext’s toolchain won’t work for sure.
Step #1: First of all, we need to install some specific packages. As long as the target platform is ARM/32-bit we need to get 32-bit related headers that will be directly used at cross-compilation stage:
sudo dpkg --add-architecture i386
sudo apt install build-essential binutils-multiarch
sudo apt install libc6-dev:i386 libstdc++-7-dev:i386
The whole following work will be done in directory ~/socionext. In particular, the toolchain is supposed to be placed in subdirectory ~/socionext/gcc-linaro-5.3.1-2016.05-x86_64_arm-linux-gnueabihf.
I would also highly recommend to install the mentioned packages:
sudo apt install ccache ninja-build
ninja-build - a Makefile-like build system that is also used by NodeJS project;
ccache - compilator cache - really saves a lot of time when you have to recompile the whole project’s source tree several times;