[petsc-dev] [Bitbucket] Pull request #375: Pass LDFLAGS down to GNUPackage externalpackages. (petsc/petsc)

Satish Balay balay at mcs.anl.gov
Mon Oct 12 11:46:49 CDT 2015


On Mon, 12 Oct 2015, Satish Balay wrote:

> On Mon, 12 Oct 2015, Barry Smith wrote:
> 
> > 
> > > On Oct 12, 2015, at 10:55 AM, Satish Balay <balay at mcs.anl.gov> wrote:
> > > 
> > > On Mon, 12 Oct 2015, Barry Smith wrote:
> > > 
> > >> 
> > >>> On Oct 12, 2015, at 8:53 AM, Matthew Knepley <knepley at gmail.com> wrote:
> > >>> 
> > >>> On Mon, Oct 12, 2015 at 8:45 AM, Dmitry Karpeyev <dkarpeev at gmail.com> wrote:
> > >>> How does one extract just LDFLAGS while building a GNUPackage object?
> > >> 
> > >>   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.
> > > 
> > > 
> > > I don't think we know what the 'safe LDFLAGS' are. As we don't know what each package does with LDFLAGS..
> > 
> >    All the compiler flags are NOT safe. So we remove all the unsafe ones and hope for the best.
> 
> I think Dmitry has to show us the use-case where he is having trouble.
> 
> PETSc configure currently has CFLAGS - and it passes them
> appropriately - and it works with all externalpackages. [as far as we
> know]
> 
> We currently don't pass in LDFLAGS - but we can do that with the patch
> I mentioned.
> 
> What you propose is to select some CFLAGS that are valid for linker -
> and pass them as LDFLAGS to externalpackages. I'm not convinced this
> is the correct thing to do.


Note: I think most packages use CFLAGS with CLINKER and FFLAGS with
FLINKER similar to petsc usage [please correct me if this is
incorrect].

Hence I think 'selecting some of the CFLAGS and passing them as
LDFLAGS' is not the proper thing to do.

Satish



More information about the petsc-dev mailing list