GNOME Bugzilla – Bug 141083
gstreamer-0.8.1 compile failure with gcc-3.4: error: PIC register `ebx' clobbered in `asm'
Last modified: 2004-12-22 21:47:04 UTC
On x86 (i686-pc-linux-gnu): if /bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/libxml2 -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I.. -Wall -DGST_DISABLE_DEPRECATED -g -I../libs -I../include -DG_LOG_DOMAIN=g_log_domain_gstreamer -DGST_MAJORMINOR=\""0.8"\" -O2 -pipe -march=athlon-xp -fprefetch-loop-arrays -MT libgstreamer_0.8_la-gstelement.lo -MD -MP -MF ".deps/libgstreamer_0.8_la-gstelement.Tpo" \ -c -o libgstreamer_0.8_la-gstelement.lo `test -f 'gstelement.c' || echo './'`gstelement.c; \ then mv -f ".deps/libgstreamer_0.8_la-gstelement.Tpo" ".deps/libgstreamer_0.8_la-gstelement.Plo"; \ else rm -f ".deps/libgstreamer_0.8_la-gstelement.Tpo"; exit 1; \ fi gstcpu.c: In function `gst_cpuid_i386': gstcpu.c:72: error: PIC register `ebx' clobbered in `asm' Also in gst/gsttrashstack.h. Tentative patch attached (needs review by someone who groks x86 asm)
Created attachment 27080 [details] [review] gstreamer-0.8.1-ebx-clobber.patch In gstcpu.c: removes mark ebx as clobbered In gsttrashstack.h: saves and restores ebx, removes mark ebx as clobbered Downstream: http://bugs.gentoo.org/show_bug.cgi?id=48953
Can you confirm that this isn't just a compiler bug? Gentoo often uses non-official or just plain buggy versions of gcc (not on purpose, but that's the point here). RedHat/Debian & co all use versions with several patches added to fix those issues. Note that I know nothing about assembler. ;).
This isn't a compiler bug. It's your bug. From here: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8546 We have the following: State-Changed-From-To: analyzed->closed State-Changed-Why: Clobbering %ebx is now illegal in PIC mode on mainline (which will likely become gcc 3.4). As such, you shouldn't be clobbering it.
Also please note that the above mentioned bug was closed in December 2002, and AFAIK the illegality of clobbering %ebx in PIC mode has been documented since even before that.
Ok, fixed in CVS.
*** Bug 141216 has been marked as a duplicate of this bug. ***
*** Bug 142554 has been marked as a duplicate of this bug. ***