Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 546692 - Install 'fortify-headers' with musl
Summary: Install 'fortify-headers' with musl
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Gentoo musl team
URL: http://git.2f30.org/fortify-headers/
Whiteboard:
Keywords:
Depends on:
Blocks: musl-porting
  Show dependency tree
 
Reported: 2015-04-15 23:22 UTC by Anthony Basile
Modified: 2015-07-05 22:17 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anthony Basile gentoo-dev 2015-04-15 23:22:43 UTC
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
Comment 1 Felix Janda 2015-04-16 17:23:13 UTC
Since it is standalone, why not package it seperately?
Comment 2 Anthony Basile gentoo-dev 2015-04-18 11:37:11 UTC
(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.
Comment 3 Felix Janda 2015-04-18 16:51:05 UTC
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.
Comment 4 Anthony Basile gentoo-dev 2015-04-19 10:48:27 UTC
(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.
Comment 5 Felix Janda 2015-04-19 21:00:30 UTC
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.
Comment 6 Anthony Basile gentoo-dev 2015-05-15 13:51:35 UTC
sys-libs/fortify-headers is not on the gentoo tree.