0009-riscv32-Target-and-subtarget-detection.patch 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. From 0922e3b87460a5601fb957f3c06fcd18db9f71d2 Mon Sep 17 00:00:00 2001
  2. From: Stefan O'Rear <sorear@fastmail.com>
  3. Date: Thu, 3 Sep 2020 05:26:50 -0400
  4. Subject: [PATCH 09/15] riscv32: Target and subtarget detection
  5. ---
  6. configure | 3 ++-
  7. 1 file changed, 2 insertions(+), 1 deletion(-)
  8. diff --git a/configure b/configure
  9. index acbfa8f2..2e217c7e 100755
  10. --- a/configure
  11. +++ b/configure
  12. @@ -336,6 +336,7 @@ or1k*) ARCH=or1k ;;
  13. powerpc64*|ppc64*) ARCH=powerpc64 ;;
  14. powerpc*|ppc*) ARCH=powerpc ;;
  15. riscv64*) ARCH=riscv64 ;;
  16. +riscv32*) ARCH=riscv32 ;;
  17. sh[1-9bel-]*|sh|superh*) ARCH=sh ;;
  18. s390x*) ARCH=s390x ;;
  19. unknown) fail "$0: unable to detect target arch; try $0 --target=..." ;;
  20. @@ -696,7 +697,7 @@ trycppif __LITTLE_ENDIAN__ "$t" && SUBARCH=${SUBARCH}le
  21. trycppif _SOFT_FLOAT "$t" && fail "$0: error: soft-float not supported on powerpc64"
  22. fi
  23. -if test "$ARCH" = "riscv64" ; then
  24. +if test "$ARCH" = "riscv64" -o "$ARCH" = "riscv32" ; then
  25. trycppif __riscv_float_abi_soft "$t" && SUBARCH=${SUBARCH}-sf
  26. trycppif __riscv_float_abi_single "$t" && SUBARCH=${SUBARCH}-sp
  27. fi
  28. --
  29. 2.28.0