ports/devel/llvm15/files/patch-fopenmp.diff
Brooks Davis f3d912a7b9 devel/llvm15: boostrap from devel/llvm14
Make an as-is copy of llvm14 as devel/llvm15. It will be updated to
LLVM 15 and connected to the build in the next commit.  This makes it
easier to see what has changed.
2022-08-11 00:01:09 +01:00

14 lines
626 B
Diff

--- clang/lib/Driver/ToolChains/CommonArgs.cpp.orig 2017-05-10 17:18:56.000000000 +0000
+++ clang/lib/Driver/ToolChains/CommonArgs.cpp 2017-05-10 23:01:17.087686000 +0000
@@ -441,7 +441,10 @@
switch (TC.getDriver().getOpenMPRuntime(Args)) {
case Driver::OMPRT_OMP:
- CmdArgs.push_back("-lomp");
+ if (TC.getTriple().getOS() != llvm::Triple::FreeBSD || TC.isCrossCompiling() || !llvm::sys::fs::exists("%%LLVM_PREFIX%%/lib/libomp.so"))
+ CmdArgs.push_back("-lomp");
+ else
+ CmdArgs.push_back("%%LLVM_PREFIX%%/lib/libomp.so");
break;
case Driver::OMPRT_GOMP:
CmdArgs.push_back("-lgomp");