X-Recipient: archive-cygwin AT delorie DOT 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: References: <4EA04671 DOT 6030705 AT gmail DOT com> Date: Thu, 20 Oct 2011 20:36:42 +0100 Message-ID: Subject: Re: building a cygwin aware GHC From: Andy Koppe To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT 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