]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
build: Add soft-float handling for SuperH (sh4)
authorJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Wed, 4 Mar 2020 13:31:34 +0000 (14:31 +0100)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 10 Mar 2020 20:43:56 +0000 (21:43 +0100)
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.

Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
configure.ac

index f1948941830e269a1c352d86046ced85898e4bfc..4766f41903a7d001e75ad9b71cdff2646e455cdd 100644 (file)
@@ -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