| 10 | If you would like to try this out at present, because I disabled `clang_rt` and `libcxx` for now, you need to make a link to where clang-5.0 will look for the includes: |
| 11 | {{{ |
| 12 | $ cd /opt/local/libexec/llvm-5.0/include |
| 13 | $ sudo ln -s /opt/local/libexec/llvm-5.0/lib/c++ . |
| 14 | }}} |
| 15 | |
| 16 | and then you're in business, sorta -- had to manually add the `-lstdc++` for now: |
| 17 | {{{ |
| 18 | $ clang -v -Wl,-v -lstdc++ -stdlib=libstdc++ -o helloworld helloworld.cpp |
| 19 | clang version 5.0.2 (tags/RELEASE_502/final) |
| 20 | Target: powerpc-apple-darwin9.8.0 |
| 21 | Thread model: posix |
| 22 | InstalledDir: /opt/local/libexec/llvm-5.0/bin |
| 23 | "/opt/local/libexec/llvm-5.0/bin/clang" -cc1 -triple powerpc-apple-macosx10.5.0 -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-value-names -main-file-name helloworld.cpp -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -masm-verbose -munwind-tables -faligned-alloc-unavailable -mfloat-abi hard -target-linker-version 127.2 -v -dwarf-column-info -debugger-tuning=lldb -resource-dir /opt/local/libexec/llvm-5.0/lib/clang/5.0.2 -stdlib=libstdc++ -fdeprecated-macro -fdebug-compilation-dir /opt/local/var/macports/build/_opt_myports_devel_helloworld/helloworld/work/helloworld-9767fc3cc248797fa2df16b0f8926131aed9d6ce -ferror-limit 19 -fmessage-length 160 -femulated-tls -stack-protector 1 -fobjc-runtime=macosx-fragile-10.5.0 -fencode-extended-block-signature -fcxx-exceptions -fexceptions -fmax-type-align=16 -fdiagnostics-show-option -fcolor-diagnostics -o /var/folders/zz/zzzivhrRnAmviuee+++++++++++/-Tmp-/helloworld-dc942f.o -x c++ helloworld.cpp |
| 24 | clang -cc1 version 5.0.2 based upon LLVM 5.0.2 default target powerpc-apple-darwin9.8.0 |
| 25 | ignoring nonexistent directory "/usr/include/c++/4.2.1" |
| 26 | ignoring nonexistent directory "/usr/include/c++/4.2.1/powerpc-apple-darwin10/" |
| 27 | ignoring nonexistent directory "/usr/include/c++/4.2.1/backward" |
| 28 | ignoring nonexistent directory "/usr/local/include" |
| 29 | #include "..." search starts here: |
| 30 | #include <...> search starts here: |
| 31 | /usr/include/c++/4.0.0 |
| 32 | /usr/include/c++/4.0.0/powerpc-apple-darwin8 |
| 33 | /usr/include/c++/4.0.0/backward |
| 34 | /opt/local/libexec/llvm-5.0/lib/clang/5.0.2/include |
| 35 | /usr/include |
| 36 | /System/Library/Frameworks (framework directory) |
| 37 | /Library/Frameworks (framework directory) |
| 38 | End of search list. |
| 39 | "/opt/local/libexec/llvm-5.0/bin/ld" -demangle -dynamic -arch ppc -macosx_version_min 10.5.0 -o helloworld -lcrt1.10.5.o -v /usr/lib/libstdc++.6.dylib /var/folders/zz/zzzivhrRnAmviuee+++++++++++/-Tmp-/helloworld-dc942f.o -lSystem -lgcc_s.10.5 |
| 40 | @(#)PROGRAM:ld PROJECT:ld64-127.2 |
| 41 | configured to support archs: i386 x86_64 ppc ppc64 armv6 armv7 |
| 42 | Library search paths: |
| 43 | /usr/lib |
| 44 | /usr/local/lib |
| 45 | Framework search paths: |
| 46 | /Library/Frameworks/ |
| 47 | /System/Library/Frameworks/ |
| 48 | |
| 49 | |
| 50 | $ ./helloworld |
| 51 | Hello World! |
| 52 | }}} |