Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 130167 - app-emulation/xen-3.0.2 fails to build with hardened toolchain
Summary: app-emulation/xen-3.0.2 fails to build with hardened toolchain
Status: RESOLVED FIXED
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: http://tinderbox.x86.dev.gentoo.org/p...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-16 06:58 UTC by Mark Glines
Modified: 2006-05-22 09:01 UTC (History)
1 user (show)

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


Attachments
Abort compiliation for hardened toolchains. (xen-error-on-hardened-toolchain.diff,813 bytes, patch)
2006-04-16 10:05 UTC, Mark Glines
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Glines 2006-04-16 06:58:52 UTC
When a user running gentoo-hardened tries to compile xen, it fails, complaining about running out of registers.

Either it should be fixed, or it should detect hardened toolchains and die with a "you bonehead" error message (depending on whether hardened xen is a good idea anyway).  My first try was with USE=pae; turning this USE flag off had no effect.


gcc -O2 -fomit-frame-pointer -DNDEBUG -m32 -march=i686 -Wall -Wstrict-prototypes -Wdeclaration-after-statement -nostdinc -fno-builtin -fno-common -fno-strict-aliasing -iwithprefix include -Werror -Wno-pointer-arith -pipe -I/var/tmp/portage/xen-3.0.2/work/xen-3.0.2/xen/include -I/var/tmp/portage/xen-3.0.2/work/xen-3.0.2/xen/include/asm-x86/mach-generic -I/var/tmp/portage/xen-3.0.2/work/xen-3.0.2/xen/include/asm-x86/mach-default -msoft-float -DCONFIG_X86_PAE=1 -g -D__XEN__ -c lib.c -o lib.o
grant_table.c: In function `do_grant_table_op':
/var/tmp/portage/xen-3.0.2/work/xen-3.0.2/xen/include/asm/mm.h:206: error: can't find a register in class `BREG' while reloading `asm'
/var/tmp/portage/xen-3.0.2/work/xen-3.0.2/xen/include/asm/mm.h:206: error: can't find a register in class `BREG' while reloading `asm'
/var/tmp/portage/xen-3.0.2/work/xen-3.0.2/xen/include/asm/mm.h:206: error: can't find a register in class `BREG' while reloading `asm'
make[2]: *** [grant_table.o] Error 1



tweet ~ # emerge --info
Portage 2.1_pre7-r5 (hardened/x86/2.6, gcc-3.4.6, glibc-2.3.6-r3, 2.6.16-ck1 i686)
=================================================================
System uname: 2.6.16-ck1 i686 AMD Athlon(tm) MP 1700+
Gentoo Base System version 1.12.0_pre17
ccache version 2.4 [enabled]
dev-lang/python:     2.3.5-r2, 2.4.2-r1
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon-xp -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=athlon-xp -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks fixpackages metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.osuosl.org/"
MAKEOPTS="-j4"
PKGDIR="/usr/portage//packages/x86/"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage/"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/portage-overlay/perl-catalyst /usr/local/portage-overlay/ocfs2 /usr/local/portage-overlay/tipc"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext 7zip X a52 aac acpi adns aio alsa amarok amr ao apache2 arts async atlas bash-completion berkdb blender-game bzip2 caps cdda cddb cdio cdparanoia cdr cdrom ck-server clamav clamd corba cpudetection cracklib crypt css dga divx4linux dlloader doc dri dv dvb dvd dvdread effects esd ethereal exscalibar fbcon fbdev ffmpeg fftw flac flash gd gdbm gif glut gnome gtk hardened ifp ipod ipv6 ithreads jack java jpeg kerberos libgda live lzo mad matroska mikmod mmx mmxext mng modperl mozdevelop mozilla moznoirc mozsvg mp3 mp4 mplayer mpm-worker musicbrainz ncurses netjack network nfsv4 nptl nsplugin nvidia opengl pae pam perl pic plugin png pnp postgres ppds readline real sdl slang smp sndfile speex spell sqlite sse ssl subtitles svg tcltk tcpd test theora threads tiff truetype unicode usb userlocales uuid vorbis win32codecs x264 x86 xine xinerama xml xml2 xmms xvid zlib elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux userland_GNU video_cards_nv"
Unset:  ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 1 solar (RETIRED) gentoo-dev 2006-04-16 09:01:20 UTC
See also http://bugs.gentoo.org/show_bug.cgi?id=129491

xen* is low priority right now.
Comment 2 solar (RETIRED) gentoo-dev 2006-04-16 09:58:34 UTC
xen seems to use __XEN__ in place of __KERNEL__

Try this.
http://tinderbox.x86.dev.gentoo.org/portage/local/patches/app-emulation/xen/xen-3.0.2-nopiessp.patch
Comment 3 Mark Glines 2006-04-16 10:05:38 UTC
Created attachment 84788 [details, diff]
Abort compiliation for hardened toolchains.

(In reply to comment #1)
> See also http://bugs.gentoo.org/show_bug.cgi?id=129491
> 
> xen* is low priority right now.

In that case, as a temporary bandaid, can we just make the error explicit, and tell the user how to fix it?  Here's a patch to do the same check dev-lisp/sbcl does.

Maybe something in the CFLAGS would be preferred?  I'm happy to test things and submit patches, but I don't have much experience with hardened toolchain issues, so I wouldn't know where to start, sorry.
Comment 4 solar (RETIRED) gentoo-dev 2006-04-16 10:11:27 UTC
Mark see comment #2. It allows xen to build. No need to abort..
Comment 5 Mark Glines 2006-04-16 10:12:29 UTC
(In reply to comment #4)
> Mark see comment #2. It allows xen to build. No need to abort..

Yeah, that's what I get for taking too long to type up my reply.  Sorry.  Your patch worked!

Mark
Comment 6 solar (RETIRED) gentoo-dev 2006-04-16 10:19:50 UTC
chrb, see comment #2 please
Comment 7 Chris Bainbridge (RETIRED) gentoo-dev 2006-05-22 09:01:20 UTC
Patch added, thanks.