ports/devel/llvm17/files/patch-fopenmp.diff
Brooks Davis db44bb97e6 devel/llvm17: bootstrap from devel/llvm16
Copy llvm16 unchanged except for the exclusion of patches backporting
fixes from upstream LLVM.

This aids diffing to the previous version.
2023-08-01 00:46:27 +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");