ARM: 8429/1: disable GCC SRA optimization
[firefly-linux-kernel-4.4.55.git] / arch / arm / Makefile
index 1ba358ba16b871aec3b366cab9b4e4066048e69c..7d4ce431107b171f18605f4be4d01a003795f7d1 100644 (file)
@@ -55,6 +55,14 @@ endif
 
 comma = ,
 
+#
+# The Scalar Replacement of Aggregates (SRA) optimization pass in GCC 4.9 and
+# later may result in code being generated that handles signed short and signed
+# char struct members incorrectly. So disable it.
+# (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65932)
+#
+KBUILD_CFLAGS  += $(call cc-option,-fno-ipa-sra)
+
 # This selects which instruction set is used.
 # Note that GCC does not numerically define an architecture version
 # macro, but instead defines a whole series of macros which makes