Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 108615 - xen-3.0_pre20051007 doesn't build wie PIE and SSP enabled GCC
Summary: xen-3.0_pre20051007 doesn't build wie PIE and SSP enabled GCC
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Chris Bainbridge (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-09 08:52 UTC by fump
Modified: 2005-10-10 06:45 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 fump 2005-10-09 08:52:02 UTC
xen 3.0 Devel does not compile with PIE and SSP enabled GCC. This is a know
problem with xen 2.0, just have a look at the xen-2.0.7 ebuild.
 

Reproducible: Always
Steps to Reproduce:
1.echo "app-emulation/xen" >> /etc/portage/package.keywords
2.emerge xen
3.

Actual Results:  
gcc -nostdinc -fno-builtin -fno-common -fno-strict-aliasing -iwithprefix include
-Wall -Werror -Wno-pointer-arith -pipe
-I/var/tmp/portage/xen-3.0.0_pre20051007/work/xen-unstable-20051007/xen/include
-I/var/tmp/portage/xen-3.0.0_pre20051007/work/xen-unstable-20051007/xen/include/asm-x86/mach-generic
-I/var/tmp/portage/xen-3.0.0_pre20051007/work/xen-unstable-20051007/xen/include/asm-x86/mach-default
-O3 -fomit-frame-pointer -msoft-float -m32 -march=i686 -DNDEBUG -DVERBOSE -c
acm_ops.c -o acm_ops.oIn file included from
acm_ops.c:28:/var/tmp/portage/xen-3.0.0_pre20051007/work/xen-unstable-20051007/xen/include/asm/shadow.h:
In function
`update_hl2e':/var/tmp/portage/xen-3.0.0_pre20051007/work/xen-unstable-20051007/xen/include/asm/mm.h:206:
error: can't find a register in class `BREG' while reloading `asm'make[1]: ***
[acm_ops.o] Error 1make[1]: Leaving directory
`/var/tmp/portage/xen-3.0.0_pre20051007/work/xen-unstable-20051007/xen/common'make:
*** [/var/tmp/portage/xen-3.0.0_pre20051007/work/xen-unstable-20051007/xen/xen]
Error 2make: Leaving directory
`/var/tmp/portage/xen-3.0.0_pre20051007/work/xen-unstable-20051007/xen'!!!
ERROR: app-emulation/xen-3.0.0_pre20051007 failed.!!! Function src_compile, Line
40, Exitcode 2!!! compiling xen failed

Expected Results:  
working ebuild ;)

Adding 

src_unpack() {
        unpack ${A}
        # hardened flags
        echo "CFLAGS += -nopie -fno-stack-protector -fno-stack-protector-all" \
             >> ${S}/xen/arch/x86/Rules.mk
}

to xen-3.0.0_pre20051007.ebuild fixes the problem. the src_unpack part was taken
from xen-2.0.7.ebuild. 

maybe there could be a note about the fact that PIE and SSP will be disabled for
this ebuild while emerging? :)
Comment 1 Chris Bainbridge (RETIRED) gentoo-dev 2005-10-10 06:45:14 UTC
Oops, the clags were there before.. re-added.