[commit: ghc] master: Add Windows to NoSharedLibsPlatformList (4af1e76)

Austin Seipp austin at well-typed.com
Mon Jan 13 10:31:17 UTC 2014


The 64bit GHC 7.6.3 windows compiler was not dynamically linked,
although it did have -dynamic libraries (although using them is a pain
in Windows.) It loaded static object files (you can verify this
yourself: 'ghc -O foo.hs && ghci foo' will load the object file, but
'ghc -dynamic -O foo.hs && ghci foo' will not and instead interpret.)
Relatedly, -dynamic-too is also broken on windows, but it's more of an
optimization than anything.

7.8 won't have a dynamically linked GHCi for Windows and it won't have
-dynamic-too (i.e. essentially the same as 7.6.) Linux, OS X will have
both.

At this exact moment, -dynamic also seems busted on Windows and I'm
looking into fixing it. This will just help me in the mean time to
clean up the tree and keep it building for others.

On Mon, Jan 13, 2014 at 4:01 AM, kyra <kyrab at mail.ru> wrote:
> Does this mean we have no 64-bit windows support for 7.8 (only
> dynamic-linked compiler works on 64-bit windows)?
>
>
> On 1/13/2014 10:28, git at git.haskell.org wrote:
>>
>> Repository : ssh://git@git.haskell.org/ghc
>>
>> On branch  : master
>> Link       :
>> http://ghc.haskell.org/trac/ghc/changeset/4af1e76c701a7698ebd9b5ca3fb1394dd8b56c8d/ghc
>>
>>> ---------------------------------------------------------------
>>
>> commit 4af1e76c701a7698ebd9b5ca3fb1394dd8b56c8d
>> Author: Austin Seipp <austin at well-typed.com>
>> Date:   Mon Jan 13 00:21:18 2014 -0600
>>
>>      Add Windows to NoSharedLibsPlatformList
>>           We're punting on full -dynamic and -dynamic-too support for
>> Windows
>>      right now, since it's still unstable. Also, ensure "Support
>> dynamic-too"
>>      in `ghc --info` is set to "NO" for Cabal.
>>           See issues #7134, #8228, and #5987
>>           Signed-off-by: Austin Seipp <austin at well-typed.com>
>>
>>
>>> ---------------------------------------------------------------
>>
>> 4af1e76c701a7698ebd9b5ca3fb1394dd8b56c8d
>>   compiler/main/DynFlags.hs |    4 +++-
>>   mk/config.mk.in           |   19 ++++---------------
>>   2 files changed, 7 insertions(+), 16 deletions(-)
>>
>> diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
>> index 06d1ed9..734e7e9 100644
>> --- a/compiler/main/DynFlags.hs
>> +++ b/compiler/main/DynFlags.hs
>> @@ -3563,7 +3563,7 @@ compilerInfo dflags
>>          ("Support SMP",                 cGhcWithSMP),
>>          ("Tables next to code",         cGhcEnableTablesNextToCode),
>>          ("RTS ways",                    cGhcRTSWays),
>> -       ("Support dynamic-too",         "YES"),
>> +       ("Support dynamic-too",         if isWindows then "NO" else
>> "YES"),
>>          ("Support parallel --make",     "YES"),
>>          ("Dynamic by default",          if dYNAMIC_BY_DEFAULT dflags
>>                                          then "YES" else "NO"),
>> @@ -3574,6 +3574,8 @@ compilerInfo dflags
>>          ("LibDir",                      topDir dflags),
>>          ("Global Package DB",           systemPackageConfig dflags)
>>         ]
>> +  where
>> +    isWindows = platformOS (targetPlatform dflags) == OSMinGW32
>>     #include
>> "../includes/dist-derivedconstants/header/GHCConstantsHaskellWrappers.hs"
>>   diff --git a/mk/config.mk.in b/mk/config.mk.in
>> index f61ecc0..59d48c4 100644
>> --- a/mk/config.mk.in
>> +++ b/mk/config.mk.in
>> @@ -94,22 +94,11 @@ else
>>   TargetElf = YES
>>   endif
>>   -# Currently, on Windows, we artificially limit the unfolding creation
>> -# threshold to minimize the number of exported symbols on Windows
>> -# platforms in the stage2 DLL. This avoids a hard limit of 2^16
>> -# exported symbols in the windows dynamic linker.
>> -#
>> -# This is a pitifully low threshold (the default is 750,) but it
>> -# reduced the symbol count by about ~7,000, bringing us back under the
>> -# limit (for now.)
>> -#
>> -# See #5987
>> -ifeq "$(TargetOS_CPP)" "mingw32"
>> -GhcStage2HcOpts += -funfolding-creation-threshold=100
>> -endif
>> -
>>   # Some platforms don't support shared libraries
>> -NoSharedLibsPlatformList = arm-unknown-linux powerpc-unknown-linux
>> +NoSharedLibsPlatformList = arm-unknown-linux \
>> +       powerpc-unknown-linux \
>> +       x86_64-unknown-mingw32 \
>> +       i386-unknown-mingw32
>>     ifeq "$(SOLARIS_BROKEN_SHLD)" "YES"
>>   NoSharedLibsPlatformList += i386-unknown-solaris2
>>
>> _______________________________________________
>> ghc-commits mailing list
>> ghc-commits at haskell.org
>> http://www.haskell.org/mailman/listinfo/ghc-commits
>>
>
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://www.haskell.org/mailman/listinfo/ghc-devs
>



-- 
Regards,

Austin Seipp, Haskell Consultant
Well-Typed LLP, http://www.well-typed.com/


More information about the ghc-devs mailing list