From 27886421ed1e2aad041f3467d76604cdaeaab26906336c48732095806e3a72aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Tue, 29 May 2012 08:10:16 +0000 Subject: [PATCH] Accepting request 122655 from home:coolo:branches:openSUSE:Factory - do not abort on kvm's x86_64 "CPU", just use generic support for unknown CPUs OBS-URL: https://build.opensuse.org/request/show/122655 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/gmp?expand=0&rev=30 --- gmp-support-kvm.diff | 24 ++++++++++++++++++++++++ gmp.changes | 6 ++++++ gmp.spec | 2 ++ 3 files changed, 32 insertions(+) create mode 100644 gmp-support-kvm.diff diff --git a/gmp-support-kvm.diff b/gmp-support-kvm.diff new file mode 100644 index 0000000..65fb9c2 --- /dev/null +++ b/gmp-support-kvm.diff @@ -0,0 +1,24 @@ +From: Stephan Kulow + +KVM defaults to a basically non-existant CPUid, so it needs special +handling model 1 is Pentium Pro (1995) and model 3 is Pentium II (1997), +model 2 was never released + +Index: gmp-5.0.5/mpn/x86_64/fat/fat.c +=================================================================== +--- gmp-5.0.5.orig/mpn/x86_64/fat/fat.c 2012-05-06 13:19:50.000000000 +0200 ++++ gmp-5.0.5/mpn/x86_64/fat/fat.c 2012-05-29 09:58:12.540345955 +0200 +@@ -201,9 +201,12 @@ __gmpn_cpuvec_init (void) + case 6: + switch (model) + { ++ case 0x02: /* KVM default */ ++ /* generic will do */ ++ break; ++ + case 0x00: + case 0x01: +- case 0x02: + case 0x03: + case 0x04: + case 0x05: diff --git a/gmp.changes b/gmp.changes index 9e091ca..fbad240 100644 --- a/gmp.changes +++ b/gmp.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue May 29 08:01:17 UTC 2012 - coolo@suse.com + +- do not abort on kvm's x86_64 "CPU", just use generic support for + unknown CPUs + ------------------------------------------------------------------- Mon May 7 09:10:41 UTC 2012 - rguenther@suse.com diff --git a/gmp.spec b/gmp.spec index a3d89d2..43d8364 100644 --- a/gmp.spec +++ b/gmp.spec @@ -31,6 +31,7 @@ Url: http://gmplib.org/ Source: gmp-%{version}.tar.bz2 Source2: baselibs.conf Patch0: gmp-noexec.diff +Patch1: gmp-support-kvm.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -85,6 +86,7 @@ huge numbers (integer and floating point). %ifnarch %arm %patch0 %endif +%patch1 -p1 %build export CFLAGS="$RPM_OPT_FLAGS -fexceptions";