[petsc-users] Weird handling of compiler flags by the build system resolved

meator meator.dev at gmail.com
Mon Jul 1 14:09:57 CDT 2024


On 7/1/24 6:22 PM, Satish Balay wrote:
> And for your desired use case: "I need to specify flags to PETSc build - and they should not bleed to dependent pkgs" I've indicated one mode for this.
> 
> i.e - do not specify them with configure - only list them with make.
> 
> ./configure
> 
> make CFLAGS='only-for-petsc-library-build'

Thank you for your answers! A combination of this approach and the 
*OPTFLAGS approach mentioned before allowed me to pass all the relevant 
flags while building PETSc without overriding preset ones and without 
polluting the pkg-config file. PETSc build flags will now not bleed to 
dependent pkgs.

I was also not aware of some of the flags which you have mentioned 
(--with-visibility, --with-pic). I have now made use of these.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0x1A14CB3464CBE5BF.asc
Type: application/pgp-keys
Size: 6275 bytes
Desc: OpenPGP public key
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20240701/cb904dcd/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: OpenPGP digital signature
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20240701/cb904dcd/attachment.sig>


More information about the petsc-users mailing list