X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-2.5 required=5.0	tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <CALEg2uq8ehpdjEG-Q3Pk7XwE_EtWJnTFJKSpC4P4kMKQ_b3SDQ@mail.gmail.com>
References: <CALEg2updBG-XW2TK6sBg8cSyYR1kcgxKUUn72-O84HY04J=-oQ@mail.gmail.com>	<4EA04671.6030705@gmail.com>	<CALEg2uq8ehpdjEG-Q3Pk7XwE_EtWJnTFJKSpC4P4kMKQ_b3SDQ@mail.gmail.com>
Date: Thu, 20 Oct 2011 20:36:42 +0100
Message-ID: <CAHWeT-Zz7dAQD04ip-c+XDjDPSVQHJwMOeaj8S24A5z80aNfyQ@mail.gmail.com>
Subject: Re: building a cygwin aware GHC
From: Andy Koppe <andy.koppe@gmail.com>
To: cygwin@cygwin.com
Content-Type: text/plain; charset=UTF-8
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id p9KJb6Rn006514

On 20 October 2011 17:53, Nathan Thern wrote:
> On Thu, Oct 20, 2011 at 11:04 AM, Marco Atzeri wrote:
>> no experience on GHC and looking at the source, I am sure you need
>> to cut through the source tree.
>> Look also the aclocal.m4 ont only configure.ac
>
> Yep.
>
>> I noticed also wrong/obsolete assumption around the code
>>
>> libraries/base/GHC/ConsoleHandler.hs:--  * Cygwin shells with @CYGWIN=tty@
>
> Things like that are strewn throughout the code. My approach this time
> is going to be any if or case or #ifdef that checks cygwin or mingw or
> msys or win32 etc. gets expunged.

None of the mingw, msys, or win32 macros get defined by Cygwin gcc.
(WIN32 and _WIN32 get defined by the Windows headers though, if any
happen to be included without a platform check.)

If you excise the _CYGWIN checks only, you might have a chance of
getting it accepted upstream, which would be rather nice.

You do need to make sure that the configury picks up the Cygwin
toolchain rather than any of the MinGW cross toolchains (including
gcc-3 -mno-cygwin).

Andy

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


