Skip to contentSkip to conversation

build: Add soft-float handling for SuperH (sh4)

PATCH In review John Paul Adrian Glaubitz 2 participants 2 messages Mar 4, 2020 – Mar 5, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 build: Add soft-float handling for SuperH (sh4)

While GRUB has no platform support for SuperH (sh4) yet, this change adds the target-specific handling of soft-floats such that the GRUB utilities can be built on this target.

---
 configure.ac | 5 +++++
 1 file changed, 5 insertions(+)
configure.ac +5 -0
index f19489418..4766f4190 100644
@@ -854,6 +854,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
+    if test "x$target_cpu" = xsh4; then
+       CFLAGS="$TARGET_CFLAGS -m4-nofpu -Werror"
+       AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+		         [grub_cv_target_cc_soft_float="-m4-nofpu"], [])
+    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
Signature · 1 line
2.25.1