Architectures/ARM/CrossToolchain
From FedoraProject
m (1 revision(s)) |
(Fix repo info) |
||
| Line 5: | Line 5: | ||
To install this toolchain on your Fedora machine, do: | To install this toolchain on your Fedora machine, do: | ||
<pre> | <pre> | ||
| + | # cd /etc/yum.repos.d/ | ||
| + | # wget http://fedora-arm.wantstofly.org/cross/cross.repo | ||
| + | # yum install armv5tel-redhat-linux-gnueabi-gcc | ||
</pre> | </pre> | ||
Revision as of 05:20, 18 February 2009
Fedora/ARM cross toolchain
We provide ARM toolchain packages for i386 and x86_64 that are built from the same sources as the Fedora native toolchain packages (binutils, gcc, gdb, glibc.)
To install this toolchain on your Fedora machine, do:
# cd /etc/yum.repos.d/ # wget http://fedora-arm.wantstofly.org/cross/cross.repo # yum install armv5tel-redhat-linux-gnueabi-gcc
This will install everything necessary to run the C compiler and cross-build ARM libraries and binaries that are entirely binary compatible with the native Fedora/ARM libraries and binaries.
Cross-compiling ARM userland binaries
To cross-compile the canonical Hello World example for ARM, do:
$ armv5tel-redhat-linux-gnueabi-gcc -Wall -o hello hello.c $
Cross-compiling ARM kernels
You can also use the cross-toolchain to cross-build an ARM Linux kernel, by changing these two lines in the top-level Makefile:
ARCH ?= $(SUBARCH) CROSS_COMPILE ?=
to:
ARCH ?= arm CROSS_COMPILE ?= armv5tel-redhat-linux-gnueabi-
and then building your kernel as usual.