delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/10/19/19:02:13

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
Date: Wed, 19 Oct 2011 18:01:49 -0500
Message-ID: <CALEg2updBG-XW2TK6sBg8cSyYR1kcgxKUUn72-O84HY04J=-oQ@mail.gmail.com>
Subject: building a cygwin aware GHC
From: Nathan Thern <nthern AT gmail DOT com>
To: cygwin <cygwin AT cygwin DOT com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

I am attempting (for probably the tenth time) to compile the GHC
haskell compiler.

The problem with GHC is that the windows version is compiled with
MinGW, and cygwin is considered to be nothing other than a MinGW
alternative. IOW, the source code is riddled with assumptions that if
you are building GHC with cygwin then what you want in the end is a
cygwin-unaware windows-compliant executable.

I have attempted in the past to modify configure(.ac) to trick the
build system into thinking that the target OS is an unknown unix
platform, but IIRC that failed during the compilation of some code
inside a #ifdef WIN32 block.

This time I'm thinking I will go through the source and expunge all
code that's conditional for MinGW, CYGWIN32, WIN32_*, etc. After an
autoreconf the autobuild system's innate awareness of cygwin should
allow me to build as if the target is some generic unix-like system.

Before I get started, I'm wondering if anyone has tried anything like
this before and has any tips. Are there any win32 related CFLAGS that
I want to leave alone or can I expunge them all?

regards,
NT

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019