Last active
November 13, 2023 12:50
-
-
Save larpon/998febd5f3c33f995f0ecd561c043dcb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## should be run in V's main repo folder! | |
rm -rf tinycc/ | |
rm -rf thirdparty/tcc/ | |
pushd . | |
git clone git://repo.or.cz/tinycc.git | |
cd tinycc | |
./configure \ | |
--prefix=thirdparty/tcc \ | |
--bindir=thirdparty/tcc \ | |
--crtprefix=thirdparty/tcc/lib:/usr/lib:/usr/lib/arm-linux-gnueabihf \ | |
--libpaths=thirdparty/tcc/lib:/usr/lib/arm-linux-gnueabihf:/usr/lib:/lib/arm-linux-gnueabihf:/lib:/usr/local/lib/arm-linux-gnueabihf:/usr/local/lib \ | |
--extra-cflags="-O3 -flto" \ | |
--debug | |
make | |
make install | |
popd | |
mv tinycc/thirdparty/tcc thirdparty/tcc | |
mv thirdparty/tcc/tcc thirdparty/tcc/tcc.exe | |
thirdparty/tcc/tcc.exe -v -v | |
ln -s /usr/lib/arm-linux-gnueabihf/libatomic.so.1 "$(pwd)/thirdparty/tcc/lib/libatomic.so" | |
ln -s /usr/lib/arm-linux-gnueabihf/libgc.a "$(pwd)/thirdparty/tcc/lib/libgc.a" | |
export LD_FLAGS=-latomic |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Relayed from Discord:
credits to @spytheman :
"the full script so far from a fresh Raspbian installation with tcc is:"
Without tcc (more reliable, but slower):
More resources on how to compile/use it there:
vlang/v#13759
and the exports can be added to the end of
~/.bashrc