Too many flags in opensaml pkgconfig

Cantor, Scott cantor.2 at osu.edu
Tue Feb 14 23:18:33 UTC 2012


> What originally sparked the observation is that it does seem wrong for
> linking with opensaml2 to automatically enable -O2 -g -DNDEBUG. 

I agree with that. I think it's worth looking at isolating "internal" flags and just adding them to the build with automake, and leaving CFLAGS with only the external stuff. It's a fair bit of work though.

> Those sort of flags seem a bit intrusive for downstream.  But given the
> structure of the current pkgconfig macro and the way configure is laid
> out, I don't see a great way of preventing inclusion of those flags while
> still getting the threading flags and other possible necessary flags.

I think it's possible at least to some degree, but it isn't something the model leads you to do.

> What I'm doing for right now is just filtering out the Debian build flags
> from the generated pkgconfig file, which at least removes the hardening
> flags but which leaves "-g -Wall -O2 -O2 -DNDEBUG" behind.  I guess the
> only option I can think of would be to rearchitect how compiler flags are
> handled in configure.ac so that the threading flags and flags derived from
> pkgconfig are separated from the CFLAGS that you get by default or because
> optimization or debugging is enabled, and only use the former to generate
> pkgconfig rather than all of them.  That seems like a chunk of Autoconf
> work; I'm not sure if the benefit is compelling enough that it's worth
> tracking as a low-priority bug in JIRA.

I don't have any problem with you filing it. I can't say that I'll have the time for the next release, but it should get looked at eventually.

-- Scott




More information about the Pkg-shibboleth-devel mailing list