Revert "Partially revert "Some compiler flags changes""

This reverts commit 2466d5f3bc828cdcabd2129c1f99c898f3d5308b.
Merge remote-tracking branch 'upstream/kitkat' into kitkat