Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
triazo
/
kernel
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
3
Merge Requests
0
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
02274d95
authored
Sep 03, 2015
by
triazo
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Add script to make cross compiler
parent
d8be5810
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
0 deletions
cross.sh
cross.sh
0 → 100755
View file @
02274d95
#!/bin/bash
if
[[
"
$1
"
==
""
]]
then
echo
"Usage:
$0
/path/to/install/dir"
exit
fi
echo
"Ensure you have libgmp3-dev libmpfr-dev libisl-dev libcloog-isl-dev libmpc-dev texinfo installed, as well as build-essential"
export
PREFIX
=
"
$1
"
export
TARGET
=
i686-elf
export
PATH
=
"
$PREFIX
/bin:
$PATH
"
mkdir
-p
$PREFIX
/build/tarballs
cd
$PREFIX
/build/tarballs
wget
"ftp://ftp.gnu.org/gnu/gcc/gcc-4.8.4/gcc-4.8.4.tar.gz"
wget
"ftp://ftp.gnu.org/gnu/binutils/binutils-2.25.tar.gz"
mkdir
-p
$PREFIX
/build
cd
$PREFIX
/build
tar
-zxf
"tarballs/binutils-2.25.tar.gz"
tar
-zxf
"tarballs/gcc-4.8.4.tar.gz"
mkdir
$PREFIX
/build/binutils-build
cd
$PREFIX
/build/binutils-build
../binutils-2.25/configure
--target
=
$TARGET
--prefix
=
"
$PREFIX
"
--with-sysroot
--disable-nls
--disable-werror
make
make install
mkdir
-p
$PREFIX
/build/gcc
cd
$PREFIX
/build/gcc
which
--
$TARGET
-as
||
echo
"
$TARGET
-as is not in the PATH"
../gcc-4.8.4/configure
--target
=
$TARGET
--prefix
=
"
$PREFIX
"
--disable-nls
--enable-languages
=
c,c++
--without-headers
make all-gcc
make all-target-libgcc
make install-gcc
make install-target-libgcc
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment