- Toolchains
- Contents
- Pre-built/Build Kits
- MIPS SDE
- Maciej W. Rozycki
- Dan Kegel
- uClibc Toolchain and Buildroot
- OpenEmbedded
- DENX ELDK
- Gentoo crossdev
- Debian
- Sourcery CodeBench Lite Edition
- Commercial Toolchains
- Cygwin
- Roll-your-own
- Prologue
- Binutils
- Summary
- Mips linux gnu gcc
- Пакет: gcc-mips-linux-gnu (4:7.4.0-1ubuntu1.3) [ security] [ universe]
- Ссылки для gcc-mips-linux-gnu
- Ресурсы Ubuntu:
- Сопровождающий:
- Original Maintainers (usually from Debian):
- Подобные пакеты:
- GNU C compiler for the mips architecture
- Другие пакеты, относящиеся к gcc-mips-linux-gnu
- Загрузка gcc-mips-linux-gnu
- Linux Toolchain
- Components
- Using The Pre-Built Toolchain
- Running QEMU standalone and with gdb
- Building a Toolchain from Source
- Build Options
Toolchains
A toolchain is a complete collection of compiler and binutils programs and can be run either as a cross-compiler, or native on the target (if performance allows).
Contents
Pre-built/Build Kits
MIPS SDE
MIPS Technologies UK maintains their own source tree for the toolchain components. SDE combines all necessary GNU tools, is infrequently resynchronized with mainstream GNU releases (which inevitably have bugs for less widely used architectures such as MIPS) and focuses on supporting the full range of ISAs, ASEs and cores, as well as providing the most reliable, best-performing compiler for the largest range of MIPS CPUs. See MIPS SDE Installation. Note that the pre-built cross-compiler is only suitable for building a Linux kernel, and cannot be used to create Linux applications or shared objects. Note: We have been using the sde toolkit for both shared objects and applications. Maybe the issue was fixed?
Maciej W. Rozycki
A stable set of toolchain components provided by Maciej can be downloaded from ftp://ftp.linux-mips.org/pub/linux/mips/people/macro/. This is based on GCC 2.95.3 (patched) and up-to-date binutils. Versions 4.0.1 and 4.1.2 of GCC are available too.
The former mirror at ftp.rfc822.org is now gone. Thanks, Florian, for providing this service over the years.
Dan Kegel
Dan Kegel has a page at http://kegel.com/crosstool/ with a nice script to automatize the build procedure. Crosstool can only generate toolchains that use the GNU C Library, support for the smaller C Library http://www.uclibc.org uClibc might be added in the future.
H.J.Lu distributes a toolchain as part of his Red Hat 7.1 port. It can be found at ftp://ftp.linux-mips.org/pub/linux/mips/redhat/7.1/ . This toolchain-20020423-1.rpm is based on the RedHat’s GCC 2.96, binutils 2.13 and glibc 2.2.5 .
uClibc Toolchain and Buildroot
uClibc developers provide tools to generate toolchains and root filesystems with the uClibc standard C library.
The Toolchain tool allows to generate a toolchain for a variety of architectures, including MIPS and MIPSel.
The Buildroot tool allows to generate both a toolchain and a root filesystem for a variety of architectures, including MIPS and MIPSel. Using a configuration tool (similar to the one used for the Linux Kernel), you can select compiler version, binutils version, and all softwares that should be included in the root filesystem. Then the Makefiles will automatically download, configure, compile, install and generate the toolchain and the root filesystem image.
OpenEmbedded
The OpenEmbedded meta distribution also includes an automatic build of a full cross-toolchain for it’s target architecture. http://www.openembedded.org
DENX ELDK
DENX Software Engineering provides the ELDK (Embedded Linux Development Kit), which includes both cross development and native tools for big and little endian MIPS processors (also for ARM and PowerPC). As it is Free Software it can be downloaded for FREE. See http://www.denx.de/wiki/DULG/ELDK
Gentoo crossdev
Gentoo provides a tool for creating full cross-compiling toolchains for a number of targets. On any Gentoo system, set up PORTAGE_OVERLAY in make.conf, then emerge crossdev to install it. Using a small startup shell script, these toolchains can be used with distcc as well, to allow distribution of a compile job over a cluster.
Debian
Embedded Debian project provides cross toolchains for various platforms, including mips and mipsel.
An alternative repository with newer toolchains built from Debian sources is available from [1].
Sourcery CodeBench Lite Edition
Mentor Graphics provides pre-built MIPS toolchains for x86 and x86_64 hosts. Apart from the core toolchain components (binutils, gcc), the package also includes gdb, gdbserver and qemu. As of the time of writing, the N32 ABI is not supported by this toolchain.
Commercial Toolchains
All commercial Linux/MIPS distributions come with appropriate toolchain deliverables.
Cygwin
Here is a first attempt at GCC 4.9.2 and Binutils 2.25 compiled on/for 32-bit Cygwin and targeting mips-unknown-linux-gnu. Untested for Linux kernel builds.
Roll-your-own
You’re adverse to using someone else’s toolchains, and cannot remember how to build one yourself, no matter how hard you try. Fear not. Outlined here is the proceedure to build a bootstrap toolchain; one which is minus the C library and is just enough to build the kernel.
Prologue
What you’ll need:
Note that in general you want to use the latest versions released by the time a kernel was released. The versions listed here are known to be working well for recent kernels as of the time of writing. Using tools more recent than the kernel means that combination will not have been tested exhaustively so the likelihood of encountering incompatibilities increases. Sometimes tool compatibility versions are fixed in -stable but there is no guarantee that this also covers your favorite esoteric configuration.
Now, export a few environment variables for your convenience. If you’re building for big-endian MIPS, your TARGET should be mips-unknown-linux-gnu instead. If you wish to install to a different location other than /opt/cross/, substitute in your PREFIX accordingly. A common alternative is /usr/local/.
You’ll need to re-export your PATH with the new install location so when building a bootstrap gcc, it may locate the shiny new cross-binutils:
Now change to the staging directory:
Binutils
Extract, configure, build and install:
You should now have the cross-binutils installed under $
Extract, configure, build and install a bootstrap GCC.
Enable any other language front-ends as you see fit. For building the kernel however, you can get away with just the C language front-end. Also, tell the configure script not to look for target libc headers — we don’t have them, and don’t need them at this point.
You’ll need this for debugging either the kernel (with KGDB) or userspace (natively or with gdbserver ). If this doesn’t apply in your case, you may safely skip this section.
Extract, configure, build and install:
Summary
Your shiny new toolchain should be in your PATH , given you re-exported it earlier. Otherwise, you’ll need to prefix your PATH with:
Источник
Mips linux gnu gcc
Generate big-endian code.
Generate little-endian code. This is the default for ‘ mips*el-*-* ’ configurations.
Generate code that runs on arch , which can be the name of a generic MIPS ISA, or the name of a particular processor. The ISA names are: ‘ mips1 ’, ‘ mips2 ’, ‘ mips3 ’, ‘ mips4 ’, ‘ mips32 ’, ‘ mips32r2 ’, ‘ mips32r3 ’, ‘ mips32r5 ’, ‘ mips32r6 ’, ‘ mips64 ’, ‘ mips64r2 ’, ‘ mips64r3 ’, ‘ mips64r5 ’ and ‘ mips64r6 ’. The processor names are: ‘ 4kc ’, ‘ 4km ’, ‘ 4kp ’, ‘ 4ksc ’, ‘ 4kec ’, ‘ 4kem ’, ‘ 4kep ’, ‘ 4ksd ’, ‘ 5kc ’, ‘ 5kf ’, ‘ 20kc ’, ‘ 24kc ’, ‘ 24kf2_1 ’, ‘ 24kf1_1 ’, ‘ 24kec ’, ‘ 24kef2_1 ’, ‘ 24kef1_1 ’, ‘ 34kc ’, ‘ 34kf2_1 ’, ‘ 34kf1_1 ’, ‘ 34kn ’, ‘ 74kc ’, ‘ 74kf2_1 ’, ‘ 74kf1_1 ’, ‘ 74kf3_2 ’, ‘ 1004kc ’, ‘ 1004kf2_1 ’, ‘ 1004kf1_1 ’, ‘ i6400 ’, ‘ i6500 ’, ‘ interaptiv ’, ‘ loongson2e ’, ‘ loongson2f ’, ‘ loongson3a ’, ‘ gs464 ’, ‘ gs464e ’, ‘ gs264e ’, ‘ m4k ’, ‘ m14k ’, ‘ m14kc ’, ‘ m14ke ’, ‘ m14kec ’, ‘ m5100 ’, ‘ m5101 ’, ‘ octeon ’, ‘ octeon+ ’, ‘ octeon2 ’, ‘ octeon3 ’, ‘ orion ’, ‘ p5600 ’, ‘ p6600 ’, ‘ r2000 ’, ‘ r3000 ’, ‘ r3900 ’, ‘ r4000 ’, ‘ r4400 ’, ‘ r4600 ’, ‘ r4650 ’, ‘ r4700 ’, ‘ r5900 ’, ‘ r6000 ’, ‘ r8000 ’, ‘ rm7000 ’, ‘ rm9000 ’, ‘ r10000 ’, ‘ r12000 ’, ‘ r14000 ’, ‘ r16000 ’, ‘ sb1 ’, ‘ sr71000 ’, ‘ vr4100 ’, ‘ vr4111 ’, ‘ vr4120 ’, ‘ vr4130 ’, ‘ vr4300 ’, ‘ vr5000 ’, ‘ vr5400 ’, ‘ vr5500 ’, ‘ xlr ’ and ‘ xlp ’. The special value ‘ from-abi ’ selects the most compatible architecture for the selected ABI (that is, ‘ mips1 ’ for 32-bit ABIs and ‘ mips3 ’ for 64-bit ABIs).
The native Linux/GNU toolchain also supports the value ‘ native ’, which selects the best architecture option for the host processor. -march=native has no effect if GCC does not recognize the processor.
In processor names, a final ‘ 000 ’ can be abbreviated as ‘ k ’ (for example, -march=r2k ). Prefixes are optional, and ‘ vr ’ may be written ‘ r ’.
Names of the form ‘ n f2_1 ’ refer to processors with FPUs clocked at half the rate of the core, names of the form ‘ n f1_1 ’ refer to processors with FPUs clocked at the same rate as the core, and names of the form ‘ n f3_2 ’ refer to processors with FPUs clocked a ratio of 3:2 with respect to the core. For compatibility reasons, ‘ n f ’ is accepted as a synonym for ‘ n f2_1 ’ while ‘ n x ’ and ‘ b fx ’ are accepted as synonyms for ‘ n f1_1 ’.
GCC defines two macros based on the value of this option. The first is _MIPS_ARCH , which gives the name of target architecture, as a string. The second has the form _MIPS_ARCH_ foo , where foo is the capitalized value of _MIPS_ARCH . For example, -march=r2000 sets _MIPS_ARCH to «r2000» and defines the macro _MIPS_ARCH_R2000 .
Note that the _MIPS_ARCH macro uses the processor names given above. In other words, it has the full prefix and does not abbreviate ‘ 000 ’ as ‘ k ’. In the case of ‘ from-abi ’, the macro names the resolved architecture (either «mips1» or «mips3» ). It names the default architecture when no -march option is given.
Optimize for arch . Among other things, this option controls the way instructions are scheduled, and the perceived cost of arithmetic operations. The list of arch values is the same as for -march .
When this option is not used, GCC optimizes for the processor specified by -march . By using -march and -mtune together, it is possible to generate code that runs on a family of processors, but optimize the code for one particular member of that family.
-mtune defines the macros _MIPS_TUNE and _MIPS_TUNE_ foo , which work in the same way as the -march ones described above.
Источник
Пакет: gcc-mips-linux-gnu (4:7.4.0-1ubuntu1.3) [ security] [ universe]
Ссылки для gcc-mips-linux-gnu
Ресурсы Ubuntu:
Сопровождающий:
Please consider filing a bug or asking a question via Launchpad before contacting the maintainer directly.
Original Maintainers (usually from Debian):
- Debian GCC Maintainers (Почтовый архив)
- Matthias Klose
It should generally not be necessary for users to contact the original maintainer.
Подобные пакеты:
GNU C compiler for the mips architecture
Другие пакеты, относящиеся к gcc-mips-linux-gnu
|
|
|
|
- dep: cpp-mips-linux-gnu (>= 4:7.4.0-1ubuntu1.3) GNU C preprocessor (cpp) for the mips architecture
- dep: gcc-7-mips-linux-gnu (>= 7.4.0-1
) GNU C compiler (cross compiler for mips architecture)
- rec: libc6-dev-mips-cross GNU C Library: Development Libraries and Header Files (for cross-compiling) или libc-dev-mips-cross виртуальный пакет, предоставляемый libc6-dev-mips-cross
- sug: autoconf automatic configure script builder
- sug: automake Tool for generating GNU Standards-compliant Makefiles
- sug: bison YACC-compatible parser generator
- sug: flex fast lexical analyzer generator
- sug: gcc-doc Documentation for the GNU C compilers (gcc, gobjc, g++)
- sug: gdb-mips-linux-gnu Пакет недоступен
- sug: libtool Generic library support script
- sug: make utility for directing compilation
также виртуальный пакет, предоставляемый make-guile - sug: manpages-dev Manual pages about using GNU/Linux for development
Загрузка gcc-mips-linux-gnu
Архитектура | Размер пакета | В установленном виде | Файлы |
---|---|---|---|
amd64 | 1,4 Кб | 25,0 Кб | [список файлов] |
i386 | 1,4 Кб | 25,0 Кб | [список файлов] |
This page is also available in the following languages:
Авторские права © 2021 Canonical Ltd.; См. условия лицензии. Ubuntu это торговый знак компании Canonical Ltd. Об этом сайте.
Источник
Linux Toolchain
Here is a simple way to get started with the Linux open source toolchain for MIPS. This is referred to as target mipsel-linux-gnu. The C library is from egibc.
We provide a prebuilt binary package that you can download and use.
A source package and command file is provided with which you can build your own custom toolchain. This package can also be modified and various components exchanged for newer/older versions.
Components
The toolchain is built with the following components:
binutils-2.21 | http://www.gnu.org/software/binutils/ |
eglibc-2_14 | http://www.eglibc.org/ |
expat-2.0.1 | http://expat.sourceforge.net/ |
gcc-4.4.6 | http://gcc.gnu.org/ |
gdb-7.2 | http://www.gnu.org/software/gdb/ |
gmp-4.3.2 | http://gmplib.org/ |
linux-2.6.32.27 | http://kernel.org/ |
mpc-0.9 | http://www.multiprecision.org/ |
mpfr-3.0.1 | http://www.mpfr.org/ |
qemu-0.15.0 | http://wiki.qemu.org/Main_Page |
If you want to build your own toolchain or, to configure it differently you can follow the instructions on this page. When you build your own toolchain you can also substitute different versions of the above components. All instructions assume the Bash shell.
Using The Pre-Built Toolchain
You can download the prebuilt package, unpack it, set your path to it’s top level bin directory and begin to use it. If you unpack the package to a folder different from “/opt“, you will have to manually point to the sysroot folder using “–sysroot” command line option on each gcc invocation.
1. Download this tar file: Mips_linux_toolchain_bin-1.1.tar.bz2
2. Unpack the tar file to the /opt folder:
3. Add the bin folder to the path:
Running QEMU standalone and with gdb
Build a simple hello world:
Run with qemu under the control of gdb
Building a Toolchain from Source
Various components must be installed on your computer before proceeding, if they are not already there. http://gcc.gnu.org/install/prerequisites.html
In general you will receive the proper warning if you are missing some component but not always so it’s good to read through the list.
1. Download this tar file: Mips_linux_toolchain_src-1.1.tar.bz2
2. Unpack the tar file:
3. Run the build script (DIR is a folder where you want to install the toolchain):
Build Options
To get a full list of build options run the build script with help command: ./build-mips-linux-gnu.sh help.
By default, the build script searches packages in the ./dl folder and creates the following auxiliary folders:
You should point to the installation folder using either –prefix command line option or PREFIX environment variable:
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.6.1 and gdb 7.3.1:
Источник