cvs commit: fptools/ghc/compiler HsVersions.h Makefile fptools/ghc/compiler/cmm CLabel.hs MachOp.hs fptools/ghc/compiler/codeGen CgProf.hs CgUtils.hs fptools/ghc/compiler/ghci InteractiveUI.hs Linker.lhs ...

Simon Marlow simonmar at haskell.org
Fri Jan 28 07:56:28 EST 2005


simonmar    2005/01/28 04:56:27 PST

  Modified files:
    ghc/compiler         HsVersions.h Makefile 
    ghc/compiler/cmm     CLabel.hs MachOp.hs 
    ghc/compiler/codeGen CgProf.hs CgUtils.hs 
    ghc/compiler/ghci    InteractiveUI.hs Linker.lhs 
    ghc/compiler/main    CmdLineOpts.lhs Constants.lhs 
                         DriverFlags.hs DriverPhases.hs 
                         DriverPipeline.hs DriverState.hs 
                         DriverUtil.hs Main.hs Packages.lhs 
                         SysTools.lhs 
    ghc/compiler/nativeGen MachInstrs.hs NCG.h 
                           PositionIndependentCode.hs 
                           RegisterAlloc.hs 
    ghc/compiler/typecheck TcForeign.lhs 
    ghc/compiler/utils   Panic.lhs Util.lhs 
    ghc/docs/comm/rts-libs coding-style.html 
    ghc/docs/comm/the-beast coding-style.html 
    ghc/docs/users_guide phases.xml 
    ghc/includes         MachRegs.h Makefile Rts.h RtsConfig.h 
                         SMP.h Signals.h Stg.h StgMiscClosures.h 
                         TSO.h TailCalls.h mkDerivedConstants.c 
    ghc/lib/compat/Compat Directory.hs RawSystem.hs 
    ghc/lib/compat/cbits directory.c rawSystem.c 
    ghc/rts              Adjustor.c AdjustorAsm.S Exception.h 
                         HeapStackCheck.cmm Linker.c 
                         LinkerInternals.h MBlock.c MBlock.h 
                         PrimOps.cmm RtsFlags.c RtsStartup.c 
                         RtsUtils.c Sanity.c Schedule.c Signals.c 
                         Signals.h Stats.c StgCRun.c Timer.c 
                         package.conf.in 
    ghc/rts/parallel     ParTicky.c 
    ghc/utils/ghc-pkg    Main.hs 
    ghc/utils/hsc2hs     Main.hs Makefile 
  Log:
  Rationalise the BUILD,HOST,TARGET defines.
  
  Recall that:
  
    - build is the platform we're building on
    - host is the platform we're running on
    - target is the platform we're generating code for
  
  The change is that now we take these definitions as applying from the
  point of view of the particular source code being built, rather than
  the point of view of the whole build tree.
  
  For example, in RTS and library code, we were previously testing the
  TARGET platform.  But under the new rule, the platform on which this
  code is going to run is the HOST platform.  TARGET only makes sense in
  the compiler sources.
  
  In practical terms, this means that the values of BUILD, HOST & TARGET
  may vary depending on which part of the build tree we are in.
  
  Actual changes:
  
   - new file: includes/ghcplatform.h contains platform defines for
     the RTS and library code.
  
   - new file: includes/ghcautoconf.h contains the autoconf settings
     only (HAVE_BLAH).  This is so that we can get hold of these
     settings independently of the platform defines when necessary
     (eg. in GHC).
  
   - ghcconfig.h now #includes both ghcplatform.h and ghcautoconf.h.
  
   - MachRegs.h, which is included into both the compiler and the RTS,
     now has to cope with the fact that it might need to test either
     _TARGET_ or _HOST_ depending on the context.
  
   - the compiler's Makefile now generates
       stage{1,2,3}/ghc_boot_platform.h
     which contains platform defines for the compiler.  These differ
     depending on the stage, of course: in stage2, the HOST is the
     TARGET of stage1.  This was wrong before.
  
   - The compiler doesn't get platform info from Config.hs any more.
     Previously it did (sometimes), but unless we want to generate
     a new Config.hs for each stage we can't do this.
  
   - GHC now helpfully defines *_{BUILD,HOST}_{OS,ARCH} automatically
     in CPP'd Haskell source.
  
   - ghcplatform.h defines *_TARGET_* for backwards compatibility
     (ghcplatform.h is included by ghcconfig.h, which is included by
     config.h, so code which still #includes config.h will get the TARGET
     settings as before).
  
   - The Users's Guide is updated to mention *_HOST_* rather than
     *_TARGET_*.
  
   - coding-style.html in the commentary now contains a section on
     platform defines.  There are further doc updates to come.
  
  Thanks to Wolfgang Thaller for pointing me in the right direction.
  
  Revision  Changes    Path
  1.36      +12 -0     fptools/ghc/compiler/HsVersions.h
  1.282     +106 -3    fptools/ghc/compiler/Makefile
  1.14      +0 -1      fptools/ghc/compiler/cmm/CLabel.hs
  1.5       +0 -1      fptools/ghc/compiler/cmm/MachOp.hs
  1.6       +0 -2      fptools/ghc/compiler/codeGen/CgProf.hs
  1.12      +0 -3      fptools/ghc/compiler/codeGen/CgUtils.hs
  1.185     +1 -2      fptools/ghc/compiler/ghci/InteractiveUI.hs
  1.50      +0 -1      fptools/ghc/compiler/ghci/Linker.lhs
  1.198     +4 -5      fptools/ghc/compiler/main/CmdLineOpts.lhs
  1.37      +0 -1      fptools/ghc/compiler/main/Constants.lhs
  1.148     +12 -12    fptools/ghc/compiler/main/DriverFlags.hs
  1.33      +1 -3      fptools/ghc/compiler/main/DriverPhases.hs
  1.179     +12 -6     fptools/ghc/compiler/main/DriverPipeline.hs
  1.114     +13 -9     fptools/ghc/compiler/main/DriverState.hs
  1.50      +1 -2      fptools/ghc/compiler/main/DriverUtil.hs
  1.144     +1 -5      fptools/ghc/compiler/main/Main.hs
  1.26      +2 -5      fptools/ghc/compiler/main/Packages.lhs
  1.125     +0 -2      fptools/ghc/compiler/main/SysTools.lhs
  1.5       +0 -1      fptools/ghc/compiler/nativeGen/MachInstrs.hs
  1.13      +1 -1      fptools/ghc/compiler/nativeGen/NCG.h
  1.9       +0 -2      fptools/ghc/compiler/nativeGen/PositionIndependentCode.hs
  1.5       +0 -1      fptools/ghc/compiler/nativeGen/RegisterAlloc.hs
  1.72      +0 -1      fptools/ghc/compiler/typecheck/TcForeign.lhs
  1.31      +0 -1      fptools/ghc/compiler/utils/Panic.lhs
  1.72      +0 -1      fptools/ghc/compiler/utils/Util.lhs
  1.5       +1 -1      fptools/ghc/docs/comm/rts-libs/coding-style.html
  1.3       +44 -6     fptools/ghc/docs/comm/the-beast/coding-style.html
  1.5       +2 -2      fptools/ghc/docs/users_guide/phases.xml
  1.21      +42 -12    fptools/ghc/includes/MachRegs.h
  1.26      +46 -34    fptools/ghc/includes/Makefile
  1.31      +1 -1      fptools/ghc/includes/Rts.h
  1.4       +1 -1      fptools/ghc/includes/RtsConfig.h
  1.5       +2 -2      fptools/ghc/includes/SMP.h
  1.5       +1 -1      fptools/ghc/includes/Signals.h
  1.66      +4 -4      fptools/ghc/includes/Stg.h
  1.53      +2 -2      fptools/ghc/includes/StgMiscClosures.h
  1.40      +3 -3      fptools/ghc/includes/TSO.h
  1.18      +13 -13    fptools/ghc/includes/TailCalls.h
  1.11      +1 -1      fptools/ghc/includes/mkDerivedConstants.c
  1.11      +5 -7      fptools/ghc/lib/compat/Compat/Directory.hs
  1.3       +2 -4      fptools/ghc/lib/compat/Compat/RawSystem.hs
  1.3       +2 -6      fptools/ghc/lib/compat/cbits/directory.c
  1.2       +3 -12     fptools/ghc/lib/compat/cbits/rawSystem.c
  1.41      +31 -31    fptools/ghc/rts/Adjustor.c
  1.3       +8 -8      fptools/ghc/rts/AdjustorAsm.S
  1.11      +1 -1      fptools/ghc/rts/Exception.h
  1.8       +1 -1      fptools/ghc/rts/HeapStackCheck.cmm
  1.169     +40 -40    fptools/ghc/rts/Linker.c
  1.10      +3 -3      fptools/ghc/rts/LinkerInternals.h
  1.55      +7 -7      fptools/ghc/rts/MBlock.c
  1.23      +1 -1      fptools/ghc/rts/MBlock.h
  1.15      +3 -3      fptools/ghc/rts/PrimOps.cmm
  1.79      +1 -1      fptools/ghc/rts/RtsFlags.c
  1.89      +3 -3      fptools/ghc/rts/RtsStartup.c
  1.43      +5 -5      fptools/ghc/rts/RtsUtils.c
  1.39      +1 -1      fptools/ghc/rts/Sanity.c
  1.214     +5 -5      fptools/ghc/rts/Schedule.c
  1.45      +3 -3      fptools/ghc/rts/Signals.c
  1.15      +2 -2      fptools/ghc/rts/Signals.h
  1.50      +6 -6      fptools/ghc/rts/Stats.c
  1.49      +14 -14    fptools/ghc/rts/StgCRun.c
  1.4       +1 -1      fptools/ghc/rts/Timer.c
  1.10      +3 -3      fptools/ghc/rts/package.conf.in
  1.3       +1 -1      fptools/ghc/rts/parallel/ParTicky.c
  1.65      +5 -7      fptools/ghc/utils/ghc-pkg/Main.hs
  1.69      +5 -1      fptools/ghc/utils/hsc2hs/Main.hs
  1.45      +0 -3      fptools/ghc/utils/hsc2hs/Makefile


More information about the Cvs-ghc mailing list