Created attachment 203675 [details]
OPENMP is only for i386/amd64 (per option description), but it's enabled by default on all architectures.
Enable OPENMP only on amd64 and i386 to fix build.
Tested on powerpc64.
Hi Piotr, would you happen to have a log of a failing build?
I seem to recall that I can build ARM64 just fine, so I'm loathe to go for your proposed patch.
Comment on attachment 203675 [details]
This isn't the right fix. Please show a log how the build is failing on powerpc64. Aarch64 (ARM64) doesn't have OpenMP either, the Makefile avoids libomp, and the configure phase just won't find OpenMP and disable it, the package build in poudriere succeeds (at least with 5.6-rc2).
And what changes in compiler options if we avoid the OPENMP option? You can abort a potential test build without OPENMP option after a few compiled files, all the options should have been visible.
Reason I am asking is that the fix appears to be a side effect, and in particular, that your compiler rejects -march=generic.
(Please provide a log of the succeeded or ongoing build with OPENMP disabled.)
A commit references this bug:
Date: Sun Apr 21 01:21:29 UTC 2019
New revision: 499524
Update RawTherapee to 5.6 release.
Only offer OPENMP option on x86/amd64 for now.
While here, avoid -mtune=generic on anything but x86/amd64/aarch64. 
PR: 237285 
Submitted by: pkubaj 
Looks like the culprit is the CMAKE_ARGS+= -DPROC_TARGET_NUMBER="1".
I will now limit this to i386, amd64, aarch64, it appears that the other architectures (ARM (32 bit), MIPS, PowerPC, RISC-V, SPARC64) would not support it.
Please check if the upgrade rawtherapee 5.6 (ports r499524) fixes your powerpc64 build and reopen this PR if it does not.