[patch] Don't detect libiconv/libcharset on Windows to avoid changing GHCs build behavior on windows with newer mingw installs

Bill Tutt bill at tutts.org
Sun Sep 18 04:39:51 CEST 2011


The rts/5250 failure occurred because the gcc compiled esp wasn't
16-byte aligned before entering Haskell code so the StgRun.c
transition to Haskell x86 assembler didn't end up aligned either.
(Assuming I followed the StgRun x86 assembler correctly.)

So this failure seems harmless if you don't care about 16-byte
alignments (MMX, SSE, etc..). If you do, then it would seem you'd want
to either always auto-readjust or autoconf the issue into oblivion.

Bill

On Sat, Sep 17, 2011 at 2:42 AM, Bill Tutt <bill at tutts.org> wrote:
> After I made this change I got the following results from ghc-HEAD
> with the newer mingw and bootstrapping from 7.0.2.
> The only worrying failures were the rts/5250 (esp alignment) and the
> simplCore/should_compile cases. I'm hoping the simplCore cases should
> be related to those Integer changes folks have been talking about
> recently.
>
>        OVERALL SUMMARY for test run started at now
>                2961 total tests, which gave rise to
>                9214 test cases, of which
>                   0 caused framework failures
>                6571 were skipped
>
>                2561 expected passes
>                  63 expected failures
>                   3 unexpected passes
>                  16 unexpected failures
>
>        Unexpected passes:
>           hsc2hs  3837 (normal)
>           hsc2hs  hsc2hs001 (normal)
>           hsc2hs  hsc2hs002 (normal)
>
> Cause: Testsuite still flags these as broken on Windows, but the trac
> bug was resolved ages ago in ghc-HEAD
>
>        Unexpected failures:
>           ../../libraries/random/tests  rangeTest [bad exit code] (normal)
> Test case doesn't realize that wchar_t is Word16 on Windows instead of
> Int32 as it is on other Unix machines. (e.g. pgj's x86 FreeBSD builder
> output)
>
>           ghci/linking                  ghcilink006 [bad exit code] (normal) (stdc++)
> stdc++.dll doesn't exist on Windows (shocker)
>
>           ghci/scripts                  ghci038 [bad stdout] (ghci)
> New contents in .script file doesn't match .stdout content
>
>           lib/IO                        3307 [bad exit code] (normal)
>           lib/IO                        environment001 [bad stdout] (normal)
> Windows consoles don't default to UTF-8. (i.e. fails when run from
> clean cmd.exe as well as the mingw window I launched it from)
> I wonder what happens if run from PowerShell ISE.... Can't tell atm,
> apparently I don't have that installed on my Win7 machine.
> I'll need to set the console window to UTF-8 and see what happens.
>
>           perf/compiler                 T1969 [stat not good enough] (normal)
>           perf/compiler                 T3064 [stat not good enough] (normal)
>           perf/compiler                 T3294 [stat not good enough] (normal)
>           perf/compiler                 T4801 [stat not good enough] (normal)
>           perf/compiler                 T5030 [stat not good enough] (normal)
>           perf/compiler                 parsing001 [stat not good enough] (normal)
> All over memory threshold.
>
>           plugins                       plugins04 [stderr mismatch] (normal)
> ./<filename> -> .\<filename> change in output caused by a newer mingw?
>           rename/should_compile/T3103   T3103 [stderr mismatch] (normal)
> ./<filename> -> .\<filename> change in output caused by a newer mingw?
>
>           rts                           5250 [bad exit code] (normal)
>                        Wrong exit code (expected 0 , actual 1 )
>                        Stdout:
>                        esp not aligned correctly: 22de44
>
>                        Stderr:
>
>           simplCore/should_compile      T4908 [stderr mismatch] (optasm)
>           simplCore/should_compile      spec-inline [stderr mismatch] (optasm)
> Possible fallout from integer change?? diffs follow:
>
>        simplCore/should_compile        T4908: Is this part of the integer changes?
>                Actual stderr output differs from expected:
>                --- ./simplCore/should_compile/T4908.stderr     2011-09-15 11:03:34 -0400
>                +++ ./simplCore/should_compile/T4908.comp.stderr        2011-09-17
> 02:05:45 -0400
>                @@ -11,10 +11,10 @@
>                   \ (sc :: GHC.Prim.Int#)
>                         (sc1 :: GHC.Types.Int)
>                         (sc2 :: GHC.Prim.Int#) ->
>                -    case sc of ds {
>                +    case sc2 of ds {
>                           __DEFAULT ->
>                -        case sc2 of ds1 {
>                -          __DEFAULT -> T4908.f_$s$wf (GHC.Prim.-# ds 1) sc1 ds1;
>                +        case sc of ds1 {
>                +          __DEFAULT -> T4908.f_$s$wf ds1 sc1 (GHC.Prim.-# ds 1);
>                                   0 -> GHC.Types.True
>                                 };
>                           0 -> GHC.Types.True
>                @@ -38,7 +38,7 @@
>                                 case w of _ { (a, b) ->
>                                 case b of _ { GHC.Types.I# ds1 ->
>                                 case ds1 of ds2 {
>                -          __DEFAULT -> T4908.f_$s$wf (GHC.Prim.-# ds 1) a ds2;
>                +          __DEFAULT -> T4908.f_$s$wf ds2 a (GHC.Prim.-# ds 1);
>                                   0 -> GHC.Types.True
>                                 }
>                                 }
>                @@ -69,7 +69,7 @@
>                         forall (sc :: GHC.Prim.Int#)
>                                        (sc1 :: GHC.Types.Int)
>                                        (sc2 :: GHC.Prim.Int#).
>                -      T4908.$wf sc (sc1, GHC.Types.I# sc2)
>                +      T4908.$wf sc2 (sc1, GHC.Types.I# sc)
>                           = T4908.f_$s$wf sc sc1 sc2
>
>
>                *** unexpected failure for T4908(optasm)
>        simplCore/should_compile        spec-inline: Is this part of the integer changes?
>                Actual stderr output differs from expected:
>                --- ./simplCore/should_compile/spec-inline.stderr       2011-09-15
> 11:03:34 -0400
>                +++ ./simplCore/should_compile/spec-inline.comp.stderr  2011-09-17
> 02:09:05 -0400
>                @@ -21,19 +21,19 @@
>                                 GHC.Prim.+#
>                                   (GHC.Prim.+#
>                                          (GHC.Prim.+#
>                -                (GHC.Prim.+# (GHC.Prim.+# (GHC.Prim.+# sc1 sc1)
> sc1) sc1) sc1)
>                -             sc1)
>                -          sc1 } in
>                -    case GHC.Prim.<=# sc 0 of _ {
>                +                (GHC.Prim.+# (GHC.Prim.+# (GHC.Prim.+# sc sc) sc) sc) sc)
>                +             sc)
>                +          sc } in
>                +    case GHC.Prim.<=# sc1 0 of _ {
>                           GHC.Types.False ->
>                -        case GHC.Prim.<# sc 100 of _ {
>                +        case GHC.Prim.<# sc1 100 of _ {
>                                   GHC.Types.False ->
>                -            case GHC.Prim.<# sc 500 of _ {
>                +            case GHC.Prim.<# sc1 500 of _ {
>                                           GHC.Types.False ->
>                -                Roman.foo_$s$wgo (GHC.Prim.-# sc 1) (GHC.Prim.+# a a);
>                -              GHC.Types.True -> Roman.foo_$s$wgo (GHC.Prim.-# sc 3) a
>                +                Roman.foo_$s$wgo (GHC.Prim.+# a a) (GHC.Prim.-# sc1 1);
>                +              GHC.Types.True -> Roman.foo_$s$wgo a (GHC.Prim.-# sc1 3)
>                                         };
>                -          GHC.Types.True -> Roman.foo_$s$wgo (GHC.Prim.-# sc 2) sc1
>                +          GHC.Types.True -> Roman.foo_$s$wgo sc (GHC.Prim.-# sc1 2)
>                                 };
>                           GHC.Types.True -> 0
>                         }
>                @@ -69,7 +69,7 @@
>                                                  ipv)
>                                           ipv } in
>                                 case w of _ {
>                -          Data.Maybe.Nothing -> Roman.foo_$s$wgo 10 a;
>                +          Data.Maybe.Nothing -> Roman.foo_$s$wgo a 10;
>                                   Data.Maybe.Just n ->
>                                         case n of _ { GHC.Types.I# x2 ->
>                                         case GHC.Prim.<=# x2 0 of _ {
>                @@ -78,10 +78,10 @@
>                                                   GHC.Types.False ->
>                                                         case GHC.Prim.<# x2 500 of _ {
>                                                           GHC.Types.False ->
>                -                        Roman.foo_$s$wgo (GHC.Prim.-# x2 1)
> (GHC.Prim.+# a a);
>                -                      GHC.Types.True -> Roman.foo_$s$wgo (GHC.Prim.-# x2 3) a
>                +                        Roman.foo_$s$wgo (GHC.Prim.+# a a)
> (GHC.Prim.-# x2 1);
>                +                      GHC.Types.True -> Roman.foo_$s$wgo a (GHC.Prim.-# x2 3)
>                                                         };
>                -                  GHC.Types.True -> Roman.foo_$s$wgo (GHC.Prim.-# x2 2) ipv
>                +                  GHC.Types.True -> Roman.foo_$s$wgo ipv (GHC.Prim.-# x2 2)
>                                                 };
>                                           GHC.Types.True -> 0
>                                         }
>                @@ -140,15 +140,15 @@
>                 Roman.foo =
>                   \ (n :: GHC.Types.Int) ->
>                         case n of _ { GHC.Types.I# ipv ->
>                -    case Roman.foo_$s$wgo ipv 6 of ww { __DEFAULT -> GHC.Types.I# ww }
>                +    case Roman.foo_$s$wgo 6 ipv of ww { __DEFAULT -> GHC.Types.I# ww }
>                         }
>
>
>                 ------ Local rules for imported ids --------
>                 "SC:$wgo0" [ALWAYS]
>                         forall (sc :: GHC.Prim.Int#) (sc1 :: GHC.Prim.Int#).
>                -      Roman.$wgo (Data.Maybe.Just @ GHC.Types.Int (GHC.Types.I# sc))
>                -                 (Data.Maybe.Just @ GHC.Types.Int (GHC.Types.I# sc1))
>                +      Roman.$wgo (Data.Maybe.Just @ GHC.Types.Int (GHC.Types.I# sc1))
>                +                 (Data.Maybe.Just @ GHC.Types.Int (GHC.Types.I# sc))
>                           = Roman.foo_$s$wgo sc sc1
>
>
>                *** unexpected failure for spec-inline(optasm)
>



More information about the Glasgow-haskell-users mailing list