sagemath / cysignals

cysignals: interrupt and signal handling for Cython
GNU Lesser General Public License v3.0
44 stars 23 forks source link

Suppress fortify source globally. #170

Closed J08nY closed 9 months ago

J08nY commented 1 year ago

Some distributions add _FORTIFY_SOURCE globally, which results in the compiler option -Wp,-D_FORTIFY_SOURCE-2 being passed to the compiler. Sadly, this option is not overridden by the undef_macros setuptools parameter, as that only does -U_FORTIFY_SOURCE but the -Wp option passes directly to the preprocessor. Thus ArchLinux for example had to do a CFLAGS change in their distribution of the cysignals package, see here. The package is not compilable by default on ArchLinux from pypi.

This PR fixes this issue, not in the nicest possible way, but certainly sufficiently.

dimpase commented 9 months ago

@antonio-rojas - does is make sense for Arch? (by the way, we just had new release here)

antonio-rojas commented 9 months ago

This works for me, yes.

dimpase commented 9 months ago

do you mean it's meaningful for Arch to merge it?

antonio-rojas commented 9 months ago

As the OP mentioned, it would allow us to build the package without doing any modification to our default CFLAGS beforehand.

J08nY commented 9 months ago

Thanks! I can now install this in a virtualenv from source(& pypi when it gets release).