By default, the build script searches packages in the. If you want to use different version of components, you can override default settings using environment variables. For example, the following command builds the toolchain using gcc 4. We provide a prebuilt binary package that you can download and use.
Components The toolchain is built with the following components: binutils The easy way out is to use OpenWrt and let it compile the toolchain for you. OpenWrt is a commonly used software for routers. First make sure you have all the bells and whistles installed on your Ubuntu box:. Exit the menuconfig and go make yourself a cup of coffee while the toolchain are firmware are being built:. You may want to put down those lines to a file let's say loadenv.
Note that we ran the C compiler with -static directive so we won't have to mess around with dynamic linking issues later when we try to run that program. Run a search for "gcc MIPS" and you should find what you need. Windows: You can get this to work using Windows Subsystem Linux 2.
This will require you to install a Linux distribution there are several options on a virtual machine running on your Windows desktop. One of the choices is Ubuntu The gcc cross compiler is named something like gcc-mips-linux-gnu or gccmips-linux-gnu. You can see what's available in the apt package manager by running apt search :. This command uses a regular expression to cut down on the number of results.
My machine lists over packages related to gcc mips cross-compilation, and the regular expression cuts this down to the 10 most relevant. You should be able to use apt search to find MIPS cross compilers on any Linux distribution that uses the apt package manager.
Before Ubuntu On Linux distros that do not use apt , you should be able to query your package manager for packages that include the terms gcc and mips ; you will be able to find something useful on most distros.
Please note that after you install the package gcc-mips-linux-gnu , you cannot simply run gcc-mips-linux-gnu from a terminal. Let's try to run it now, just to make sure it installed correctly:.
0コメント