Patrick Georgi has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/45044 )
Change subject: crossgcc: Ensure that GMP is built for a generic CPU on x86 ......................................................................
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 --- A util/crossgcc/patches/gmp-6.2.0_generic-build.patch 1 file changed, 20 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/44/45044/1
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 0000000..a05635f --- /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; + }
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45044 )
Change subject: crossgcc: Ensure that GMP is built for a generic CPU on x86 ......................................................................
Patch Set 1:
Aaron, this should fix the issue you and Andrew reported, but it's a bit hard to test:
From what I can see, gmp is the only component that aggressively updates for the CPU architecture, so I expect this to solve it: The patch simply overrides build time detection to always go for the most generic platforms possible on x86(-64). I verified that the patch does that. To test if this fixes the coreboot-sdk illegal instruction issue, we need to build coreboot-sdk on one piece of hardware, icelake or whatever induces the newest math kernels to be default, while being run on the systems that showed the failure.
Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45044 )
Change subject: crossgcc: Ensure that GMP is built for a generic CPU on x86 ......................................................................
Patch Set 1: Code-Review+2
Let's see how it goes.
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/45044 )
Change subject: crossgcc: Ensure that GMP is built for a generic CPU on x86 ......................................................................
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 --- A util/crossgcc/patches/gmp-6.2.0_generic-build.patch 1 file changed, 20 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Aaron Durbin: Looks good to me, approved
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 0000000..a05635f --- /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; + }
9elements QA has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45044 )
Change subject: crossgcc: Ensure that GMP is built for a generic CPU on x86 ......................................................................
Patch Set 2:
Automatic boot test returned (PASS/FAIL/TOTAL): 7/1/8 "QEMU x86 q35/ich9" (x86_32) using payload TianoCore : SUCCESS : https://lava.9esec.io/r/17729 "QEMU x86 q35/ich9" (x86_32) using payload SeaBIOS : SUCCESS : https://lava.9esec.io/r/17728 "QEMU x86 i440fx/piix4" (x86_64) using payload SeaBIOS : FAIL : https://lava.9esec.io/r/17727 "QEMU x86 i440fx/piix4" (x86_32) using payload SeaBIOS : SUCCESS : https://lava.9esec.io/r/17726 "QEMU AArch64" using payload LinuxBoot_u-root_kexec : SUCCESS : https://lava.9esec.io/r/17725 "HP Z220 SFF Workstation" (x86_32) using payload LinuxBoot_BusyBox_kexec : SUCCESS : https://lava.9esec.io/r/17732 "HP Compaq 8200 Elite SFF PC" (x86_32) using payload TianoCore : SUCCESS : https://lava.9esec.io/r/17731 "HP Compaq 8200 Elite SFF PC" (x86_32) using payload SeaBIOS : SUCCESS : https://lava.9esec.io/r/17730
Please note: This test is under development and might not be accurate at all!