gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: win32 show-stoppers


From: Hovik Melikyan
Subject: Re: win32 show-stoppers
Date: Sun, 21 Dec 2014 11:32:38 +0000

Hi All,

Current status of the libobjc2 MinGW (32-bit) port:

1. Everything compiles and runs, except there is one test that fails:
PropertyIntrospectionTest2. It fails even on my OSX and it appears to
be a bug in the test itself. Haven't fixed this yet.

2. There is a somewhat ugly hack that solves one of the problems with
exceptions: clang++ is always invoked at linking stage instead of
clang. I think it's a question of library ordering (because adding
-lstdc++ doesn't help), need to look closer at this. But at this time
I think theoretically there is no harm in using clang++ for linking
everything. Unfortunately there is another related hack, even uglier:

3. The __cxa_* external symbols are declared as __attribute__((weak))
in libobjc. The idea is that if you are building Objective-C++ source
then the symbols will be found at run time, otherwise they won't be
called anyway. Unfortunately though this attribute either doesn't work
on MinGW or its semantics is different, because these symbols are not
resolved neither at compile time nor at run time, even if you link
against -lstdc++ dynamically or statically. So at the moment this hack
means you will have some C++ luggage linked even if your entire source
is pure Objective-C.

4. Shouldn't it be named to libobjc2.dll or something else to avoid
mixups on systems with GCC installed? Currently it's just libobjc.dll.

5. Installing and building:

* Clone or download the fork from
    https://github.com/crontab/libobjc2

* Install clang-3.5
    http://llvm.org/releases/download.html#3.5
    Preferable location is c:\LLVM

* Install MinGW-32 + MSYS
    http://sourceforge.net/projects/mingw/files/Installer/
    Make sure you have the gcc and pthreads packages

* Download and compile CMake (under MinGW)
    http://www.cmake.org/download/

* Build libobjc2: go to the source, then
    mkdir Build ; cd Build
    cmake .. -DCMAKE_C_COMPILER=/c/LLVM/bin/clang.exe \
        -DCMAKE_CXX_COMPILER=/c/LLVM/bin/clang++.exe \
        -G 'MinGW Makefiles'
    # or add -DCMAKE_BUILD_TYPE=Debug for debug build
    # You may need to run the above twice (a cmake glitch)
    # Make sure pthread and the compilers are found
    mingw32-make all test

All comments and suggestions are welcome. Thanks!


--
H.M.


On Sat, Dec 20, 2014 at 4:24 PM, Hovik Melikyan
<address@hidden> wrote:
> Hi David,
>
> The result will be a patch of course, this repository is just for
> convenience. There may be other contributors to the fork itself after
> all. Are there any legal or other issues with this?
>
> --
> H.M.
>
>
> On Sat, Dec 20, 2014 at 4:17 PM, David Chisnall <address@hidden> wrote:
>> On 20 Dec 2014, at 13:35, Hovik Melikyan <address@hidden> wrote:
>>
>>> The fork is here: https://github.com/crontab/libobjc2
>>
>> Is there a reason for forking the runtime, rather than contributing patches?
>>
>> David
>>
>> -- Sent from my IBM 1620
>>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]