Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 355383 - Step missing after emerge --oneshot binutils gcc virtual/libc
Summary: Step missing after emerge --oneshot binutils gcc virtual/libc
Status: RESOLVED FIXED
Alias: None
Product: [OLD] Docs on www.gentoo.org
Classification: Unclassified
Component: Other documents (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: The Gentoo Linux Hardened Team
URL: http://www.gentoo.org/proj/en/hardene...
Whiteboard:
Keywords:
Depends on:
Blocks: Hardened_Docs
  Show dependency tree
 
Reported: 2011-02-18 04:07 UTC by J.C. Wren
Modified: 2011-04-05 02: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 J.C. Wren 2011-02-18 04:07:01 UTC
Based on my experience with switching to the hardened profile, after running "emerge --oneshot binutils gcc virtual/libc", shouldn't "gcc-config -l" followed by "gcc-config <version>" be performed to as to emerge system and world with the compiler that has PIE enabled?

Although I had 4.5.2 installed prior, 4.4.3 was still selected.  4.5.2 was rebuilt with PIE enabled, but the 4.4.3 compiler was being used for all work.  I believe a step should be added to ensure the compiler built with PIE is selected, and also that "gcc -v" should be run and have the user verify that the compiler reports something to the effect of "gcc version 4.5.2 (Gentoo Hardened 4.5.2 p1.1, pie-0.4.5)".

Reproducible: Always

Steps to Reproduce:
1.Follow instructions in code listing 2.3
2.
3.

Actual Results:  
Currently selected gcc-config compiler will be used

Expected Results:  
Compiled with PIE-enabled compiler
Comment 1 Francisco Blas Izquierdo Riera gentoo-dev 2011-02-18 07:12:01 UTC
Thanks for the comment,

I have updated it on the git repository so if the rest of the team agrees we will push this after the next meeting (if not earlier).

Here is a preview of the current status:
http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-docs.git;a=blob_plain;f=html/hardenedfaq.html;hb=HEAD#hardenedprofile
Comment 2 J.C. Wren 2011-02-18 14:36:37 UTC
Looks good.  My only suggestion might be to make SURE the user runs "source /etc/profile" if they have to select a new compiler with gcc-config.  gcc-config does tell you to do this as part of it's output, but if they don't then the newly selected version of gcc won't be picked up for the system and world emerges.

Of course, if you're doing the conversion to hardened, you should probably know enough to follow the instructions from any output anyway, right? :)
Comment 3 Francisco Blas Izquierdo Riera gentoo-dev 2011-02-18 23:18:59 UTC
Fixed that too: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-docs.git;a=blob_plain;f=html/hardenedfaq.html;h=1d6bbea895628ea1e4510beca7b747b7515164b9;hb=HEAD

Thanks for the suggestions it is very reconforting hearing that somebody does read the docs :D
Comment 4 Francisco Blas Izquierdo Riera gentoo-dev 2011-04-05 02:15:00 UTC
Since the fix is already published on the official docs I asked blueness to close this. Thanks blueness :D