|
From: | Maxthon Chan |
Subject: | Re: FreeBSD 9.1 missing libcxxrt - is it needed for objc2? |
Date: | Thu, 13 Jun 2013 08:41:01 +0800 |
Can you try and go ahead and build one with clang right out of the svn? The appropriate order from my experience, starting from a clean machine with only gcc (experimented on a VM running vanilla Ubuntu 13.04): LLVM+clang, use C++98 libc++rt, CC=clang, CXX=clang++ libc++, CC=clang, CXX=clang++, LDFLAGS+=-lc++rt LLVM+clang+lldb, CC=clang, CXX=clang++, CXXFLAGS+="-std=c++11 -stdlib=libc++", LDFLAGS+="-stdlib=libc++ -lc++rt" libobjc2, CC=clang, CXX=clang++, CXXFLAGS+="-std=c++11 -stdlib=libc++", LDFLAGS+="-stdlib=libc++ -lc++rt" libdispatch, CC=clang, CXX=clang++, CXXFLAGS+="-std=c++11 -stdlib=libc++", LDFLAGS+="-stdlib=libc++ -lc++rt -lobjc" libobjc2, CC=clang, CXX=clang++, CXXFLAGS+="-std=c++11 -stdlib=libc++", LDFLAGS+="-stdlib=libc++ -lc++rt -ldispatch" This will bootstrap LLVM/clang properly with lldb support (the debugger, requires C++11 to build), with libraries: * libc++rt LLVM C++ ABI library, * libc++ LLVM C++ standard library (linked against libc++rt explicitly, fixing the clang bug of not linking against the appropriate C++ ABI library), * libobjc2 GNUstep Objective-C runtime library, doubling as the sole Blocks runtime library and linked against libdispatch. (Since I already have libobjc2 and pretty much there is no non-Objective-C code uses Blocks, I just used that to save the hassle) * libdispatch Grand Central Dispatch. And if you linker (and friends) supports LTO, you can build LLVM+clang+lldb (2nd pass), libc++, libobjc2 and libdispatch with optimizations full on (-O4 -flto, including LTO) and that will result in binaries running really fast. As a funny side note, the only time my libobjc2 test passed 100% is when I built it with optimizations full on. 在 2013-6-13,上午8:25,Frank Rehwinkel <address@hidden> 写道:
|
[Prev in Thread] | Current Thread | [Next in Thread] |