sdcc: compiling SDCCicode.c with -O2 sends gcc 4.6.x into an infinite loop, workaroun...
authorJo-Philipp Wich <jow@openwrt.org>
Tue, 10 Apr 2012 13:18:45 +0000 (13:18 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Tue, 10 Apr 2012 13:18:45 +0000 (13:18 +0000)
SVN-Revision: 31236

tools/sdcc/patches/100-workaround-gcc-4.6.2-hang.patch [new file with mode: 0644]

diff --git a/tools/sdcc/patches/100-workaround-gcc-4.6.2-hang.patch b/tools/sdcc/patches/100-workaround-gcc-4.6.2-hang.patch
new file mode 100644 (file)
index 0000000..71db14f
--- /dev/null
@@ -0,0 +1,20 @@
+--- a/src/SDCCicode.c
++++ b/src/SDCCicode.c
+@@ -1130,6 +1130,9 @@ iCode *getBuiltinParms (iCode *ic, int *
+     return ic;
+ }
++#pragma GCC push_options
++#pragma GCC optimize ("O0")
++
+ /*-----------------------------------------------------------------*/
+ /* operandOperation - performs operations on operands             */
+ /*-----------------------------------------------------------------*/
+@@ -1405,6 +1408,7 @@ operandOperation (operand * left, operan
+   return retval;
+ }
++#pragma GCC pop_options
+ /*-----------------------------------------------------------------*/