When building mjpegtools I had to set my CFLAGS from -O3 -pipe -fomit-frame-pointer -fPIC to -O2 -pipe to get it to build. With the older CFLAGS it would error out with: gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -mcpu=i686 -march=i686 -march=athlon-xp -O3 -pipe -fomit-frame-pointer -fPIC -Wall -Wunused -c `test -f 'yuv4mpeg.c' || echo './'`yuv4mpeg.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]: *** Waiting for unfinished jobs.... make[3]: Leaving directory `/var/tmp/portage/mjpegtools-1.6.1.90-r1/work/mjpegtools-1.6.1.90/utils' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/var/tmp/portage/mjpegtools-1.6.1.90-r1/work/mjpegtools-1.6.1.90/utils' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/mjpegtools-1.6.1.90-r1/work/mjpegtools-1.6.1.90' make: *** [all] Error 2 !!! ERROR: media-video/mjpegtools-1.6.1.90-r1 failed. !!! Function src_compile, Line 66, Exitcode 2 !!! compile problem Not a huge deal, might have something connected to bug #30345 though. Maybe if this can be confirmed by others -O3 and other harsh CFLAGS should be stripped out in the build? GCC was version 3.2.3 (ebuild: 3.2.3-r2). Hardware is Athlon XP2500+ with 1G ram and mostly new hardware so hardware errors are unlikely (IMHO). Reproducible: Always Steps to Reproduce: 1. Set clags to noted above on an X86 stable system 2. Build mjpegtools 3. Note failure. Actual Results: Build failed with noted error message. Expected Results: Build completes.
you really shouldnt put -fPIC in your CFLAGS ... you should let the packages do it themselves ... BREG asm errors are because the program doesnt support pic properly
I was under the impression that -fPIC was required to be added to the CFLAGS so that prelinking would work.
packages do pic support themselves, you shouldnt have to worry about it for example, ive never put fPIC in my CFLAGS and everything on my system that can be prelinked is (with the exception of a few packages that dont support pic atm)
wrong useage of -fPIC in CFLAGS (unsupported by gentoo)