<html>#2553: Cactus' link command uses CPPFLAGS and CXXFLAGS
<table style='border-spacing: 1ex 0pt; '>
<tr><td style='text-align:right'> Reporter:</td><td>Roland Haas</td></tr>
<tr><td style='text-align:right'>   Status:</td><td>open</td></tr>
<tr><td style='text-align:right'>Milestone:</td><td></td></tr>
<tr><td style='text-align:right'>  Version:</td><td>development version</td></tr>
<tr><td style='text-align:right'>     Type:</td><td>bug</td></tr>
<tr><td style='text-align:right'> Priority:</td><td>minor</td></tr>
<tr><td style='text-align:right'>Component:</td><td>Cactus</td></tr>
</table>

<p>Comment (by Roland Haas):</p>
<p>Removing CXXFLAGS and CPPFLAGS from the LD line leads to link time failures about <code>GOMP_parallel</code> not being found. Adding <code>LD_OPENMP_FLAGS = -fopenmp</code> does not help since that variable is not used. The only <code>X_OPENMP_FLAGS</code> variables in configure are:  </p>
<div class="codehilite"><pre><span></span><span>lib/make/configure:F77_OPENMP_FLAGS=&quot;$F90_OPENMP_FLAGS&quot;</span>
<span>lib/make/configure:s%@CPP_OPENMP_FLAGS@%$CPP_OPENMP_FLAGS%g</span>
<span>lib/make/configure:s%@FPP_OPENMP_FLAGS@%$FPP_OPENMP_FLAGS%g</span>
<span>lib/make/configure:s%@C_OPENMP_FLAGS@%$C_OPENMP_FLAGS%g</span>
<span>lib/make/configure:s%@CXX_OPENMP_FLAGS@%$CXX_OPENMP_FLAGS%g</span>
<span>lib/make/configure:s%@CUCC_OPENMP_FLAGS@%$CUCC_OPENMP_FLAGS%g</span>
<span>lib/make/configure:s%@F90_OPENMP_FLAGS@%$F90_OPENMP_FLAGS%g</span>
<span>lib/make/configure:s%@F77_OPENMP_FLAGS@%$F77_OPENMP_FLAGS%g</span>
</pre></div>


<p>So one first needs to define a new variable <code>LD_OPENMP_FLAGS</code> then make sure it gets added to <code>LDFLAGS</code> and then one can remove <code>CXXFLAGS</code>. Probably also a good idea to set <code>LD_OPENMP_FLAGS</code> to the same default as <code>CXX_OPENMP_FLAGS</code> in <code>lib/make/known-architectures/linux</code> </p>
<p>If one wants to preserve backwards compatibility then one also needs to default <code>LD_OPENMP_FLAGS</code> to <code>CXX_OPENMP_FLAGS</code>.</p>
<p>--<br/>
Ticket URL: <a href='https://bitbucket.org/einsteintoolkit/tickets/issues/2553/cactus-link-command-uses-cppflags-and'>https://bitbucket.org/einsteintoolkit/tickets/issues/2553/cactus-link-command-uses-cppflags-and</a></p>
</html>