0014-ldbl128-config.diff 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. diff --git a/gcc/configure b/gcc/configure
  2. index 043a62b0de9..cbb10aca436 100755
  3. --- a/gcc/configure
  4. +++ b/gcc/configure
  5. @@ -29054,6 +29054,15 @@ if test "${with_long_double_128+set}" = set; then :
  6. withval=$with_long_double_128; gcc_cv_target_ldbl128="$with_long_double_128"
  7. else
  8. + case "$target" in
  9. + s390*-*-linux-musl*)
  10. + gcc_cv_target_ldbl128=yes
  11. + ;;
  12. + powerpc*-*-linux-musl*)
  13. + gcc_cv_target_ldbl128=no
  14. + ;;
  15. + *)
  16. +
  17. if test $glibc_version_major -gt 2 \
  18. || ( test $glibc_version_major -eq 2 && test $glibc_version_minor -ge 4 ); then :
  19. gcc_cv_target_ldbl128=yes
  20. @@ -29065,6 +29074,10 @@ else
  21. && gcc_cv_target_ldbl128=yes
  22. fi
  23. +
  24. + ;;
  25. + esac
  26. +
  27. fi
  28. ;;
  29. diff --git a/gcc/configure.ac b/gcc/configure.ac
  30. index 2b52da3bbcc..31154c73858 100644
  31. --- a/gcc/configure.ac
  32. +++ b/gcc/configure.ac
  33. @@ -5801,13 +5801,25 @@ case "$target" in
  34. AC_ARG_WITH(long-double-128,
  35. [AS_HELP_STRING([--with-long-double-128],
  36. [use 128-bit long double by default])],
  37. - gcc_cv_target_ldbl128="$with_long_double_128",
  38. + gcc_cv_target_ldbl128="$with_long_double_128", [
  39. + case "$target" in
  40. + s390*-*-linux-musl*)
  41. + gcc_cv_target_ldbl128=yes
  42. + ;;
  43. + powerpc*-*-linux-musl*)
  44. + gcc_cv_target_ldbl128=no
  45. + ;;
  46. + *)]
  47. [GCC_GLIBC_VERSION_GTE_IFELSE([2], [4], [gcc_cv_target_ldbl128=yes], [
  48. [gcc_cv_target_ldbl128=no
  49. grep '^[ ]*#[ ]*define[ ][ ]*__LONG_DOUBLE_MATH_OPTIONAL' \
  50. $target_header_dir/bits/wordsize.h > /dev/null 2>&1 \
  51. && gcc_cv_target_ldbl128=yes
  52. - ]])])
  53. + ]])]
  54. + [
  55. + ;;
  56. + esac
  57. + ])
  58. ;;
  59. esac
  60. if test x$gcc_cv_target_ldbl128 = xyes; then