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: Pete French
Subject: Re: GNUstep base almost builds with clang
Date: Wed, 01 Apr 2009 16:35:42 +0100

> 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.




reply via email to

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