Rodrigo Mesquita pushed to branch wip/T26166 at Glasgow Haskell Compiler / GHC

Commits:

26 changed files:

Changes:

  • compiler/GHC/Linker/Dynamic.hs
    ... ... @@ -144,6 +144,12 @@ linkDynLib logger tmpfs dflags0 unit_env o_files dep_packages
    144 144
                 -- About the options used for Darwin:
    
    145 145
                 -- -dynamiclib
    
    146 146
                 --   Apple's way of saying -shared
    
    147
    +            -- -undefined dynamic_lookup:
    
    148
    +            --   Without these options, we'd have to specify the correct
    
    149
    +            --   dependencies for each of the dylibs. Note that we could
    
    150
    +            --   (and should) do without this for all libraries except
    
    151
    +            --   the RTS; all we need to do is to pass the correct
    
    152
    +            --   HSfoo_dyn.dylib files to the link command.
    
    147 153
                 -- -single_module
    
    148 154
                 --   Build the dynamic library as a single "module", i.e. no
    
    149 155
                 --   dynamic binding nonsense when referring to symbols from
    
    ... ... @@ -176,6 +182,9 @@ linkDynLib logger tmpfs dflags0 unit_env o_files dep_packages
    176 182
                         , FileOption "" output_fn
    
    177 183
                         ]
    
    178 184
                      ++ map Option o_files
    
    185
    +                 ++ [ Option "-undefined",
    
    186
    +                      Option "dynamic_lookup"
    
    187
    +                    ]
    
    179 188
                      ++ (if toolSettings_ldSupportsSingleModule (toolSettings dflags)
    
    180 189
                             then [ Option "-single_module" ]
    
    181 190
                             else [ ])
    

  • libraries/base/src/System/CPUTime.hsc
    ... ... @@ -17,6 +17,7 @@
    17 17
     
    
    18 18
     #include "HsFFI.h"
    
    19 19
     #include "HsBaseConfig.h"
    
    20
    +#include "RtsIfaceStub.h"
    
    20 21
     
    
    21 22
     -- For various _POSIX_* #defines
    
    22 23
     #if defined(HAVE_UNISTD_H)
    

  • libraries/ghc-internal/ghc-internal.cabal.in
    ... ... @@ -486,6 +486,7 @@ Library
    486 486
             RtsIfaceStub.h
    
    487 487
         install-includes:
    
    488 488
             HsBase.h
    
    489
    +        RtsIfaceStub.h
    
    489 490
             consUtils.h
    
    490 491
     
    
    491 492
         if flag(need-atomic)
    

  • libraries/ghc-internal/include/RtsIfaceSymbols.h
    ... ... @@ -65,4 +65,3 @@ UNDEF_CLOSURE(GHCziInternalziWasmziPrimziImports, raiseJSException_closure)
    65 65
     UNDEF_CLOSURE(GHCziInternalziWasmziPrim, JSVal_con_info)
    
    66 66
     UNDEF_CLOSURE(GHCziInternalziWasmziPrim, threadDelay_closure)
    
    67 67
     #endif
    68
    -

  • libraries/ghc-internal/src/GHC/Internal/Clock.hsc
    ... ... @@ -15,8 +15,6 @@ import GHC.Internal.Float () -- for Num Double instance
    15 15
     import GHC.Internal.Num
    
    16 16
     #endif
    
    17 17
     
    
    18
    -#include "RtsIfaceStub.h"
    
    19
    -
    
    20 18
     -- | Return monotonic time in seconds, since some unspecified starting point
    
    21 19
     --
    
    22 20
     -- @since base-4.11.0.0
    

  • libraries/ghc-internal/src/GHC/Internal/ConsoleHandler.hsc
    ... ... @@ -19,7 +19,6 @@
    19 19
     -----------------------------------------------------------------------------
    
    20 20
     
    
    21 21
     module GHC.Internal.ConsoleHandler
    
    22
    -#include "RtsIfaceStub.h"
    
    23 22
     #if !defined(mingw32_HOST_OS)
    
    24 23
             where
    
    25 24
     
    

  • libraries/ghc-internal/src/GHC/Internal/Event/EPoll.hsc
    ... ... @@ -24,7 +24,6 @@ module GHC.Internal.Event.EPoll
    24 24
     import qualified GHC.Internal.Event.Internal as E
    
    25 25
     
    
    26 26
     #include "EventConfig.h"
    
    27
    -#include "RtsIfaceStub.h"
    
    28 27
     #if !defined(HAVE_EPOLL)
    
    29 28
     import GHC.Internal.Base
    
    30 29
     
    

  • libraries/ghc-internal/src/GHC/Internal/Event/KQueue.hsc
    ... ... @@ -16,7 +16,6 @@ module GHC.Internal.Event.KQueue
    16 16
     import qualified GHC.Internal.Event.Internal as E
    
    17 17
     
    
    18 18
     #include "EventConfig.h"
    
    19
    -#include "RtsIfaceStub.h"
    
    20 19
     #if !defined(HAVE_KQUEUE)
    
    21 20
     import GHC.Internal.Base
    
    22 21
     
    

  • libraries/ghc-internal/src/GHC/Internal/Event/Poll.hsc
    ... ... @@ -11,7 +11,6 @@ module GHC.Internal.Event.Poll
    11 11
         ) where
    
    12 12
     
    
    13 13
     #include "EventConfig.h"
    
    14
    -#include "RtsIfaceStub.h"
    
    15 14
     
    
    16 15
     #if !defined(HAVE_POLL_H)
    
    17 16
     import GHC.Internal.Base
    

  • libraries/ghc-internal/src/GHC/Internal/ExecutionStack/Internal.hsc
    ... ... @@ -21,7 +21,6 @@
    21 21
     #include "HsFFI.h"
    
    22 22
     #include "HsBaseConfig.h"
    
    23 23
     #include "rts/Libdw.h"
    
    24
    -#include "RtsIfaceStub.h"
    
    25 24
     
    
    26 25
     {-# LANGUAGE MultiWayIf #-}
    
    27 26
     
    

  • libraries/ghc-internal/src/GHC/Internal/Heap/Constants.hsc
    ... ... @@ -7,7 +7,6 @@ module GHC.Internal.Heap.Constants
    7 7
         ) where
    
    8 8
     
    
    9 9
     #include "MachDeps.h"
    
    10
    -#include "RtsIfaceStub.h"
    
    11 10
     
    
    12 11
     import GHC.Internal.Data.Bits
    
    13 12
     import GHC.Internal.Int
    

  • libraries/ghc-internal/src/GHC/Internal/Heap/InfoTable.hsc
    ... ... @@ -6,7 +6,6 @@ module GHC.Internal.Heap.InfoTable
    6 6
         ) where
    
    7 7
     
    
    8 8
     #include "Rts.h"
    
    9
    -#include "RtsIfaceStub.h"
    
    10 9
     
    
    11 10
     import GHC.Internal.Base
    
    12 11
     import GHC.Internal.Real
    

  • libraries/ghc-internal/src/GHC/Internal/Heap/InfoTable/Types.hsc
    ... ... @@ -10,7 +10,6 @@ module GHC.Internal.Heap.InfoTable.Types
    10 10
         ) where
    
    11 11
     
    
    12 12
     #include "Rts.h"
    
    13
    -#include "RtsIfaceStub.h"
    
    14 13
     
    
    15 14
     import GHC.Internal.Base
    
    16 15
     import GHC.Internal.Generics
    

  • libraries/ghc-internal/src/GHC/Internal/Heap/InfoTableProf.hsc
    ... ... @@ -10,7 +10,6 @@ module GHC.Internal.Heap.InfoTableProf
    10 10
     -- representation of StgInfoTable_ when hsc2hs runs.
    
    11 11
     #define PROFILING
    
    12 12
     #include "Rts.h"
    
    13
    -#include "RtsIfaceStub.h"
    
    14 13
     
    
    15 14
     import GHC.Internal.Base
    
    16 15
     import GHC.Internal.Real
    

  • libraries/ghc-internal/src/GHC/Internal/IO/Handle/Lock/Flock.hsc
    ... ... @@ -8,7 +8,6 @@
    8 8
     module GHC.Internal.IO.Handle.Lock.Flock where
    
    9 9
     
    
    10 10
     #include "HsBaseConfig.h"
    
    11
    -#include "RtsIfaceStub.h"
    
    12 11
     
    
    13 12
     #if !HAVE_FLOCK
    
    14 13
     -- See W1 of Note [Tracking dependencies on primitives] in GHC.Internal.Base
    

  • libraries/ghc-internal/src/GHC/Internal/IO/Handle/Lock/LinuxOFD.hsc
    ... ... @@ -8,7 +8,6 @@
    8 8
     module GHC.Internal.IO.Handle.Lock.LinuxOFD where
    
    9 9
     
    
    10 10
     #include "HsBaseConfig.h"
    
    11
    -#include "RtsIfaceStub.h"
    
    12 11
     
    
    13 12
     #if !HAVE_OFD_LOCKING
    
    14 13
     -- See W1 of Note [Tracking dependencies on primitives] in GHC.Internal.Base
    

  • libraries/ghc-internal/src/GHC/Internal/IO/Handle/Lock/Windows.hsc
    ... ... @@ -8,7 +8,6 @@
    8 8
     module GHC.Internal.IO.Handle.Lock.Windows where
    
    9 9
     
    
    10 10
     #include "HsBaseConfig.h"
    
    11
    -#include "RtsIfaceStub.h"
    
    12 11
     
    
    13 12
     #if !defined(mingw32_HOST_OS)
    
    14 13
     -- See W1 of Note [Tracking dependencies on primitives] in GHC.Internal.Base
    

  • libraries/ghc-internal/src/GHC/Internal/InfoProv/Types.hsc
    ... ... @@ -5,7 +5,6 @@
    5 5
     {-# LANGUAGE NoImplicitPrelude #-}
    
    6 6
     
    
    7 7
     #include "Rts.h"
    
    8
    -#include "RtsIfaceStub.h"
    
    9 8
     
    
    10 9
     module GHC.Internal.InfoProv.Types
    
    11 10
         ( InfoProv(..)
    

  • libraries/ghc-internal/src/GHC/Internal/RTS/Flags.hsc
    ... ... @@ -52,7 +52,6 @@ module GHC.Internal.RTS.Flags
    52 52
       ) where
    
    53 53
     
    
    54 54
     #include "Rts.h"
    
    55
    -#include "RtsIfaceStub.h"
    
    56 55
     #include "rts/Flags.h"
    
    57 56
     
    
    58 57
     import GHC.Internal.Data.Functor ((<$>))
    

  • libraries/ghc-internal/src/GHC/Internal/RTS/Flags/Test.hsc
    ... ... @@ -7,8 +7,6 @@ module GHC.Internal.RTS.Flags.Test
    7 7
       )
    
    8 8
     where
    
    9 9
     
    
    10
    -#include "RtsIfaceStub.h"
    
    11
    -
    
    12 10
     import GHC.Internal.Base
    
    13 11
     
    
    14 12
     #if !defined(javascript_HOST_ARCH)
    

  • libraries/ghc-internal/src/GHC/Internal/Stack/CCS.hsc
    ... ... @@ -47,7 +47,6 @@ import GHC.Internal.List ( concatMap, reverse )
    47 47
     
    
    48 48
     #define PROFILING
    
    49 49
     #include "Rts.h"
    
    50
    -#include "RtsIfaceStub.h"
    
    51 50
     
    
    52 51
     -- | A cost-centre stack from GHC's cost-center profiler.
    
    53 52
     data CostCentreStack
    

  • libraries/ghc-internal/src/GHC/Internal/Stack/Constants.hsc
    ... ... @@ -14,7 +14,6 @@ import GHC.Internal.Real
    14 14
     #undef MBLOCK_SIZE
    
    15 15
     #undef BLOCKS_PER_MBLOCK
    
    16 16
     #include "DerivedConstants.h"
    
    17
    -#include "RtsIfaceStub.h"
    
    18 17
     
    
    19 18
     newtype ByteOffset = ByteOffset { offsetInBytes :: Int }
    
    20 19
       deriving newtype (Eq, Show, Integral, Real, Num, Enum, Ord)
    

  • libraries/ghc-internal/src/GHC/Internal/Stats.hsc
    ... ... @@ -45,7 +45,6 @@ import GHC.Internal.Foreign.Storable
    45 45
     import GHC.Internal.Foreign.Ptr
    
    46 46
     
    
    47 47
     #include "Rts.h"
    
    48
    -#include "RtsIfaceStub.h"
    
    49 48
     
    
    50 49
     foreign import ccall "getRTSStats" getRTSStats_ :: Ptr () -> IO ()
    
    51 50
     
    

  • libraries/ghc-internal/src/GHC/Internal/System/Environment/Blank.hsc
    ... ... @@ -74,7 +74,6 @@ import qualified GHC.Internal.System.Environment as Environment
    74 74
     #endif
    
    75 75
     
    
    76 76
     #include "HsBaseConfig.h"
    
    77
    -#include "RtsIfaceStub.h"
    
    78 77
     
    
    79 78
     throwInvalidArgument :: String -> IO a
    
    80 79
     throwInvalidArgument from =
    

  • libraries/ghc-internal/src/GHC/Internal/System/Environment/ExecutablePath.hsc
    ... ... @@ -104,9 +104,6 @@ import GHC.Internal.Foreign.Storable
    104 104
     import GHC.Internal.System.Posix.Internals
    
    105 105
     #endif
    
    106 106
     
    
    107
    -#include "RtsIfaceStub.h"
    
    108
    -
    
    109
    -
    
    110 107
     -- The exported function is defined outside any if-guard to make sure
    
    111 108
     -- every OS implements it with the same type.
    
    112 109
     
    

  • utils/hsc2hs
    1
    -Subproject commit fe3990b9f35000427b016a79330d9f195587cad8
    1
    +Subproject commit 3863f81b72d1c5877505e840fd203193c50d2e0f