0010-ldbl128-config.patch 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. From 62eb7906083601d6ede06af5155962db468ae12a Mon Sep 17 00:00:00 2001
  2. From: Szabolcs Nagy <nsz@port70.net>
  3. Date: Wed, 28 Feb 2018 00:54:05 +0000
  4. Subject: [PATCH 10/13] ldbl128 config
  5. ---
  6. gcc/configure | 13 +++++++++++++
  7. gcc/configure.ac | 16 ++++++++++++++--
  8. 2 files changed, 27 insertions(+), 2 deletions(-)
  9. diff --git a/gcc/configure b/gcc/configure
  10. index 3dcf7752b7f..78aaa36dce6 100755
  11. --- a/gcc/configure
  12. +++ b/gcc/configure
  13. @@ -29356,6 +29356,15 @@ if test "${with_long_double_128+set}" = set; then :
  14. withval=$with_long_double_128; gcc_cv_target_ldbl128="$with_long_double_128"
  15. else
  16. + case "$target" in
  17. + s390*-*-linux-musl*)
  18. + gcc_cv_target_ldbl128=yes
  19. + ;;
  20. + powerpc*-*-linux-musl*)
  21. + gcc_cv_target_ldbl128=no
  22. + ;;
  23. + *)
  24. +
  25. if test $glibc_version_major -gt 2 \
  26. || ( test $glibc_version_major -eq 2 && test $glibc_version_minor -ge 4 ); then :
  27. gcc_cv_target_ldbl128=yes
  28. @@ -29367,6 +29376,10 @@ else
  29. && gcc_cv_target_ldbl128=yes
  30. fi
  31. +
  32. + ;;
  33. + esac
  34. +
  35. fi
  36. ;;
  37. diff --git a/gcc/configure.ac b/gcc/configure.ac
  38. index 51f520c1508..a6498239698 100644
  39. --- a/gcc/configure.ac
  40. +++ b/gcc/configure.ac
  41. @@ -6020,13 +6020,25 @@ case "$target" in
  42. AC_ARG_WITH(long-double-128,
  43. [AS_HELP_STRING([--with-long-double-128],
  44. [use 128-bit long double by default])],
  45. - gcc_cv_target_ldbl128="$with_long_double_128",
  46. + gcc_cv_target_ldbl128="$with_long_double_128", [
  47. + case "$target" in
  48. + s390*-*-linux-musl*)
  49. + gcc_cv_target_ldbl128=yes
  50. + ;;
  51. + powerpc*-*-linux-musl*)
  52. + gcc_cv_target_ldbl128=no
  53. + ;;
  54. + *)]
  55. [GCC_GLIBC_VERSION_GTE_IFELSE([2], [4], [gcc_cv_target_ldbl128=yes], [
  56. [gcc_cv_target_ldbl128=no
  57. grep '^[ ]*#[ ]*define[ ][ ]*__LONG_DOUBLE_MATH_OPTIONAL' \
  58. $target_header_dir/bits/wordsize.h > /dev/null 2>&1 \
  59. && gcc_cv_target_ldbl128=yes
  60. - ]])])
  61. + ]])]
  62. + [
  63. + ;;
  64. + esac
  65. + ])
  66. ;;
  67. esac
  68. if test x$gcc_cv_target_ldbl128 = xyes; then
  69. --
  70. 2.21.0