File | Date | Author | Commit |
---|---|---|---|
.gitattributes | 2018-09-02 |
![]() |
[24a093] Big Data files |
LICENSE | 2018-09-02 |
![]() |
[41be8e] Initial commit |
README.md | 2018-09-06 |
![]() |
[418177] Github's LFS support bandwidth limit is over |
gcc-6.3.0-rpi.tar.bz2 | 2018-09-02 |
![]() |
[24a093] Big Data files |
gcc-8.2.0-rpi.tar.bz2 | 2018-09-02 |
![]() |
[24a093] Big Data files |
gcc-8.2.0.tar.bz2 | 2018-09-02 |
![]() |
[24a093] Big Data files |
Raspberry Pi Zero/2/3 any version/model (Performance may vary)<t></t>
This project contains the Latest Set of Precompiled Raspberry pi GCC Cross-Compilers(i.e. 8.2.0), saving your tons of time(No compiling or Error Handling needed whatsoever). Just Extract, Link & Enjoy full GCC(Raspberry Pi) functionality in your Machine. You can use it as native compiler for raspberry pi(Can be used besides old & slow 6.3.0 GCC with full C++17 support), Or use it as Cross-Compiler in any Linux Machine(Tested on Latest Ubuntu/bionic x64) to compile programs for your Raspberry Pi (Both Latest 8.2.0 & Current 6.3.0 binaries available).
gcc-6.3.0-rpi.tar.bz2
- GCC Raspberry Pi Cross-Compilier version 6.3.0, works with Ubuntu x64(or other Linux x64)gcc-8.2.0-rpi.tar.bz2
- GCC Raspberry Pi Cross-Compilier version 8.2.0, works with Ubuntu x64(or other Linux x64)gcc-8.2.0.tar.bz2
- GCC Native Raspberry Pi version 8.2.0, works with Raspberry Pi 2/3 any Model(Zero not tested)Building GCC 8.2.0 with the given cross compiler took about 35 minutes on my Ubuntu machine on all cores. Compare this with the straight 4~6 hours needed to build GCC 8.2.0 directly on Pi 3B+(+10 hours on Rpi2) at full CPU Load plus memory swapping needed and you will see the advantage of having a cross compiler on your main machine.
Compressed Binary Files are already available in this repo.
You can easily download them through your Bash/Terminal:
wget https://media.githubusercontent.com/media/abhiTronix/raspberry-pi-cross-compilers/master/<filename e.g gcc-8.2.0.tar.bz2>
sudo apt-get update && dist-upgrade
sudo apt install build-essential gawk git textinfo bison
Extract files using cmd: tar xf <filename e.g gcc-8.2.0.tar.bz2>
/opt
) using cmd: sudo mv <extracted folder-name e.g gcc-8.2.0> /opt
Properly configure paths as below(Permanently by adding it to your .bashrc
):
echo 'export PATH=/opt/<extracted folder-name e.g gcc-8.2.0>/bin:$PATH' >> .bashrc
echo 'export LD_LIBRARY_PATH=/opt/<extracted folder-name e.g gcc-8.2.0>/lib:$LD_LIBRARY_PATH' >> .bashrc
Manage Links as below:(Native Compiler Only)
source .bashrc
sudo ln -s /usr/include/arm-linux-gnueabihf/sys /usr/include/sys
sudo ln -s /usr/include/arm-linux-gnueabihf/bits /usr/include/bits
sudo ln -s /usr/include/arm-linux-gnueabihf/gnu /usr/include/gnu
sudo ln -s /usr/include/arm-linux-gnueabihf/asm /usr/include/asm
sudo ln -s /usr/lib/arm-linux-gnueabihf/crti.o /usr/lib/crti.o
sudo ln -s /usr/lib/arm-linux-gnueabihf/crt1.o /usr/lib/crt1.o
sudo ln -s /usr/lib/arm-linux-gnueabihf/crtn.o /usr/lib/crtn.o
### That's it, Enjoy ;)
## Testing: (Post Linking)
You can check Installed versions as below:
- Native Compiler(Raspberry pi):
gcc --version
ld -v
ldd -v
- Cross- Compiler (Ubuntu x64):
arm-linux-gnueabihf-gcc --version
arm-linux-gnueabihf-ld -v
arm-linux-gnueabihf-ldd -v
The original compiled GCC files source is licensed under the GNU v3.0 license. However, This Project is licensed under the Apache 2.0 license.
You are welcome to contribute with suggestions or pull requests. To contact me, send an email.
https://gcc.gnu.org/ for original source files.
https://www.raspberrypi.org/ for kernel Headers.
http://preshing.com/20141119/how-to-build-a-gcc-cross-compiler/ for nice tuitorial.