| Summary: | XDTV fails to compile with Hardened GCC 3.4.4 | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Christopher Hogan <chris.c.hogan> |
| Component: | [OLD] GCC Porting | Assignee: | Diego Elio Pettenò (RETIRED) <flameeyes> |
| Status: | RESOLVED TEST-REQUEST | ||
| Severity: | normal | CC: | hardened, s.geschwandtner, vapier |
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | x86 | ||
| OS: | Linux | ||
| Whiteboard: | Patch in tree | ||
| Package list: | Runtime testing required: | --- | |
|
Description
Christopher Hogan
2005-12-15 18:43:54 UTC
Hardened: some help on this one? :) read the source code and the answer is pretty obvious ...
src/memcpy.c:sse_copie() {
__asm__ ( ... : : : ... "ebx" ... )
}
you cant clobber ebx when building as PIC
rewrite the code to not clobber ebx, or hide ebx somewhere (say on the stack) as this bit of code looks to utilize all 6 x86 registers
although the code could use some touchups in general ... the first three lines look pointless when you could declare the input list to take care of that ...
I'll contact upstream and ask them if they can fix it. I've informed upstream and they'll take care of that for 2.3.0 due to end of january. In the mean time you probably need to disable mmx useflag for that package. Reopening, as I have put a patch in tree from upstream, can someone test it? Both 2.2.0-r2 and 2.3.0 are in tree, please test and reopen if it's still an issue. I just tried to emerge xdtv 2.3.2 and it failed this way (with and without mmx USE flag): i686-pc-linux-gnu-gcc -O3 -Wall -Wno-switch -DHAVE_AV_CONFIG_H -I.. -I'../'/libavutil -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o msmpeg4.o msmpeg4.c msmpeg4.c: In function `msmpeg4_encode_dc': msmpeg4.c:729: error: can't find a register in class `BREG' while reloading `asm' make[2]: *** [msmpeg4.o] Error 1 make[2]: *** Waiting for unfinished jobs.... h263.c: In function `h263_decode_block': h263.c:4552: warning: 'level' might be used uninitialized in this function make[2]: Leaving directory `/var/tmp/portage/xdtv-2.3.2/work/xdtv-2.3.2/libavcodec' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/xdtv-2.3.2/work/xdtv-2.3.2' make: *** [all] Error 2 !!! ERROR: media-tv/xdtv-2.3.2 failed. Call stack: ebuild.sh, line 1532: Called dyn_compile ebuild.sh, line 929: Called src_compile xdtv-2.3.2.ebuild, line 155: Called die Gentoo Base System version 1.6.14 Portage 2.1_pre7-r5 (selinux/2005.1/x86/hardened, gcc-3.4.6, glibc-2.3.6-r3, 2.6.16-hardened-r3 i686) ================================================================= System uname: 2.6.16-hardened-r3 i686 Intel(R) Pentium(R) 4 CPU 1.60GHz dev-lang/python: 2.4.2 sys-apps/sandbox: 1.2.12 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-r1 sys-devel/binutils: 2.16.1 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -pipe -march=pentium4 -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -pipe -march=pentium4 -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--alphabetical" FEATURES="autoconfig distlocks loadpolicy metadata-transfer parallel-fetch sandbox selinux sfperms strict userpriv usersandbox" GENTOO_MIRRORS="ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo ftp://mirrors.sec.informatik.tu-darmstadt.de/gentoo/" LANG="en_US.UTF-8" LINGUAS="en" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="x86 X a52 aac alsa bzip2 caps cjk crypt cups curl dts dvd dvdread ffmpeg flac gif glut gnutls gtk hardened ipv6 jpeg kdeenablefinal mad matroska mikmod mmap mmx mp3 ncurses nptl offensive ogg opengl pam pic png readline sdl selinux sndfile sse sse2 ssl theora threads tiff truetype unicode vorbis win32codecs xinerama xv xvid zlib elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux linguas_en userland_GNU" Unset: ASFLAGS, CTARGET, INSTALL_MASK, LC_ALL, LDFLAGS |