P2 GCC Docs

A port of GCC 9.* for the Parallax Propeller 2

NOTE: This is very alpha and many (most?) things don't work yet!

Manual Install

Get the sources

git clone https://gitlab.com/ntosme2/p2gcc-dev.git
cd p2gcc-dev
git submodule init
# this will take a long time!
git submodule update
# for most systems you'll need to run this script to get some dependencies
cd gcc
./contrib/download_prerequisites
cd ..

Compile

mkdir install-prefix
./build_binutils.sh
./build_gcc.sh

Update

cd p2gcc-dev
# update the build repo
git pull
# update binutils and gcc to the current linked version
git submodule update

Using GCC

export PATH=$PATH:`pwd`/install-prefix/bin

# generate some assembly
propeller-elf-g++ foo.cpp -S -O2

# assemble to an object file
propeller-elf-as foo.s