<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Apple’s clang numbering and LLVM’s clang numbering diverged a while ago, and in fact LLVM’s clang is usually a year or two ahead of Apple’s.<div class=""><br class=""></div><div class="">Apple has it’s own fork of clang and llvm, and the two are similar but not identical. Indeed, openmp support is one area where they diverge.</div><div class=""><br class=""></div><div class="">LLVM’s clang supports openmp, but it can take some finagling — you need to use the -fopenmp flag, of course, and you need to pass in the proper link libraries.</div><div class=""><br class=""></div><div class="">I have found no shortage of configure file errors trying to support openmp with clang — until Apple’s clang (Xcode) supports it, these will probably not get properly sorted out.</div><div class=""><br class=""></div><div class="">So with that in mind, you just install the clang you want:</div><div class=""><br class=""></div><div class="">sudo port -v install clang-9.0</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">and then specify the one you want in your build with</div><div class=""><br class=""></div><div class="">CC=<span style="font-family: Menlo; font-size: 11px; background-color: rgb(255, 255, 255);" class="">/opt/local/bin/clang-mp-9.0 CXX=</span><span style="font-family: Menlo; font-size: 11px; background-color: rgb(255, 255, 255);" class="">/opt/local/bin/clang++-mp-9.0 CXXFLAGS=-fopenmp etc etc etc</span></div><div class=""><span style="font-family: Menlo; font-size: 11px; background-color: rgb(255, 255, 255);" class=""><br class=""></span></div><div class=""><span style="font-family: Menlo; font-size: 11px; background-color: rgb(255, 255, 255);" class="">or similar.</span></div><div class=""><span style="font-family: Menlo; font-size: 11px; background-color: rgb(255, 255, 255);" class=""><br class=""></span></div><div class=""><span style="font-family: Menlo; font-size: 11px; background-color: rgb(255, 255, 255);" class="">You can find out what files are included with a port install like this:</span></div><div class=""><span style="font-family: Menlo; font-size: 11px; background-color: rgb(255, 255, 255);" class=""><br class=""></span></div><div class=""><span style="font-family: Menlo; font-size: 11px; background-color: rgb(255, 255, 255);" class="">port contents clang-9.0 | grep bin/clang</span></div><div class=""><span style="font-family: Menlo; font-size: 11px; background-color: rgb(255, 255, 255);" class=""><br class=""></span></div><div class=""><span style="font-family: Menlo; font-size: 11px; background-color: rgb(255, 255, 255);" class="">or similar.</span></div><div class=""><span style="font-family: Menlo; font-size: 11px; background-color: rgb(255, 255, 255);" class=""><br class=""></span></div><div class=""><span style="font-family: Menlo; font-size: 11px; background-color: rgb(255, 255, 255);" class=""><br class=""></span></div><div class=""><span style="background-color: rgb(255, 255, 255);" class=""><font face="Menlo" class=""><span style="font-size: 11px;" class="">If it’s a MacPorts port that you want to add openmp support to, that doesn’t already have it — well, good luck. That’s hard.</span></font></span></div><div class=""><span style="background-color: rgb(255, 255, 255);" class=""><font face="Menlo" class=""><span style="font-size: 11px;" class=""><br class=""></span></font></span></div><div class=""><span style="background-color: rgb(255, 255, 255);" class=""><font face="Menlo" class=""><span style="font-size: 11px;" class="">But ask for help, and someone will help guide you with a specific question.</span></font></span></div><div class=""><span style="background-color: rgb(255, 255, 255);" class=""><font face="Menlo" class=""><span style="font-size: 11px;" class=""><br class=""></span></font></span></div><div class=""><span style="background-color: rgb(255, 255, 255);" class=""><font face="Menlo" class=""><span style="font-size: 11px;" class="">Best,</span></font></span></div><div class=""><span style="background-color: rgb(255, 255, 255);" class=""><font face="Menlo" class=""><span style="font-size: 11px;" class=""><br class=""></span></font></span></div><div class=""><span style="background-color: rgb(255, 255, 255);" class=""><font face="Menlo" class=""><span style="font-size: 11px;" class="">Ken</span></font></span></div></body></html>