tce-load -i curl-dev expat2-dev python-dev perl5 gettext

cd git-2.9.2

CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local --libexecdir=/usr/local/lib --with-gitconfig=/usr/local/etc/gitconfig

find . -name Makefile -type f -exec sed -i 's/-g -O2/ /g' {} \;
find . -name config.mak.autogen -type f -exec sed -i 's/-g -O2/ /g' {} \;

make PERL_PATH="/usr/local/bin/perl" PYTHON_PATH="/usr/local/bin/python"
sudo make  PERL_PATH="/usr/local/bin/perl" PYTHON_PATH="/usr/local/bin/python" install
