Linaro 4.8 fixes

Change-Id: Ic25ad1d4e722370911af87abaea774cd6efc86bc
linaro 4.8 fixes

Change-Id: I0d4f043b8114075d30ecc928962a7c157b321883
GCC 4.7 fixes

Change-Id: If0c16b6a494c7300d5890658d10d4f8e8f717a39