Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Better fix for when CFLAGS includes -D_FORTIFY_SOURCE
The module signals.pyx has to be built with fortify disabled, because of a false positive in one of the `longjmp()`, more precisely in the call ``` cylongjmp(trampoline_setup, 1) ``` which appears in `setup_trampoline()`. Often distributions will add `-D_FORTIFY_SOURCE=2` to `CFLAGS`, and so this has to be overridden when compiling `signals.pyx` by adding `-U_FORTIFY_SOURCE` to the compiler arguments. The former solution, using `add_project_arguments()` doesn't work since it will add flags *before* the ones provided in `CFLAGS`. Instead, add `-U_FORTIFY_SOURCE` to the arguments in the definition of the extension module `signal`, which will add it to the command line *after* the ones provided in `CFLAGS`. In addition, fortify is disabled only for building `signal.pyx`.
- Loading branch information