[ET Trac] #2553: Cactus' link command uses CPPFLAGS and CXXFLAGS

Roland Haas trac-noreply at einsteintoolkit.org
Tue Jan 18 16:24:25 CST 2022


#2553: Cactus' link command uses CPPFLAGS and CXXFLAGS

 Reporter: Roland Haas
   Status: open
Milestone: 
  Version: development version
     Type: bug
 Priority: minor
Component: Cactus

Comment (by Roland Haas):

Removing CXXFLAGS and CPPFLAGS from the LD line leads to link time failures about `GOMP_parallel` not being found. Adding `LD_OPENMP_FLAGS = -fopenmp` does not help since that variable is not used. The only `X_OPENMP_FLAGS` variables in configure are:  

```
lib/make/configure:F77_OPENMP_FLAGS="$F90_OPENMP_FLAGS"
lib/make/configure:s%@CPP_OPENMP_FLAGS@%$CPP_OPENMP_FLAGS%g
lib/make/configure:s%@FPP_OPENMP_FLAGS@%$FPP_OPENMP_FLAGS%g
lib/make/configure:s%@C_OPENMP_FLAGS@%$C_OPENMP_FLAGS%g
lib/make/configure:s%@CXX_OPENMP_FLAGS@%$CXX_OPENMP_FLAGS%g
lib/make/configure:s%@CUCC_OPENMP_FLAGS@%$CUCC_OPENMP_FLAGS%g
lib/make/configure:s%@F90_OPENMP_FLAGS@%$F90_OPENMP_FLAGS%g
lib/make/configure:s%@F77_OPENMP_FLAGS@%$F77_OPENMP_FLAGS%g
```

So one first needs to define a new variable `LD_OPENMP_FLAGS` then make sure it gets added to `LDFLAGS` and then one can remove `CXXFLAGS`. Probably also a good idea to set `LD_OPENMP_FLAGS` to the same default as `CXX_OPENMP_FLAGS` in `lib/make/known-architectures/linux` 

If one wants to preserve backwards compatibility then one also needs to default `LD_OPENMP_FLAGS` to `CXX_OPENMP_FLAGS`.

--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2553/cactus-link-command-uses-cppflags-and
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.einsteintoolkit.org/pipermail/trac/attachments/20220118/6cc53e13/attachment-0001.html 


More information about the Trac mailing list