gnustep-dev
[Top][All Lists]
Advanced

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

Re: GNUstep base almost builds with clang


From: David Chisnall
Subject: Re: GNUstep base almost builds with clang
Date: Wed, 1 Apr 2009 17:19:49 +0100

Patch to fix this problem is here if you want to apply it to your local tree:

http://lists.cs.uiuc.edu/pipermail/cfe-dev/2009-April/004759.html

As far as I know, you are the first person to test clang Objective-C support on a 64-bit platform. Please keep sending me reports of things that don't work.

David

On 1 Apr 2009, at 16:35, Pete French wrote:

Not sure what you are using to compile here.  There is not FreeBSD
port for clang, and trunk clang requires trunk LLVM (i.e. not the
port). Can you tell me what commands you are trying to use to compile?

I installed llvm-dev from ports. Which gives me a 'clang' command
that I can use like this:

clang test.m -emit-llvm -o - | llvm-as | opt -std-compile-opts | llc > test.s
cc test.s -lobjc
./a.out

That works fine as long as there are no actual Objective C
constructs inside test.m . Its a basic "hello world" at the
moment:

        #include <stdio.h>
        #include <objc/Object.h>
        int
        main(int argc, char *argv[])
        {
        puts("Hello world");
        return 0;
        }

That works fine. But if I add the line "id x = [Object new];"
at the start of main() then I get this at runtime:

        Module (null) version 8 doesn't match runtime 8
        Abort trap: 6 (core dumped)

That's due to me having the wrong libobjc, yes ? I was wondering what
runtime you use which works... now I can compile and run code I
am interested in experimenting with this a bit....

-pete.


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





reply via email to

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