Loading
vim: enable fortify when using clang
Our vim derivations have been disabling fortify for 10 years, due to a crash at the time that had yet to be fixed upstream. The vim configure script tries to strip out any `_FORTIFY_SOURCE` definition provided by the caller in favor of setting `-D_FORTIFY_SOURCE=1` itself and cites a crash introduced in gcc 4.0 as the reason, but our MacVim package has been running with fortify enabled without any known issues. After testing it seems that compiling vim with clang works just fine with fortify, but compiling it with gcc detects a buffer overflow and aborts. We do still need to disable `strictflexarrays1` though, as vim's `ufunc_S` struct ends with a `uf_name[4]` field that is treated as a flexible array with a minimum length of 4.