David Eichmann pushed to branch wip/davide/windows-dlls at Glasgow Haskell Compiler / GHC

Commits:

9 changed files:

Changes:

  • hadrian/src/Settings/Packages.hs
    ... ... @@ -322,6 +322,7 @@ rtsPackageArgs = package rts ? do
    322 322
               , Threaded  `wayUnit` way          ? arg "-DTHREADED_RTS"
    
    323 323
               , notM targetSupportsSMP           ? arg "-optc-DNOSMP"
    
    324 324
               , isWinHost                        ? arg "-optl-Wl,--disable-runtime-pseudo-reloc"
    
    325
    +                                            <> arg "-optl-Wl,--export-all-symbols"
    
    325 326
     
    
    326 327
                 -- See Note [AutoApply.cmm for vectors] in genapply/Main.hs
    
    327 328
                 --
    

  • libraries/Win32
    1
    -Subproject commit 7d0772bb265a6c59eb14c441cf65c778895528df
    1
    +Subproject commit 174dd3223e26137e1d398c445734fd4ea3a1d1dc

  • libraries/base/src/Control/Concurrent.hs
    ... ... @@ -132,6 +132,12 @@ import Control.Concurrent.Chan
    132 132
     import Control.Concurrent.QSem
    
    133 133
     import Control.Concurrent.QSemN
    
    134 134
     
    
    135
    +
    
    136
    +-- Needed for windows dynamic builds
    
    137
    +-- TODO we may need to disable inlining of ccalls by default
    
    138
    +{-# NOINLINE waitFd #-}
    
    139
    +
    
    140
    +
    
    135 141
     {- $conc_intro
    
    136 142
     
    
    137 143
     The concurrency extension for Haskell is described in the paper
    

  • libraries/bytestring
    1
    -Subproject commit d984ad00644c0157bad04900434b9d36f23633c5
    1
    +Subproject commit a7b567d017d21134350894e69ecfa157e36f6ec0

  • libraries/ghc-internal/cbits/inputReady.c
    ... ... @@ -150,6 +150,7 @@ compute_WaitForSingleObject_timeout(bool infinite, Time remaining)
    150 150
      *   1 => Input ready, 0 => not ready, -1 => error
    
    151 151
      * On error, sets `errno`.
    
    152 152
      */
    
    153
    +__attribute__((dllexport))
    
    153 154
     int
    
    154 155
     fdReady(int fd, bool write, int64_t msecs, bool isSock)
    
    155 156
     {
    

  • libraries/ghc-internal/src/GHC/Internal/Bignum/Backend/GMP.hs
    ... ... @@ -622,8 +622,11 @@ foreign import ccall unsafe "integer_gmp_mpn_xor_n"
    622 622
                      -> IO ()
    
    623 623
     
    
    624 624
     -- mp_bitcnt_t mpn_popcount (const mp_limb_t *s1p, mp_size_t n)
    
    625
    +{-# NOINLINE c_mpn_popcount #-}
    
    626
    +c_mpn_popcount :: ByteArray# -> GmpSize# -> Word#
    
    627
    +c_mpn_popcount a b = _c_mpn_popcount a b
    
    625 628
     foreign import ccall unsafe "gmp.h __gmpn_popcount"
    
    626
    -  c_mpn_popcount :: ByteArray# -> GmpSize# -> Word#
    
    629
    +  _c_mpn_popcount :: ByteArray# -> GmpSize# -> Word#
    
    627 630
     
    
    628 631
     -- double integer_gmp_mpn_get_d (const mp_limb_t sp[], const mp_size_t sn)
    
    629 632
     foreign import ccall unsafe "integer_gmp_mpn_get_d"
    

  • libraries/ghc-internal/src/GHC/Internal/Float.hs
    ... ... @@ -1632,17 +1632,47 @@ atanhDouble (D# x) = D# (atanhDouble# x)
    1632 1632
     powerDouble :: Double -> Double -> Double
    
    1633 1633
     powerDouble  (D# x) (D# y) = D# (x **## y)
    
    1634 1634
     
    
    1635
    -foreign import ccall unsafe "isFloatNaN" isFloatNaN :: Float -> Int
    
    1636
    -foreign import ccall unsafe "isFloatInfinite" isFloatInfinite :: Float -> Int
    
    1637
    -foreign import ccall unsafe "isFloatDenormalized" isFloatDenormalized :: Float -> Int
    
    1638
    -foreign import ccall unsafe "isFloatNegativeZero" isFloatNegativeZero :: Float -> Int
    
    1639
    -foreign import ccall unsafe "isFloatFinite" isFloatFinite :: Float -> Int
    
    1640
    -
    
    1641
    -foreign import ccall unsafe "isDoubleNaN" isDoubleNaN :: Double -> Int
    
    1642
    -foreign import ccall unsafe "isDoubleInfinite" isDoubleInfinite :: Double -> Int
    
    1643
    -foreign import ccall unsafe "isDoubleDenormalized" isDoubleDenormalized :: Double -> Int
    
    1644
    -foreign import ccall unsafe "isDoubleNegativeZero" isDoubleNegativeZero :: Double -> Int
    
    1645
    -foreign import ccall unsafe "isDoubleFinite" isDoubleFinite :: Double -> Int
    
    1635
    +{-# NOINLINE isFloatInfinite #-}
    
    1636
    +isFloatInfinite :: Float -> Int
    
    1637
    +isFloatInfinite x = cIsFloatInfinite x
    
    1638
    +foreign import ccall unsafe "isFloatInfinite" cIsFloatInfinite :: Float -> Int
    
    1639
    +{-# NOINLINE isFloatNaN #-}
    
    1640
    +isFloatNaN :: Float -> Int
    
    1641
    +isFloatNaN = _isFloatNaN
    
    1642
    +foreign import ccall unsafe "isFloatNaN" _isFloatNaN :: Float -> Int
    
    1643
    +{-# NOINLINE isFloatDenormalized #-}
    
    1644
    +isFloatDenormalized :: Float -> Int
    
    1645
    +isFloatDenormalized = _isFloatDenormalized
    
    1646
    +foreign import ccall unsafe "isFloatDenormalized" _isFloatDenormalized :: Float -> Int
    
    1647
    +{-# NOINLINE isFloatNegativeZero #-}
    
    1648
    +isFloatNegativeZero :: Float -> Int
    
    1649
    +isFloatNegativeZero = _isFloatNegativeZero
    
    1650
    +foreign import ccall unsafe "isFloatNegativeZero" _isFloatNegativeZero :: Float -> Int
    
    1651
    +{-# NOINLINE isFloatFinite #-}
    
    1652
    +isFloatFinite :: Float -> Int
    
    1653
    +isFloatFinite = _isFloatFinite
    
    1654
    +foreign import ccall unsafe "isFloatFinite" _isFloatFinite :: Float -> Int
    
    1655
    +
    
    1656
    +{-# NOINLINE isDoubleInfinite #-}
    
    1657
    +isDoubleInfinite :: Double -> Int
    
    1658
    +isDoubleInfinite x = cIsDoubleInfinite x
    
    1659
    +foreign import ccall unsafe "isDoubleInfinite" cIsDoubleInfinite :: Double -> Int
    
    1660
    +{-# NOINLINE isDoubleNaN #-}
    
    1661
    +isDoubleNaN :: Double -> Int
    
    1662
    +isDoubleNaN = _isDoubleNaN
    
    1663
    +foreign import ccall unsafe "isDoubleNaN" _isDoubleNaN :: Double -> Int
    
    1664
    +{-# NOINLINE isDoubleDenormalized #-}
    
    1665
    +isDoubleDenormalized :: Double -> Int
    
    1666
    +isDoubleDenormalized = _isDoubleDenormalized
    
    1667
    +foreign import ccall unsafe "isDoubleDenormalized" _isDoubleDenormalized :: Double -> Int
    
    1668
    +{-# NOINLINE isDoubleNegativeZero #-}
    
    1669
    +isDoubleNegativeZero :: Double -> Int
    
    1670
    +isDoubleNegativeZero = _isDoubleNegativeZero
    
    1671
    +foreign import ccall unsafe "isDoubleNegativeZero" _isDoubleNegativeZero :: Double -> Int
    
    1672
    +{-# NOINLINE isDoubleFinite #-}
    
    1673
    +isDoubleFinite :: Double -> Int
    
    1674
    +isDoubleFinite = _isDoubleFinite
    
    1675
    +foreign import ccall unsafe "isDoubleFinite" _isDoubleFinite :: Double -> Int
    
    1646 1676
     
    
    1647 1677
     ------------------------------------------------------------------------
    
    1648 1678
     -- Coercion rules
    

  • libraries/ghc-internal/src/GHC/Internal/Float/RealFracMethods.hs
    ... ... @@ -357,5 +357,8 @@ float2Integer (F# x) =
    357 357
     foreign import ccall unsafe "rintDouble"
    
    358 358
         c_rintDouble :: Double -> Double
    
    359 359
     
    
    360
    +{-# NOINLINE c_rintFloat #-}
    
    361
    +c_rintFloat :: Float -> Float
    
    362
    +c_rintFloat = _c_rintFloat
    
    360 363
     foreign import ccall unsafe "rintFloat"
    
    361
    -    c_rintFloat :: Float -> Float
    364
    +    _c_rintFloat :: Float -> Float

  • libraries/ghc-internal/src/GHC/Internal/Foreign/C/Error.hs
    ... ... @@ -109,6 +109,14 @@ import GHC.Internal.Num
    109 109
     import GHC.Internal.Base ( String, otherwise, return, ($) )
    
    110 110
     import GHC.Internal.Types ( Bool(..) )
    
    111 111
     
    
    112
    +
    
    113
    +
    
    114
    +-- Needed for windows dynamic builds
    
    115
    +-- TODO we may need to disable inlining of ccalls by default
    
    116
    +{-# NOINLINE getErrno #-}
    
    117
    +
    
    118
    +
    
    119
    +
    
    112 120
     -- "errno" type
    
    113 121
     -- ------------
    
    114 122