tce-load -i compiletc apr-util-dev scons wget https://archive.apache.org/dist/serf/serf-1.3.10.tar.bz2 cd serf-1.3.10 sed -i "/Append/s:RPATH=libdir,::" SConstruct sed -i "/Default/s:lib_static,::" SConstruct sed -i "/Alias/s:install_static,::" SConstruct find . -name SConstruct -type f -exec sed -i 's/-O2//g' {} \; find . -name SConstruct -type f -exec sed -i 's/O2//g' {} \; find . -name SConstruct -type f -exec sed -i 's/-g//g' {} \; find . -name SConstruct -type f -exec sed -i 's/-g -O2//g' {} \; scons PREFIX=/usr/local APR=/usr/local APU=/usr/local CC="gcc -flto -mtune=generic -Os -pipe" sudo scons PREFIX=/usr/local install