This is an old information that was kind of useful when Chrome OS did not provide with native development functionality. The page is left here as an archive for all of those seven people who choose to keep using old Chromebooks.
This is a binary pakage of self-host (runs on the Chromebook) GCC compiler
for 32-bit ARMv7-based Chromebooks.
It includes (almost) minimum set of compiler and tools that are required to build another GCC, or any other tools of your choice.
Modified linker scripts and non-shared parts of glibc
are also packaged so that the compiler can produce dynamically-linked executables.
C, C++ and Fortran are enabled on GCC.
Technically you can build the same GCC using sources and environment provided by the Chromium OS team, but it took me quite a bit of time and effort to do so. So, I decided to provide the community with the resulting binary.
I compiled and verified this on my Acer Chromebook 13 (CB5-311-H14N).
Files are kept in the Google Drive, following the Chrome OS style of life: cros-tools at Google Drive
See the sources for licensing terms.
Make sure your Chromebook is in Developer Mode. First you need to enable execution of files in your home directory (you need to do this after every reboot):
mount -o remount,exec -i /home/chronos/user
Then, extract the downloaded archive in the Downloads
directory:
tar xpJf gcc-4.9.x-google-20150123_armv7a-cros-linux-gnueabi_v1.tar.xz -C ${HOME}/Downloads
Finally, load the environmental variables, and have fun (you need to do this on every new terminal, or you could add this to your .bashrc
):
. ${HOME}/Downloads/tools/tools.sh
Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/home/chronos/user/Downloads/tools/libexec/gcc/armv7a-cros-linux-gnueabi/4.9.x-google/lto-wrapper Target: armv7a-cros-linux-gnueabi Configured with: ../gcc/configure --prefix=/home/chronos/user/Downloads/tools --build=armv7a-cros-linux-gnueabi --host=armv7a-cros-linux-gnueabi --target=armv7a-cros-linux-gnueabi --enable-languages=c,c++,fortran --disable-multilib --disable-libcilkrts --disable-libitm --disable-libmudflap --disable-libquadmath --disable-libssp --with-arch=armv7-a --disable-esp --with-float=hard --with-mode=thumb --disable-sjlj-exceptions --with-as=/home/chronos/user/Downloads/tools/bin/as --with-ld=/home/chronos/user/Downloads/tools/bin/ld --disable-werror --with-native-system-header-dir=/home/chronos/user/Downloads/tools/armv7a-cros-linux-gnueabi/include Thread model: posix gcc version 4.9.x-google 20150123 (prerelease) (GCC)
Also includes gmp-6.0.0a
, mpfr-3.1.3
, mpc-1.0.3
, as they are required by the GCC.