Skip to content

Instantly share code, notes, and snippets.

@Terkwood
Forked from aumouvantsillage/Building VC4CL
Last active March 1, 2020 16:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Terkwood/0204491f9f1f6eb94c2f4a12d7340d30 to your computer and use it in GitHub Desktop.
Save Terkwood/0204491f9f1f6eb94c2f4a12d7340d30 to your computer and use it in GitHub Desktop.
Building VC4C and VC4CL on a Raspberry Pi 3 with Raspbian Stretch
sudo apt install git cmake clang-3.9 opencl-headers ocl-icd-dev ocl-icd-opencl-dev
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.9 100
git clone https://github.com/doe300/VC4C.git
git clone https://github.com/doe300/VC4CL.git
git clone https://github.com/doe300/VC4CLStdLib.git
cd VC4C
cmake -DBUILD_TESTING=OFF -DSPIRV_FRONTEND=OFF
make
sudo make install
cd -
cd VC4CL
cmake -DBUILD_TESTING=OFF
make
sudo make install
cd -
mkdir VC4CL-test
cd VC4CL-test
wget https://raw.githubusercontent.com/doe300/VC4C/master/example/fibonacci.cl
export LD_LIBRARY_PATH=/usr/local/lib
VC4C --llvm --hex -o fibonacci.hex fibonacci.cl
@Terkwood
Copy link
Author

Terkwood commented Mar 1, 2020

Needed to symlink /usr/bin/llvm-link to version 5.0

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