--- /var/portage/media-video/ffmpeg/ffmpeg-0.6.ebuild 2010-07-11 17:36:06.000000000 +0200 +++ /var/portage/media-video/ffmpeg/ffmpeg-0.6.ebuild 2010-08-14 00:16:20.181492522 +0200 @@ -32,7 +32,7 @@ IUSE="+3dnow +3dnowext alsa altivec cpudetection custom-cflags debug dirac doc ieee1394 +encode faac faad gsm jack +mmx +mmxext vorbis test theora threads x264 xvid network zlib sdl X mp3 amr - oss pic rtmp schroedinger +hardcoded-tables bindist v4l v4l2 + oss rtmp schroedinger +hardcoded-tables bindist v4l v4l2 speex +ssse3 jpeg2k vaapi vdpau vpx" VIDEO_CARDS="nvidia" @@ -159,14 +159,19 @@ use mmxext || myconf="${myconf} --disable-mmx2" use 3dnow || myconf="${myconf} --disable-amd3dnow" use 3dnowext || myconf="${myconf} --disable-amd3dnowext" - # disable mmx accelerated code if PIC is required - # as the provided asm decidedly is not PIC. + if gcc-specs-pie ; then - myconf="${myconf} --disable-mmx --disable-mmx2" - fi + # On hardened amd64 it compiles fine, but fails tests (and runtime) without pic + # On hardened x86 it does not hurt either + myconf="${myconf} --enable-pic" - # Option to force building pic - use pic && myconf="${myconf} --enable-pic" + if use x86 + then + # Compiles with only --disable-mmx, but fails tests and runtime + # on hardened x86 with textrels if not --disable-asm + myconf="${myconf} --disable-asm" + fi + fi # Try to get cpu type based on CFLAGS. # Bug #172723