trim and simplify cross compilation from linux modifications