Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 330069 - when using hardened profile, kernel complains about missing stack protector support
Summary: when using hardened profile, kernel complains about missing stack protector s...
Status: RESOLVED DUPLICATE of bug 312335
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: The Gentoo Linux Hardened Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-27 13:08 UTC by Hanno Böck
Modified: 2010-07-27 13:14 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 Hanno Böck gentoo-dev 2010-07-27 13:08:26 UTC
This is a bit of a tricky issue. When using hardened profile with x86_64-pc-linux-gnu-4.4.3, this causes a kernel compile to say
/usr/src/linux-2.6.34.1/arch/x86/Makefile:81: stack protector enabled but no compiler support

The issue lies in scripts/gcc-x86_64-has-stack-protector.sh, which calls
echo "int foo(void) { char X[200]; return 3; }" | gcc -S -xc -c -O0 -mcmodel=kernel -fstack-protector - -o - 
which then causes
<stdin>:1: error: code model kernel does not support PIC mode
<stdin>:1: error: code model 'kernel' not supported in the 64 bit mode

A possible solution would be patching that check script to include -fno-pic, though I'm not sure if kernel people will like such workarounds for gentoo issues.
Comment 1 Magnus Granberg gentoo-dev 2010-07-27 13:14:18 UTC

*** This bug has been marked as a duplicate of bug 312335 ***