diff options
| author | sof <unknown> | 2001-08-19 20:14:22 +0000 |
|---|---|---|
| committer | sof <unknown> | 2001-08-19 20:14:22 +0000 |
| commit | 93242d742387790c56560ca6f855cb5aee81ff72 (patch) | |
| tree | 802a7ae2a33b5ed675a3c0cc308f3e8ccee01ffe /ghc/compiler | |
| parent | 9a6f4dd7cca2100a0108f88c7669e7df3422a155 (diff) | |
| download | haskell-93242d742387790c56560ca6f855cb5aee81ff72.tar.gz | |
[project @ 2001-08-19 20:14:22 by sof]
Nuke uses of LEADING_UNDERSCORE; use Config.cLeadingUnderscore instead.
Diffstat (limited to 'ghc/compiler')
| -rw-r--r-- | ghc/compiler/ghci/Linker.lhs | 10 | ||||
| -rw-r--r-- | ghc/compiler/main/DriverPipeline.hs | 5 | ||||
| -rw-r--r-- | ghc/compiler/nativeGen/MachMisc.lhs | 8 |
3 files changed, 4 insertions, 19 deletions
diff --git a/ghc/compiler/ghci/Linker.lhs b/ghc/compiler/ghci/Linker.lhs index e7fb27800c..238d0094f0 100644 --- a/ghc/compiler/ghci/Linker.lhs +++ b/ghc/compiler/ghci/Linker.lhs @@ -6,9 +6,6 @@ \begin{code} {-# OPTIONS -#include "Linker.h" #-} --- so that we can see defn of LEADING_UNDERSCORE -#include "../includes/config.h" - module Linker ( initLinker, -- :: IO () loadObj, -- :: String -> IO () @@ -23,17 +20,14 @@ import Foreign ( Ptr, nullPtr ) import PrelByteArr import PrelPack (packString) import Panic ( panic ) +import DriverUtil ( prefixUnderscore ) -- --------------------------------------------------------------------------- -- RTS Linker Interface -- --------------------------------------------------------------------------- lookupSymbol str_in = do -# ifdef LEADING_UNDERSCORE - let str = '_':str_in -# else - let str = str_in -# endif + let str = prefixUnderscore str_in addr <- c_lookupSymbol (packString str) if addr == nullPtr then return Nothing diff --git a/ghc/compiler/main/DriverPipeline.hs b/ghc/compiler/main/DriverPipeline.hs index 2142f91397..f4722bb283 100644 --- a/ghc/compiler/main/DriverPipeline.hs +++ b/ghc/compiler/main/DriverPipeline.hs @@ -868,13 +868,8 @@ doLink o_files = do ++ pkg_extra_ld_opts ++ extra_ld_opts ++ if static && not no_hs_main then -#ifdef LEADING_UNDERSCORE - [ "-u", "_PrelMain_mainIO_closure" , - "-u", "___init_PrelMain"] -#else [ "-u", prefixUnderscore "PrelMain_mainIO_closure" , "-u", prefixUnderscore "__init_PrelMain"] -#endif else [])) -- parallel only: move binary to another dir -- HWL diff --git a/ghc/compiler/nativeGen/MachMisc.lhs b/ghc/compiler/nativeGen/MachMisc.lhs index 1f747157f8..d44cea4fbf 100644 --- a/ghc/compiler/nativeGen/MachMisc.lhs +++ b/ghc/compiler/nativeGen/MachMisc.lhs @@ -55,17 +55,13 @@ import Panic ( panic ) import GlaExts ( word2Int#, int2Word#, shiftRL#, and#, (/=#) ) import Outputable ( pprPanic, ppr ) import IOExts ( trace ) +import Config ( cLeadingUnderscore ) import FastTypes \end{code} \begin{code} underscorePrefix :: Bool -- leading underscore on assembler labels? - -#ifdef LEADING_UNDERSCORE -underscorePrefix = True -#else -underscorePrefix = False -#endif +underscorePrefix = (cLeadingUnderscore == "YES") --------------------------- fmtAsmLbl :: String -> String -- for formatting labels |
