Forward port gcc-4.9.x fixes from AOSP master

https://android-review.googlesource.com/#/c/79747/

Credits to Bernhard Rosenkränzer linaro.org

Signed off-by: Paul Beeler <sparksco@gmail.com>