summaryrefslogtreecommitdiff
path: root/util/crossgcc/patches/gmp-6.3.0_generic-build.patch
diff options
context:
space:
mode:
authorElyes Haouas <ehaouas@noos.fr>2023-08-01 04:49:56 +0200
committerElyes Haouas <ehaouas@noos.fr>2023-08-31 16:14:09 +0000
commit02e4d32524e99906100db2c3aa0c51e748916231 (patch)
tree0e68dfbec60bd7c3de128fe88473f918f2d60fe0 /util/crossgcc/patches/gmp-6.3.0_generic-build.patch
parentbc54f72d5da9c1c752aacf0c77c94a03771c3a90 (diff)
util/crossgcc: Update GMP from 6.2.1 to 6.3.0
Change-Id: I67d443cb15d89482b20b01f4068502b16ac8fc8e Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76865 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
Diffstat (limited to 'util/crossgcc/patches/gmp-6.3.0_generic-build.patch')
-rw-r--r--util/crossgcc/patches/gmp-6.3.0_generic-build.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/util/crossgcc/patches/gmp-6.3.0_generic-build.patch b/util/crossgcc/patches/gmp-6.3.0_generic-build.patch
new file mode 100644
index 0000000000..a05635f1d1
--- /dev/null
+++ b/util/crossgcc/patches/gmp-6.3.0_generic-build.patch
@@ -0,0 +1,20 @@
+Ensure that GMP is built for a generic CPU on x86
+
+While GMP supports fat builds on x86 that adapt to the CPU's
+capabilities, by default it builds for the CPU of the builder.
+Running that binary on an older CPU then can fail.
+--- gmp-6.2.0/config.guess~ 2020-09-02 19:23:01.817510842 +0200
++++ gmp-6.2.0/config.guess 2020-09-02 19:24:55.742325907 +0200
+@@ -1029,6 +1029,12 @@
+ virtualisers allow guests to set a broken state. */
+ suffix = "noavx";
+
++ if (cpuid_64bit) {
++ modelstr="x86_64";
++ } else {
++ modelstr="pentium";
++ }
++ suffix="";
+ printf ("%s%s", modelstr, suffix);
+ return 0;
+ }