fortify-headers is a stand alone implementation of fortify sources as discussed at http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html. It is libc agnostic and can be used with musl as alpine linux does.
We can install fortify-headers at /usr/include/fortify if USE=fortify is given.
Since it is standalone, why not package it seperately?
(In reply to Felix Janda from comment #1)
> Since it is standalone, why not package it seperately?
I was thinking of it as a separate package on which the musl ebuild depends conditionally with USE=fortify. However, to make use of it, you need to add the correct -I line and I was thinking of maybe patching the spec files to include that in musl.
I see, sounds sensible.
Just for reference:
is used in alpine to make gcc first search for the fortify headers.
However it depends on other gcc patches they use.
(In reply to Felix Janda from comment #3)
> I see, sounds sensible.
> Just for reference:
> is used in alpine to make gcc first search for the fortify headers.
> However it depends on other gcc patches they use.
Hmm .. don't like it. I'd rather go with spec files where we can just add another spec which can be selected using gcc-config.
The alpine patch was just for reference.
So we could have a fortify.specs à la
%rename cc1 old_cc1
-isystem /usr/include/fortify %(old_cc1)
which would need to be added to GCC_SPECS, say to all variants except vanilla.
sys-libs/fortify-headers is not on the gentoo tree.