Skip to content

Instantly share code, notes, and snippets.

@craigminihan
Last active January 6, 2018 03:38
Show Gist options
  • Save craigminihan/2a169c0ef3550b078e46 to your computer and use it in GitHub Desktop.
Save craigminihan/2a169c0ef3550b078e46 to your computer and use it in GitHub Desktop.
Build GCC 4.9.3 on a Raspberry Pi 2b running Raspian 2015-05-05
sudo apt-get install libmpc-dev
sudo apt-get install libmpfr-dev
sudo apt-get install libgmp-dev
export LDFLAGS='-L/usr/lib/arm-linux-gnueabihf/ -L/usr/lib/gcc/arm-linux-gnueabihf/4.6/'
export CFLAGS='-I/usr/include/arm-linux-gnueabihf/ -mfloat-abi=hard '${LDFLAGS}
export CXXFLAGS=${CFLAGS}
export CPPFLAGS=${CFLAGS}
sudo ln -s /usr/lib/arm-linux-gnueabihf/crti.o /usr/lib
sudo ln -s /usr/lib/arm-linux-gnueabihf/crtn.o /usr/lib
sudo ln -s /usr/lib/arm-linux-gnueabihf/crt1.o /usr/lib
cd ~/Downloads
curl ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.9.3/gcc-4.9.3.tar.bz2 -O
tar xvfj gcc-4.9.3.tar.bz2
cd gcc-4.9.3
./configure --disable-multilib --enable-languages=c,c++ --program-suffix=-4.9
make -j 2
sudo make install
@craigminihan
Copy link
Author

Works for me!! However will take hours to compile, link and install!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment