After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 166696 - [build] Doesn't support 386 or Cyrix CPU
[build] Doesn't support 386 or Cyrix CPU
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.8.8
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-02-08 17:42 UTC by Loïc Minier
Modified: 2005-06-30 15:51 UTC
See Also:
GNOME target: ---
GNOME version: 2.7/2.8


Attachments
add cpuid detection code (1.75 KB, patch)
2005-03-07 18:56 UTC, Peter De Wachter
none Details | Review

Description Loïc Minier 2005-02-08 17:42:57 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,
Comment 1 Peter De Wachter 2005-03-07 18:56:12 UTC
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.
Comment 2 Ronald Bultje 2005-03-11 20:21:01 UTC
Can someone tell me if this works? Wim, Dave?
Comment 3 David Schleef 2005-03-25 23:08:47 UTC
IIRC, that code detects a 486 from a 386.  I just wrote cpuid detection code to
liboil yesterday, so I'll copy that.
Comment 4 David Schleef 2005-03-26 00:05:29 UTC
Ugh, this is crap.  I have half a mind to just rip out all this code and return
0 for gst_cpu_flags.
Comment 5 David Schleef 2005-03-26 00:13:44 UTC
Fixed.