summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2007-09-10 12:27:56 +0000
committerIan Lynagh <igloo@earth.li>2007-09-10 12:27:56 +0000
commit3f070beb602a1b40d185ec49f7b556a7cc624d51 (patch)
tree27b0ce36d6c4103953ab9b1305c645add49ed7c6 /compiler
parentfb4afdd4bc4c19b8e8695c7019368f6530f9fa37 (diff)
downloadhaskell-3f070beb602a1b40d185ec49f7b556a7cc624d51.tar.gz
Turn off orphan warnings
We also avoid using -fno-warn-orphans with older GHCs that don't understand the flag.
Diffstat (limited to 'compiler')
-rw-r--r--compiler/Makefile5
-rw-r--r--compiler/cmm/Cmm.hs4
-rw-r--r--compiler/cmm/PprCmmZ.hs3
3 files changed, 6 insertions, 6 deletions
diff --git a/compiler/Makefile b/compiler/Makefile
index f9a0b5846c..342a1ab156 100644
--- a/compiler/Makefile
+++ b/compiler/Makefile
@@ -166,6 +166,11 @@ odir=stage$(stage)
SRC_HC_OPTS += $(patsubst %, -i$(odir)/%, $(ALL_DIRS))
SRC_HC_OPTS += -Wall -fno-warn-name-shadowing
+# Turn off orphan warnings, but only if the flag exists (i.e. not if we
+# are building stage 1 and using GHC < 6.3).
+ifneq "$(stage) $(ghc_ge_603)" "1 NO"
+SRC_HC_OPTS += -fno-warn-orphans
+endif
HS_OBJS = $(patsubst %, $(odir)/%, $(addsuffix .$(way_)o,$(basename $(HS_SRCS))))
C_OBJS = $(patsubst %, $(odir)/%, $(addsuffix .$(way_)o,$(basename $(C_SRCS))))
diff --git a/compiler/cmm/Cmm.hs b/compiler/cmm/Cmm.hs
index db5accd3c0..afa47a24f7 100644
--- a/compiler/cmm/Cmm.hs
+++ b/compiler/cmm/Cmm.hs
@@ -1,7 +1,3 @@
-{-# OPTIONS -fno-warn-name-shadowing -w #-}
--- We'd like to use -fno-warn-orphans rather than -w, but old compilers
--- don't understand it so building stage1 fails.
-
-----------------------------------------------------------------------------
--
-- Cmm data types
diff --git a/compiler/cmm/PprCmmZ.hs b/compiler/cmm/PprCmmZ.hs
index 390bca6b10..d333b05770 100644
--- a/compiler/cmm/PprCmmZ.hs
+++ b/compiler/cmm/PprCmmZ.hs
@@ -1,6 +1,5 @@
-{-# OPTIONS -Wall -fno-warn-name-shadowing -fno-warn-orphans #-}
-module PprCmmZ
+module PprCmmZ
( pprCmmGraph
)
where