#1406: Commit r5034 to the flesh breaks many external libraries -------------------------+-------------------------------------------------- Reporter: eschnett | Owner: knarf@… Type: defect | Status: review Priority: critical | Milestone: ET_2013_11 Component: SimFactory | Version: development version Resolution: | Keywords: -------------------------+--------------------------------------------------
Comment (by eschnett):
We pass CPPFLAGS to the C compiler, not to cpp. For example, when determining dependencies for C and C++, we use CPPFLAGS, but we do not use CFLAGS nor CXXFLAGS since we don't compile. In this case, we still need the compiler's OpenMP flag to ensure that the #ifdef _OPENMP and the #include <omp.h> are handled correctly. Thus, we need to continue to pass -openmp for CPP_OPENMP_FLAGS.
I believe this is a case where Cactus uses a flag differently from the way it is used elsewhere. A similar flag is LIBS, which we need to unset in all configure.sh scripts: Cactus does not prepend the "-l" flag to the libraries there, but every other code expects this, so passing LIBS would lead to errors. Of course, we don't want to use the libraries against Cactus will be linked when building an external library anyway, so this is fine.
I also just see that icc and icpc accept both -openmp and -fopenmp. We should simply switch to -fopenmp to circumvent this problem for now.