refixed build error, O3 optimization, added linaro 4.8 compatibility(UNTESTED)