Add a new option, OPENMP, to build darktable with OpenMP. This requires LLVM 3.7 as a runtime dependency when GCC is not the default compiler. The option is enabled by default because it brings an important performance improvement.
Details
Diff Detail
- Repository
- rP FreeBSD ports repository
- Lint
No Lint Coverage - Unit
No Test Coverage - Build Status
Buildable 787 Build 787: arc lint + arc unit
Event Timeline
graphics/darktable/Makefile | ||
---|---|---|
99 | It didn't work with bsd.port.options.mk: make(1) complained with a syntax error in the .if below, usually meaning a variable is undefined. | |
104 | Ok, I will add it. About RUN_DEPENDS, the correct dependency is ${LOCALBASE}/llvm37/lib/libomp.so, not clang37. Is there a way to specify that instead? | |
109 | Darktable works fine on my laptop and lld(1) finds libomp.so. Darktable cmake conf properly detects -fopenmp with Clang 3.7 and enables OpenMP support. |
darktable 1.6.9 was officially released, so the archive can be downloaded now with make fetch.
There is no need to update distinfo as it is the exact same archive provided to package managers.
Address @danfe's comment + patch to src/CMakeLists.txt
The patch to src/CMakeLists.txt was prepared for the upcoming darktable 2.0 and backported to darktable 1.6. When darktable 2.0 is compiled with Clang and -ffast-math (which is enabled by default), isnan() always returns false, even if -fno-finite-math-only is specified. darktable 2.0 crashes on startup without this patch. darktable 1.6 still starts but the patch appears to improve stability in lighttable (I get more freezes/lockups without it). So let's apply it now to darktable 1.6.
graphics/darktable/Makefile | ||
---|---|---|
104 | USES=compiler:openmp always pulls in GCC. This can't work with darktable because g++ and libstdc++ are used to build the C++ code and it's not compatible with libc++. The trick used by graphics/rawtherapee is at least as ugly and darktable crashes with it anyway. |
I have seen the patch-src_CMakeLists.txt and it correct, even if phabricator doesn't show it...
graphics/darktable/Makefile | ||
---|---|---|
104 |
Oh, I see. Reading the above comment (Enable OpenMP support with Clang 3.7) it looks like that we'd probably want to relax compiler:openmp dependency on GCC, but that's out of scope of this patch today. |