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. Reproducible: Always
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: http://git.alpinelinux.org/cgit/aports/tree/main/gcc/gcc-4.9-musl-fortify.patch?id=067a4f28825478911bb62be3b8da758d9722753e 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: > > http://git.alpinelinux.org/cgit/aports/tree/main/gcc/gcc-4.9-musl-fortify. > patch?id=067a4f28825478911bb62be3b8da758d9722753e > > 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 *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.
(In reply to Anthony Basile from comment #6) > sys-libs/fortify-headers is not on the gentoo tree. It is now :) (In reply to Felix Janda from comment #3) > I see, sounds sensible. > > Just for reference: > > http://git.alpinelinux.org/cgit/aports/tree/main/gcc/gcc-4.9-musl-fortify. > patch?id=067a4f28825478911bb62be3b8da758d9722753e > > is used in alpine to make gcc first search for the fortify headers. > However it depends on other gcc patches they use. Latest patch: https://git.alpinelinux.org/aports/tree/main/gcc/0020-add-fortify-headers-paths.patch. But yeah, I'd prefer spec if we can too I suppose.
(In reply to Sam James from comment #7) > (In reply to Anthony Basile from comment #6) > > sys-libs/fortify-headers is not on the gentoo tree. > > It is now :) > I meant to say "sys-libs/fortify-headers is NOW on the gentoo tree." Sam I didn't look carefully, but do we need the sys-libs/fortify-headers package now?
(In reply to Anthony Basile from comment #8) > (In reply to Sam James from comment #7) > > (In reply to Anthony Basile from comment #6) > > > sys-libs/fortify-headers is not on the gentoo tree. > > > > It is now :) > > > > I meant to say "sys-libs/fortify-headers is NOW on the gentoo tree." > Ah ok! > Sam I didn't look carefully, but do we need the sys-libs/fortify-headers > package now? I think we still need it now, musl doesn't want to implement these (https://wiki.musl-libc.org/future-ideas.html), so we just need to figure out how we want to force it in for now. Specs or a patch. I think a patch is easier for now while we test it out, then move to specs once we're happy?
In #musl, dalias and some others mentioned issues with the current impl which need fixing.