delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/10/10/03:29:13

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <3BC3F8AD.5090609@sendmail.ru>
Date: Wed, 10 Oct 2001 11:28:45 +0400
From: Ildar Mulyukov <ildar AT sendmail DOT ru>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4+) Gecko/20011004
X-Accept-Language: ru, tt, en-us
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Objective-C and Cygwin (at WIN32)

          Hello!
    Christopher noticed here 
<http://sources.redhat.com/ml/cygwin/2001-09/msg01224.html> and I'd like 
to share my experience in building gcc with Objective-C support.

    Besides of changes for objc itself I had to make some additional 
work to compile gcc. This changes are listed below for them who are 
interested in it.

    1. First I got installed the latest distro of cygwin. And downloaded
    gcc-2.95.3 sources from http://gcc.gnu.org
    2. Patched windef.h line 123
            -#ifndef XFree86Server
            +#if !defined(XFree86Server) && !defined(IN_GCC)
        My comment: line 122 comment shows the unclear status of
    following code.
    3. got gthr-win32.h from gcc-3.0.1 distro into gcc directory. It
    fits OK :-)
    4. (in short) $(GCC_SRC)/configure --prefix=/usr
    --enable-threads=win32 --enable-languages=c,c++,objc && make
    bootstrap && make install

After building 2.95.3 I also tried 3.0.1 version and tested them with 
testsuite of gcc-3.0.1
Here are results of tests for built 2.95.3 and 3.0.1 compilers along 
with the latest version of MinGW compiler (2.95.3-6 (mingw special) ):
testname    MinGW 2.95.3-6    Cygwin 2.95.3    Cygwin 3.0.1
bf-20       -                    -                +
class-10    -                    +                +
class-11    -                    +                +
class-14    -                    +                +
formal_protocol-6    -           -                -
object_is_class    -             -                +
object_is_meta_class    -        -                +
    Other tests passed ok.

    I also succeded with compilation of libobjc as shared lib (DLL). For 
this purpose I got several files from gnustep-objc 
<ftp://ftp.gnustep.org/pub/gnustep/libs/gnustep-objc-1.0.1.tar.gz> 
(particulary GNUmakefile and whole "config" dir), added "NXConstStr.m" 
to libobjc_OBJC_FILES list (GNUmakefile line 63) and built with make 
shared=yes. (This needs gnustep-make be installed). Tests yielded 
similar results as with static libobjc.a. Additionaly I had to add 
several lines to libobjc.def:
****
objc_condition_allocate
objc_condition_deallocate
objc_condition_wait
objc_condition_broadcast
objc_set_thread_callback
__objc_msg_forward
objc_layout_structure
objc_layout_structure_next_member
objc_layout_finish_structure
objc_layout_structure_get_info
****
Note: __objc_msg_forward ONLY for gcc-3.0.1

    The only negative result I obtained is GNUstep. I stuck with 
gnustep-base. It is compiled ok but has runtime error for every app 
using Foundation lib. But it seems like gnustep's problem as GCC's 
testsuite passes allright.


I hope this is enough for returning Obj-C back again in Cygwin.
Regards, Ildar.


P.S. Here are steps (for those who are interested) I did to compile GCC. 
They are more like dirty hacks but still:
4. do ../gcc-2.95.3/configure --prefix=/usr --enable-threads=win32 
--enable-languages=c,c++,objc
5. gcc/Makefile:620
        -INCLUDES = -I. -I$(srcdir) -I$(srcdir)/config 
-I$(srcdir)/../include
        +INCLUDES = -I. -I$(srcdir) -I$(srcdir)/config 
-I$(srcdir)/../include -I/usr/include/w32api
6. i686-pc-cygwin32\libobjc\Makefile:76
        -  -I$(srcdir)/$(MULTISRCTOP)../include
        +  -I$(srcdir)/$(MULTISRCTOP)../include -I/usr/include/w32api



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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