From: Duncan Coutts Date: Thu, 6 Jul 2006 11:47:12 +0000 (+0000) Subject: Add ghc and version number in .ident directive in NCG X-Git-Tag: Before_FC_branch_merge~263 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=ea0253067c7043854beee3f19dcfe8b4ecf2a0b3 Add ghc and version number in .ident directive in NCG Just because we can and because every other compiler does, lets stick in an identifier directive: .ident "GHC x.y.z" into the assembly output of the NCG. --- diff --git a/compiler/nativeGen/AsmCodeGen.lhs b/compiler/nativeGen/AsmCodeGen.lhs index 3bc9277..fa0ff89 100644 --- a/compiler/nativeGen/AsmCodeGen.lhs +++ b/compiler/nativeGen/AsmCodeGen.lhs @@ -39,6 +39,7 @@ import CLabel ( pprCLabel ) import ErrUtils ( dumpIfSet_dyn ) import DynFlags ( DynFlags, DynFlag(..), dopt ) import StaticFlags ( opt_Static, opt_PIC ) +import Config ( cProjectVersion ) import Digraph import qualified Pretty @@ -140,6 +141,12 @@ nativeCodeGen dflags cmms us -- stack so add the note in: Pretty.$$ Pretty.text ".section .note.GNU-stack,\"\",@progbits" #endif + -- And just because every other compiler does, lets stick in + -- an identifier directive: .ident "GHC x.y.z" + Pretty.$$ let compilerIdent = Pretty.text "GHC" Pretty.<+> + Pretty.text cProjectVersion + in Pretty.text ".ident" Pretty.<+> + Pretty.doubleQuotes compilerIdent ) }