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>

Change-Id: I55ee46245ee6cff355214ec63fbf55c9857e09ba