Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 29030 - mjpegtools well not compile with hardened-gcc enabled
Summary: mjpegtools well not compile with hardened-gcc enabled
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Alexander Gabert (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-17 22:25 UTC by Stephen Cook
Modified: 2003-09-29 11:24 UTC (History)
3 users (show)

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 Stephen Cook 2003-09-17 22:25:17 UTC
mjpegtools well not compile with hardened-gcc enabled.
But it will work when you disabled hardened-gcc

Reproducible: Always
Steps to Reproduce:
1. emerge hardened-gcc
2. emerge mjpeg
3.

Actual Results:  
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I..    -mcpu=i686 -march=i686 -march=i686 
-Wall -Wunused -c `test -f 'cpu_accel.c' || echo './'`cpu_accel.c
cpu_accel.c: In function `x86_accel':
cpu_accel.c:87: can't find a register in class `BREG' while reloading `asm'
cpu_accel.c:104: can't find a register in class `BREG' while reloading `asm'
cpu_accel.c:110: can't find a register in class `BREG' while reloading `asm'
cpu_accel.c:132: can't find a register in class `BREG' while reloading `asm'
cpu_accel.c:136: can't find a register in class `BREG' while reloading `asm'
make[3]: *** [cpu_accel.o] Error 1
make[3]: Leaving directory
`/dev/shm/portage/mjpegtools-1.6.1.90/work/mjpegtools-1.6.1.90/utils'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/dev/shm/portage/mjpegtools-1.6.1.90/work/mjpegtools-1.6.1.90/utils'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/dev/shm/portage/mjpegtools-1.6.1.90/work/mjpegtools-1.6.1.90'
make: *** [all] Error 2
 
!!! ERROR: media-video/mjpegtools-1.6.1.90 failed.
!!! Function src_compile, Line 52, Exitcode 2
!!! compile problem


Expected Results:  
Hardened gcc should automatically stop using propolice and etdyn when compiling
mjpegtools so it will compile
Comment 1 Ahmed Farid 2003-09-19 20:49:47 UTC
same result with gcc-3.3.1-r1
Comment 2 Alexander Gabert (RETIRED) gentoo-dev 2003-09-20 13:06:22 UTC
added workaround for breaking assembler in the ebuild

src_compile() {
    local myconf

    replace-flags "-march=pentium4" "-march=pentium3"
    filter-flags "-mfpmath=sse"

    myconf="${myconf} `use_with X x`"
    myconf="${myconf} `use_with quicktime`"
    myconf="${myconf} `use_enable x86 cmov-extensions`"

    if [ "`use dv`" ] ; then
        myconf="${myconf} --with-dv=/usr"
    fi
    if [ "`use mmx`" -o "`use 3dnow`" -o "`use sse`" ] ; then
        myconf="${myconf} --enable-simd-accel"
    fi
    if [ "`use mmx`" ] ; then
        myconf="${myconf} --with-jpeg-mmx=/usr/include/jpeg-mmx"
    fi

    econf ${myconf}

    # http://www.gentoo.org/proj/en/hardened/etdyn-ssp.xml
    has_version 'sys-devel/hardened-gcc' && find ${W} -name "Makefile" -type f -exec \
        sed -i "s:CC = gcc:CC = gcc -yet_exec:g" {} \;

    has_version 'sys-devel/hardened-gcc' && find ${W} -name "Makefile" -type f -exec \
        sed -i "s:CXX = gcc:CXX = g++ -yet_exec:g" {} \;

    has_version 'sys-devel/hardened-gcc' && find ${W} -name "Makefile" -type f -exec \
        sed -i "s:CXXCPP = gcc -E:CXX = g++ -E -yet_exec:g" {} \;

    emake || die "compile problem"
}
Comment 3 solar (RETIRED) gentoo-dev 2003-09-21 02:49:49 UTC
pappy
When doing these types of changes it may also be worth while fixing it for others that desire pic code as well.

inherit flag-o-matic
filter-flags -fPIC
Comment 4 Alexander Gabert (RETIRED) gentoo-dev 2003-09-29 11:24:06 UTC
changed in cvs