diff options
author | Patrick Georgi <pgeorgi@google.com> | 2020-09-02 19:53:11 +0200 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-09-03 18:47:09 +0000 |
commit | 80370ff991e9a65560ac1378b94f2a08f26e7883 (patch) | |
tree | 4d13ae0b777ea9334b8ae5bc84c3b5d2478a8be3 /util | |
parent | 7c4956df35b05c478daf0e02c3fad18f717c3b02 (diff) |
crossgcc: 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.
Change-Id: Iafdc2eb696189b9e2c5ead316f310d98c949ef74
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45044
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'util')
-rw-r--r-- | util/crossgcc/patches/gmp-6.2.0_generic-build.patch | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/util/crossgcc/patches/gmp-6.2.0_generic-build.patch b/util/crossgcc/patches/gmp-6.2.0_generic-build.patch new file mode 100644 index 0000000000..a05635f1d1 --- /dev/null +++ b/util/crossgcc/patches/gmp-6.2.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; + } |