on ubuntu, the option order is important for gcc