[commit: ghc] master: Drop redundant `-D__GLASGOW_HASKELL__=...` flag (351dea4)

git at git.haskell.org git at git.haskell.org
Thu Dec 31 16:42:54 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/351dea4a7c07f4e845eac6c2e895f6f41524b40c/ghc

>---------------------------------------------------------------

commit 351dea4a7c07f4e845eac6c2e895f6f41524b40c
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Thu Dec 31 16:58:28 2015 +0100

    Drop redundant `-D__GLASGOW_HASKELL__=...` flag
    
    In 3549c952b535803270872adaf87262f2df0295a4 a `include/ghcversions.h` include
    file was introduced which defines `__GLASGOW_HASKELL__` as well.
    
    So there's no need to define it twice.


>---------------------------------------------------------------

351dea4a7c07f4e845eac6c2e895f6f41524b40c
 compiler/main/DriverPipeline.hs | 9 ++-------
 includes/ghc.mk                 | 4 +---
 2 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index 4936ace..d3038bc 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -1191,9 +1191,7 @@ runPhase (RealPhase cc_phase) input_fn dflags
                        ++ verbFlags
                        ++ [ "-S" ]
                        ++ cc_opt
-                       ++ [ "-D__GLASGOW_HASKELL__="++cProjectVersionInt
-                          , "-include", ghcVersionH
-                          ]
+                       ++ [ "-include", ghcVersionH ]
                        ++ framework_paths
                        ++ split_opt
                        ++ include_paths
@@ -2032,10 +2030,7 @@ doCpp dflags raw input_fn output_fn = do
 #endif
     -- Default CPP defines in Haskell source
     ghcVersionH <- getGhcVersionPathName dflags
-    let hsSourceCppOpts =
-          [ "-D__GLASGOW_HASKELL__="++cProjectVersionInt
-          , "-include", ghcVersionH
-          ]
+    let hsSourceCppOpts = [ "-include", ghcVersionH ]
 
     -- MIN_VERSION macros
     let uids = explicitPackages (pkgState dflags)
diff --git a/includes/ghc.mk b/includes/ghc.mk
index e87a487..aacca08 100644
--- a/includes/ghc.mk
+++ b/includes/ghc.mk
@@ -60,9 +60,7 @@ $(includes_H_VERSION) : mk/project.mk | $$(dir $$@)/.
 	@echo "#ifndef __GHCVERSION_H__"  > $@
 	@echo "#define __GHCVERSION_H__" >> $@
 	@echo >> $@
-	@echo "#ifndef __GLASGOW_HASKELL__" >> $@
-	@echo "# define __GLASGOW_HASKELL__ $(ProjectVersionInt)" >> $@
-	@echo "#endif" >> $@
+	@echo "#define __GLASGOW_HASKELL__ $(ProjectVersionInt)" >> $@
 	@echo >> $@
 	@if [ -n "$(ProjectPatchLevel1)" ]; then \
 	  echo "#define __GLASGOW_HASKELL_PATCHLEVEL1__ $(ProjectPatchLevel1)" >> $@; \



More information about the ghc-commits mailing list