[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Porting libobjc2 to MinGW
From: |
David Chisnall |
Subject: |
Re: Porting libobjc2 to MinGW |
Date: |
Wed, 17 Dec 2014 12:02:36 +0100 |
Hi,
I'm not sure what relocations look like on Windows. The best thing to do is
try compiling a simple program that refers to an extern global with -S -fPIC
and see what it looks like on Windows. That said, I've just tried this and my
copy of clang emits code that looks like that and compiles it with the
i386-pc-mingw triple. Is it perhaps a linker error, not a compiler error?
Note that this code still won't actually work on Windows, as it assumes the
SysV calling convention. Fixing it to work with Windows is not hard, but as I
don't have a Windows machine I'm unable to test it.
David
On 16 Dec 2014, at 03:15, Hovik Melikyan <address@hidden> 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
> address@hidden
> https://lists.gnu.org/mailman/listinfo/gnustep-dev
-- Sent from my IBM 1620
- Porting libobjc2 to MinGW, Hovik Melikyan, 2014/12/15
- Re: Porting libobjc2 to MinGW,
David Chisnall <=
- win32 show-stoppers, Barnaby Jones, 2014/12/20
- Re: win32 show-stoppers, Hovik Melikyan, 2014/12/20
- Re: win32 show-stoppers, David Chisnall, 2014/12/20
- Re: win32 show-stoppers, Hovik Melikyan, 2014/12/20
- Re: win32 show-stoppers, Hovik Melikyan, 2014/12/21
- Re: win32 show-stoppers, Hovik Melikyan, 2014/12/30
- Re: win32 show-stoppers, David Chisnall, 2014/12/30