<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>"llvm-config --host-triple" gives:</div><div><div>i686-apple-darwin9.5.0</div><div><br></div><div>and "clang -emit-llvm-bc -fnext-runtime hello.m" gives</div><div>clang: Unknown command line argument '-fnext-runtime'.  Try: 'clang --help'</div><div><br></div><div>This is all from the current svn.</div><div><br></div><div>Brendan Younger</div></div><br><div><div>On Nov 9, 2008, at 6:32 PM, Daniel Dunbar wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: collapse; ">Does it work if you use the -fnext-runtime flag?<div><br></div><div>On Mac OS X, this should be the default, however it appears that you are getting code for the GNU runtime. I just scanned over the implementation and don't see an obvious problem. What is your target triple?<br> <br></div><div> - Daniel</div></span><br><div class="gmail_quote">On Sun, Nov 9, 2008 at 3:17 PM, Brendan Younger <span dir="ltr"><<a href="mailto:brendan@brendanyounger.com">brendan@brendanyounger.com</a>></span> wrote:<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi,<br> <br> I've been trying to get clang to compile Objective-C code on Mac OS X<br> for a while now.  I keep getting linker errors of the form<br> <br> Undefined symbols:<br>   "___objc_exec_class", referenced from:<br>       _.objc_load_function in cc5ZSPXw.o<br> <br> and from what I can tell, _objc_exec_class is a GNUStep function which<br> is apparently not in Apple's libobjc.  In case anyone wants to try<br> this themselves, compiling the following with "clang -emit-llvm-bc -<br> x=objective-c < hello.m | llc > hello.s" and then "gcc -o hello -<br> framework Foundation -lobjc hello.s" fails with the undefined symbol<br> message above.<br> <br> #import <Foundation/Foundation.h><br> <br> int main(int argc, char const *argv[]) {<br>        NSLog(@"Hello, world!");<br>        // printf("Hello, world!\n");<br> <br>        return 0;<br> }<br> <br> Any ideas?<br> <font color="#888888"><br> Brendan Younger<br> _______________________________________________<br> cfe-dev mailing list<br> <a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br> </font></blockquote></div><br> _______________________________________________<br>cfe-dev mailing list<br><a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev<br></blockquote></div><br></body></html>