--- orig/tools/clang/lib/Driver/Tools.cpp 2015-09-03 11:39:15.000000000 -0500
+++ fixed/tools/clang/lib/Driver/Tools.cpp 2015-09-03 11:44:09.000000000 -0500
switch (getOpenMPRuntime(TC, Args)) {
+ // Automatically find MacPorts' libomp
+ CmdArgs.push_back("-L@@PREFIX@@/lib/libomp");
CmdArgs.push_back("-lomp");
+ // Automatically find MacPorts' libgomp (libomp)
+ CmdArgs.push_back("-L@@PREFIX@@/lib/libomp");
CmdArgs.push_back("-lgomp");
+ // Automatically find MacPorts' libiomp (libomp)
+ CmdArgs.push_back("-L@@PREFIX@@/lib/libomp");
CmdArgs.push_back("-liomp5");
// Clang can generate useful OpenMP code for these two runtime libraries.
+ // Automatically find MacPorts' omp.h
+ CmdArgs.push_back("-I@@PREFIX@@/include/libomp");
CmdArgs.push_back("-fopenmp");
// If no option regarding the use of TLS in OpenMP codegeneration is
// Also link the particular OpenMP runtimes.
switch (getOpenMPRuntime(ToolChain, Args)) {
+ // Automatically find MacPorts' libomp
+ CmdArgs.push_back("-L@@PREFIX@@/lib/libomp");
CmdArgs.push_back("-lomp");
+ // Automatically find MacPorts' libgomp (libomp)
+ CmdArgs.push_back("-L@@PREFIX@@/lib/libomp");
CmdArgs.push_back("-lgomp");
// FIXME: Exclude this for platforms with libgomp that don't require
CmdArgs.push_back("-lrt");
+ // Automatically find MacPorts' libiomp5 (libomp)
+ CmdArgs.push_back("-L@@PREFIX@@/lib/libomp");
CmdArgs.push_back("-liomp5");