<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Mon, Oct 12, 2015 at 11:39 AM Satish Balay <<a href="mailto:balay@mcs.anl.gov">balay@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Mon, 12 Oct 2015, Barry Smith wrote:<br>
<br>
><br>
> > On Oct 12, 2015, at 10:55 AM, Satish Balay <<a href="mailto:balay@mcs.anl.gov" target="_blank">balay@mcs.anl.gov</a>> wrote:<br>
> ><br>
> > On Mon, 12 Oct 2015, Barry Smith wrote:<br>
> ><br>
> >><br>
> >>> On Oct 12, 2015, at 8:53 AM, Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> wrote:<br>
> >>><br>
> >>> On Mon, Oct 12, 2015 at 8:45 AM, Dmitry Karpeyev <<a href="mailto:dkarpeev@gmail.com" target="_blank">dkarpeev@gmail.com</a>> wrote:<br>
> >>> How does one extract just LDFLAGS while building a GNUPackage object?<br>
> >><br>
> >>   I cannot imagine in general this is what you want, because it will only work when the user provides the "correct" LDFLAGS and how are they suppose to know what the correct LDFLAGS are? I think you should pass in the "safe" part of getLinkerFlags(), that is the linker flags that are not compiler flags as I said in my previous email.<br>
> ><br>
> ><br>
> > I don't think we know what the 'safe LDFLAGS' are. As we don't know what each package does with LDFLAGS..<br>
><br>
>    All the compiler flags are NOT safe. So we remove all the unsafe ones and hope for the best.<br>
<br>
I think Dmitry has to show us the use-case where he is having trouble.<br></blockquote><div><br></div><div>Quoting from an earlier email in this thread:</div><div>"<span style="font-size:13px;line-height:19.5px">Here's what prompted me to do this (I can't easily reproduce this [but the MOOSE guys can]):</span></div><div style="font-size:13px;line-height:19.5px">if one builds clang 3.7.0 from source with OpenMP support enabled</div><div style="font-size:13px;line-height:19.5px">using the system clang from  the latest XCode on Yosemite or El Capitan,</div><div style="font-size:13px;line-height:19.5px">then one can end up with a broken compiler.  Namely, clang cannot find </div><div style="font-size:13px;line-height:19.5px">libomp. One workaround (a bad one, in my opinion) is to use an appropriate DYLD_LIBRARY_PATH), but that doesn't always work, because it's not inherited by child processes, etc.  Another approach (which is what I was trying to do, is to set pass in appropriate LDFLAGS.  However, they need to be passed down to all dependent packages, and HYPRE wasn't getting them.</div><div style="font-size:13px;line-height:19.5px"><br></div><div><span style="font-size:13px;line-height:19.5px">Now, one could argue that using a compiler broken in this way is the source of all of these problems, but irrespective of this specific thing, passing LDFLAGS down to all dependent packages seems like an innocent enough thing to do, doesn't it?  In fact, it seems to be the consistent thing to do so that everything is built using the same linker flags."</span> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
PETSc configure currently has CFLAGS - and it passes them<br>
appropriately - and it works with all externalpackages. [as far as we<br>
know]<br>
<br>
We currently don't pass in LDFLAGS - but we can do that with the patch<br>
I mentioned.<br>
<br>
What you propose is to select some CFLAGS that are valid for linker -<br>
and pass them as LDFLAGS to externalpackages. I'm not convinced this<br>
is the correct thing to do.<br>
<br>
Satish<br>
</blockquote></div></div>