GNOME Bugzilla – Bug 166696
[build] Doesn't support 386 or Cyrix CPU
Last modified: 2005-06-30 15:51:48 UTC
Version details: Debian's 0.8.8-1 Distribution/Version: Debian/sid Hi, Richard Mortimer reported in Debian bug <http://bugs.debian.org/289362> a SIGILL in libgstreamer0.8, it seems this happened because of a "cpuid" instruction in gst_cpuid_i386(), gst/gstcpu.c. According to <http://people.freebsd.org/~kato/cpuident.html>, it seems one should follow a longer PATH to get an idea of the available CPU: - first check whether AC flag in EFLAGS is writable, if it isn't you're on a 386 and you shouldn't think of calling CPUID, -then run the following assembly code to check for a Cyrix CPU: movl $0x5555, %eax xorl %edx, %edx movl $2, %ecx clc divl %ecx jnc you_have_Cyrix_Or_Blue_Lightning jmp you_have_i80486 Maybe it's best to look for a nice CPU identification library or steal code from BSD/Linux/x86info/cpuid/whatever? Regards,
Created attachment 38381 [details] [review] add cpuid detection code This patch copies the cpuid detection code from libSDL (which is LGPL, so there should be no legal issues). libSDL also has an amd64 version, but seeing that the whole cpuid code is guarded by "#if defined(HAVE_CPU_I386)", I didn't copy that part.
Can someone tell me if this works? Wim, Dave?
IIRC, that code detects a 486 from a 386. I just wrote cpuid detection code to liboil yesterday, so I'll copy that.
Ugh, this is crap. I have half a mind to just rip out all this code and return 0 for gst_cpu_flags.
Fixed.