mirror of
https://github.com/wichtounet/thor-os.git
synced 2025-09-23 19:57:13 -04:00
Created Cross Compiler (markdown)
parent
a0cc3ae8e6
commit
bad70682be
40
Cross-Compiler.md
Normal file
40
Cross-Compiler.md
Normal file
@ -0,0 +1,40 @@
|
||||
This page explains how to build the cross compiler for building and running Thor.
|
||||
|
||||
## Download
|
||||
|
||||
Download binutils and GCC
|
||||
|
||||
mkdir $HOME/src/
|
||||
cd $HOME/src/
|
||||
wget ftp://ftp.gnu.org/gnu/binutils/binutils-2.9.tar.gz
|
||||
wget ftp://ftp.gnu.org/gnu/gcc/gcc-4.8.2/gcc-4.8.2.tar.gz
|
||||
tar xvzf binutils*
|
||||
tar xvzf gcc*
|
||||
|
||||
## Configuration
|
||||
|
||||
export PREFIX="$HOME/opt/cross"
|
||||
export TARGET=x86_64-elf
|
||||
export PATH="$PREFIX/bin:$PATH"
|
||||
|
||||
## Build binutils
|
||||
|
||||
cd $HOME/src
|
||||
mkdir build-binutils
|
||||
cd build-binutils
|
||||
../binutils-*/configure --target=$TARGET --prefix="$PREFIX" --disable-nls
|
||||
make
|
||||
make install
|
||||
|
||||
## Build GCC
|
||||
|
||||
cd $HOME/src
|
||||
mkdir build-gcc
|
||||
cd build-gcc
|
||||
../gcc-*/configure --target=$TARGET --prefix="$PREFIX" --disable-nls --enable-languages=c,c++
|
||||
make all-gcc
|
||||
make all-target-libgcc
|
||||
make install-gcc
|
||||
make install-target-libgcc
|
||||
|
||||
Normally, you should now have a working x86_64-elf cross compiler.
|
Loading…
x
Reference in New Issue
Block a user