work around a gcc 4.1.0 codegen bug in -O2 by forcing -O1 for GHC.Show
authorSimon Marlow <simonmar@microsoft.com>
Thu, 23 Mar 2006 13:45:14 +0000 (13:45 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Thu, 23 Mar 2006 13:45:14 +0000 (13:45 +0000)
See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26824

Makefile

index cf5917c..6078fba 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -48,6 +48,10 @@ SRC_HSC2HS_OPTS += -Iinclude -I$(FPTOOLS_TOP)/ghc/includes
 # ESSENTIAL, for getting reasonable performance from the I/O library:
 SRC_HC_OPTS += -funbox-strict-fields
 
+# Grrr, gcc-4.1.0 has a bug in -O2 and higher that causes miscompilation of
+# GHC.Show.itos.  See gcc bug #26824.  We must drop back to -O1.
+GHC/Show_HC_OPTS += -optc-O1
+
 # -----------------------------------------------------------------------------
 # PrimOpWrappers