This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: problem with __init_cpu_features()
- From: "Carlos O'Donell" <carlos at systemhalted dot org>
- To: The Source <thesourcehim at gmail dot com>
- Cc: "libc-help at sourceware dot org" <libc-help at sourceware dot org>
- Date: Wed, 18 May 2016 10:55:51 -0400
- Subject: Re: problem with __init_cpu_features()
- Authentication-results: sourceware.org; auth=none
- References: <64f1a37c-8aa5-be67-eec1-88893ec0d1cf at gmail dot com>
On Wed, May 18, 2016 at 10:37 AM, The Source <thesourcehim@gmail.com> wrote:
> Hello, I'm trying to run my application on Cyrix Cx486SLC based system. But
> application (built for i486 as well as glibc) crashes on illegal instruction
> inside __init_cpu_features(). As far as I understand this CPU does not
> support cpuid (/proc/cpuinfo reports cpuid level -1 and /dev/cpu/0/cpuid can
> not be read with i/o error), so that might be the problem. Is there a way to
> avoid using __cpuid()? My glibc version is 2.22
You must use specific CFLAGS or CC to indicate you are building for a
pre-i586 target, that will disable unconditional cpuid usage, and
enable the checks required to verify cpuid is usable.
If you are cross-compiling from an x86_64 box I would recommend
CC="gcc -m32 -march=i486" instead to ensure that regardless of flags
you build for i486.
Just to check I kicked off a build for i486 locally to see if runs
into any problems.
Cheers,
Carlos.