Erik de Castro Lopo wrote: > Yeah, the code that uses Config.cProjectVersion is this: > > > #if !defined(darwin_TARGET_OS) > -- 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 > #endif > > I wonder why that is unwanted on OSX.
Here's a new version of the patch that adds the missing import and removes the #ifdef hackery that requires the import to be absent on Darwin and present on all other systems. I've test that this compiles on both Linux and OSX. Ben may know of some other reason why that chunk of code is not wanted on OSX. Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/
>From 0732827c00e624dc57dc1801461c00a091d2a8ea Mon Sep 17 00:00:00 2001 From: Erik de Castro Lopo <[email protected]> Date: Sat, 14 May 2011 08:12:11 +1000 Subject: [PATCH] Add missing import and remove an unneeded #ifdef. Signed-off-by: Erik de Castro Lopo <[email protected]> --- compiler/nativeGen/AsmCodeGen.lhs | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/compiler/nativeGen/AsmCodeGen.lhs b/compiler/nativeGen/AsmCodeGen.lhs index dce5ac3..57faa6f 100644 --- a/compiler/nativeGen/AsmCodeGen.lhs +++ b/compiler/nativeGen/AsmCodeGen.lhs @@ -50,6 +50,7 @@ import qualified RegAlloc.Graph.TrivColorable as Color import TargetReg import Platform +import Config import Instruction import PIC import Reg @@ -450,14 +451,12 @@ makeImportsDoc dflags imports -- stack so add the note in: Pretty.$$ Pretty.text ".section .note.GNU-stack,\"\",@progbits" #endif -#if !defined(darwin_TARGET_OS) -- 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.$$ let compilerIdent = Pretty.text "GHC" Pretty.<+> Pretty.text cProjectVersion in Pretty.text ".ident" Pretty.<+> Pretty.doubleQuotes compilerIdent -#endif where -- Generate "symbol stubs" for all external symbols that might -- 1.7.4.4
_______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
