From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1374 invoked by alias); 30 Jul 2009 22:58:50 -0000 Received: (qmail 1365 invoked by uid 22791); 30 Jul 2009 22:58:49 -0000 X-SWARE-Spam-Status: No, hits=1.1 required=5.0 tests=BAYES_40,FRT_OFFER2 X-Spam-Check-By: sourceware.org Received: from smtp-out-50.livemail.co.uk (HELO cust-smtp-193.fasthosts.net.uk) (213.171.216.50) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 30 Jul 2009 22:58:43 +0000 Received: from Dirac (78-105-202-165.zone3.bethere.co.uk [78.105.202.165]) by cust-smtp-193.fasthosts.net.uk (Postfix) with ESMTP id 74F7B1410058 for ; Thu, 30 Jul 2009 23:58:39 +0100 (BST) Message-ID: <3CB8E75EFE6C4F3AA4353943C0C0E327@Dirac> From: "Robert Oeffner" To: Subject: Porting GCC 4.4.0 to interix Date: Thu, 30 Jul 2009 22:58:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="Windows-1252"; reply-type=original Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2009-07/txt/msg00628.txt.bz2 Hi, I'm new to this mailing list and hope this is the right one I'm addressing. Lately I have been trying to port gcc and g++ from GCC 4.4.0 to interix (the BSD-like unix subsystem optionally available for WinXP and Vista). The subsystem is shipped with gcc and g++ 3.3 and binutils 2.13 which I have used for the bootstrap. Based on other peoples patches I have had some success. Until now there is no compiler available for interix that supports OpenMP and that's what I'm after. As libgomp in GCC so far isn't targeting interix I have made some changes to libgomp in my copy of the GCC 4.4.0 distribution. A new source file was created, gcc-4.4.0/libgomp/config/posix/interix/proc.c, which is templated on the existing gcc-4.4.0/libgomp/config/posix/proc.c and gcc-4.4.0/libgomp/config/posix/mingw32/proc.c in the distribution (see http://www.oeffner.net/stuff/gcc-4.4.0_interix_changes.zip or http://www.suacommunity.com/forum/tm.aspx?m=16600 ). With this file and modifications to GCC configuration files in the distribution I can bootstrap GCC 4.4.0 to build gcc and g++ compilers to support OpenMP on interix. Although small OpenMP C++ programs builds and runs just fine I have problems with a large program that also uses OpenMP. The large program is unstable and crashes when compiled with OpenMP on interix. Compiled with g++4.4.0 without OpenMP it runs like a charm. As we distribute this program to other platforms like Linux, MacOSX and Win32 where it runs fine with OpenMP I believe that my current implementation I have for porting libgomp to interix is buggy. If anyone knows about some common or obvious pitfalls when porting libgomp to a new platform or if anyone has got any advice about what not to do I'd be very grateful. Many thanks, Rob