gmp CPU identification

Kevin Ryde user42@zip.com.au
Thu, 24 Apr 2003 07:14:51 +1000


"Juro Bystricky" <jurobystricky@hotmail.com> writes:
>
> does anyone know if there is a way to identify the CPU a particular
> GMP library has been configured/built for? For example, using an AMD
> ATHLON based library on an Intel platform can cause a GP fault.

An invalid instruction fault perhaps, but shouldn't give a GP.

> A prudent program using GMP library should first check if the
> installed GMP is CPU "compatible" before trying to use the library.

There's no way to do that, as it stands.  Hopefully the system
administrator is smart enough not to install something that doesn't
work :-).