summaryrefslogtreecommitdiff
path: root/util/crossgcc/patches/gmp-6.2.1_generic-build.patch
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@google.com>2021-05-10 23:34:18 +0200
committerPatrick Georgi <pgeorgi@google.com>2021-05-12 15:26:01 +0000
commit0afb90a73ba007b3f6dc135ec8105def00182c5f (patch)
treedbea8785aac11a5b17b5713e9c0fe1f33b08def1 /util/crossgcc/patches/gmp-6.2.1_generic-build.patch
parent24abd3ef067115b1b691c3f885b7892cb7506164 (diff)
downloadcoreboot-0afb90a73ba007b3f6dc135ec8105def00182c5f.tar.xz
util/crossgcc: Update gmp to 6.2.1
Change-Id: I871942f66e8fc496ebe523fdab539ea20950a202 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/54047 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Diffstat (limited to 'util/crossgcc/patches/gmp-6.2.1_generic-build.patch')
-rw-r--r--util/crossgcc/patches/gmp-6.2.1_generic-build.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/util/crossgcc/patches/gmp-6.2.1_generic-build.patch b/util/crossgcc/patches/gmp-6.2.1_generic-build.patch
new file mode 100644
index 0000000000..a05635f1d1
--- /dev/null
+++ b/util/crossgcc/patches/gmp-6.2.1_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;
+ }