diff -uNr cfe-5.0.0.src.orig/lib/Driver/ToolChains/Clang.cpp cfe-5.0.0.src/lib/Driver/ToolChains/Clang.cpp --- cfe-5.0.0.src.orig/lib/Driver/ToolChains/Clang.cpp 2017-06-12 23:04:01.000000000 -0400 +++ cfe-5.0.0.src/lib/Driver/ToolChains/Clang.cpp 2017-06-15 23:24:31.000000000 -0400 @@ -3204,6 +3204,8 @@ case Driver::OMPRT_OMP: case Driver::OMPRT_IOMP5: // Clang can generate useful OpenMP code for these two runtime libraries. + // Automatically find omp.h from libomp-dev + CmdArgs.push_back("-I@FINK_PREFIX@/include/libomp"); CmdArgs.push_back("-fopenmp"); // If no option regarding the use of TLS in OpenMP codegeneration is diff -uNr cfe-5.0.0.src.orig/lib/Driver/ToolChains/CommonArgs.cpp cfe-5.0.0.src/lib/Driver/ToolChains/CommonArgs.cpp --- cfe-5.0.0.src.orig/lib/Driver/ToolChains/CommonArgs.cpp 2017-06-09 22:30:02.000000000 -0400 +++ cfe-5.0.0.src/lib/Driver/ToolChains/CommonArgs.cpp 2017-06-15 23:21:16.000000000 -0400 @@ -441,15 +441,21 @@ switch (TC.getDriver().getOpenMPRuntime(Args)) { case Driver::OMPRT_OMP: + // Help clang find libomp.dylib + CmdArgs.push_back("-L@FINK_PREFIX@/lib/libomp"); CmdArgs.push_back("-lomp"); break; case Driver::OMPRT_GOMP: + // Help clang find libgomp.dylib + CmdArgs.push_back("-L@FINK_PREFIX@/lib/libomp"); CmdArgs.push_back("-lgomp"); if (GompNeedsRT) CmdArgs.push_back("-lrt"); break; case Driver::OMPRT_IOMP5: + // Help clang find libiomp5.dylib + CmdArgs.push_back("-L@FINK_PREFIX@/lib/libomp"); CmdArgs.push_back("-liomp5"); break; case Driver::OMPRT_Unknown: