[petsc-dev] CFLAGS and COPTFLAGS

Jed Brown jed at jedbrown.org
Sun Jan 19 14:05:39 CST 2014


Barry Smith <bsmith at mcs.anl.gov> writes:

>    Summary
>
>    The reason for the current model is that in the original plan
>    —with-debugging=0 would providing good compiler optimization flags
>    (for each system) without the user having to set them; if the user
>    set them via COPTFLAGS then we did set them ourselves.
>
>    Observations
>
>     1) The “standard” for passing optimization flags to ./configure is
>     CFLAGS=“-O3 crap” we don’t support this and this confuses users
>
>     2) If we followed the standard and the user only set
>     non-optimization flags with CFLAGS we would not turn on
>     optimization when user might expect it (does this ever happen?)

Does it happen and would it be confusing?  I think it is not confusing,
especially since it's what everyone else does.

>     3) We provide a different, “better" way of providing optimization
>     flags and other CFLAGS, but know one knows about it.
>
>     4) Our —with-debugging=0 optimization flags are pretty bad, we
>     should improve them
>
>     So choices are
>
>      A) follow standard

I'm inclined to do this because it's less code and simpler logic, thus
the easiest to explain.  If they don't set CFLAGS, of course we have to
automatically choose reasonable defaults based on --with-debugging.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20140119/c8025b8d/attachment.sig>


More information about the petsc-dev mailing list