[petsc-dev] CFLAGS and COPTFLAGS

Barry Smith bsmith at mcs.anl.gov
Sun Jan 19 19:12:04 CST 2014


  We could provide an argument to PETSc’s configure changing it to use the environmental variables that happen to be lying around. For example,

  ./configure —use-environmental-varibles-that-may-be-randomly-set

  The reason it is not the default is too many people have random values in their environment that they don’t know about, messing up the configure.

   Now all we need is a good name for this option

Request-assigned: Satish  allow use of environmental variables to set ./configure options flag is passed to mange this


On Jan 19, 2014, at 6:44 PM, Jed Brown <jed at jedbrown.org> wrote:

> Satish Balay <balay at mcs.anl.gov> writes:
>> To clarify - petsc configure ignores CC etc from env - but the following is accepted.
>> 
>> ./configure CC=gcc CXX=g++ FC=gfortran
> 
> Yeah, though in an effort to allow package scripts to be concise and
> less error-prone, they put the system-desired CC, CXX, CFLAGS, LDFLAGS,
> etc. into the environment of the packaging script.  For PETSc, this
> means writing
> 
>  ./configure CC="$CC" CFLAGS="$CFLAGS" CXX="$CXXFLAGS" ....
> 
> and if you forget one, the package may not be built correctly.  It
> definitely makes package maintainers' lives easier to not try to be
> smart.




More information about the petsc-dev mailing list