During my attempt to build libobjc2 for windows I stumbled over several problems. I still investigate it because I find Objective-C superior to C++ but at the moment I find no other alternative to compile applications on all major systems:

1. Exception unwinding: For windows you need seh support. This is now initial implemented in Clang but still missing in LLVM. The GCC 32Bit unwinding lib was also missing from my (Linux) build. This missing feature was caused by a (now expired) patent issue.

2. MinGW Clang support: MinGW (w64) only supports GCC I could not find help for several compilation problems. Also I don't know if all necessary MinGW patches are now in the clang (repository) trunk.

3. CMake: The host/client cross-compilation rules for Clang are missing.

if an experimental fork/branch for gnustep/libobjc2 on win32 x64 would be created I would gladly help you with the port.


On 16.12.2014 03:15, Hovik Melikyan wrote:
Hello,

I'm trying to compile libobjc2 on Windows/MinGW. At the moment I'm
stuck on this line in objc_msgSend.x86-32.S:

     addl  $_GLOBAL_OFFSET_TABLE_+(8b-7b), %ebx

Clang aborts here with this message: "unsupported relocation type" (I
think it's an assertion).

Command line used:

clang.exe  -DGC_DEBUG -DGNUSTEP -DNO_LEGACY \
     -DTYPE_DEPENDENT_DISPATCH -D_BSD_SOURCE=1 \
     -D_XOPEN_SOURCE=700 -D__BSD_VISIBLE=1 \
     -D__OBJC_RUNTIME_INTERNAL__=1 -Dobjc_EXPORTS -fPIC \
     -c objc_msgSend.S

with clang 3.5.

I think I understand what global offset table is for, but I have no
clue why clang's assembly refuses to compile it.

Any ideas on how to fix this line to compile and work on MinGW 32?

(I'm pretty sure there are a lot more problems ahead with this port.
At least the calling convention in this asm file will have to be taken
care of, and possibly more. I'm just wondering if anyone has ever had
any success with it. I can't find anything apart from some older posts
here in 2010 then 2013, with no positive outcome.)

Thanks!

--
H.M.

_______________________________________________
Gnustep-dev mailing list
Gnustep-dev@gnu.org
https://lists.gnu.org/mailman/listinfo/gnustep-dev


_______________________________________________
Gnustep-dev mailing list
Gnustep-dev@gnu.org
https://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to