| Work around b/189992601: "SSE register cannot be used when SSE is disabled!" |
| |
| The combination of -Xclang -msoft-float and -Xclang -no-implicit-float |
| causes Clang to assert. Since GRUB doesn't use floats, not passing |
| -Xclang -msoft-float is a safe way to avoid this assert. |
| https://bugs.llvm.org/show_bug.cgi?id=48528 tracks fixing this on the |
| LLVM side, after which we won't need this patch anymore. |
| |
| diff --git a/grub-2.02.old/configure.ac b/grub-2.02/configure.ac |
| index edd1841..3ec8008 100644 |
| --- a/grub-2.02.old/configure.ac |
| +++ b/grub-2.02/configure.ac |
| @@ -811,9 +811,11 @@ if test x"$platform" != xemu ; then |
| AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], |
| [grub_cv_target_cc_soft_float="-mno-inline-float-divide -mno-inline-sqrt"], []) |
| fi |
| - for cand in "-msoft-float -Xclang -msoft-float -Xclang -no-implicit-float" \ |
| - "-Xclang -msoft-float -Xclang -no-implicit-float" \ |
| - "-Xclang -msoft-float" "-msoft-float"; do |
| + # b/189992601: "SSE register cannot be used when SSE is disabled!" |
| + # if we use -Xclang -msoft-float and -Xclang -no-implicit-float. |
| + # Since GRUB doesn't use any floating point, just -no-implicit-float |
| + # should be enough. |
| + for cand in "-Xclang -no-implicit-float"; do |
| if test x"$grub_cv_target_cc_soft_float" != xno ; then |
| break |
| fi |