0007-libgcc-Add-knob-to-use-ldbl-128-on-ppc.diff 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in
  2. index f09b39b..296cf0f 100644
  3. --- a/libgcc/Makefile.in
  4. +++ b/libgcc/Makefile.in
  5. @@ -43,6 +43,7 @@ enable_vtable_verify = @enable_vtable_verify@
  6. enable_decimal_float = @enable_decimal_float@
  7. fixed_point = @fixed_point@
  8. with_aix_soname = @with_aix_soname@
  9. +with_ldbl128 = @with_ldbl128@
  10. host_noncanonical = @host_noncanonical@
  11. real_host_noncanonical = @real_host_noncanonical@
  12. diff --git a/libgcc/config/rs6000/t-linux b/libgcc/config/rs6000/t-linux
  13. index 4f6d4c4..c50dd94 100644
  14. --- a/libgcc/config/rs6000/t-linux
  15. +++ b/libgcc/config/rs6000/t-linux
  16. @@ -1,3 +1,6 @@
  17. SHLIB_MAPFILES += $(srcdir)/config/rs6000/libgcc-glibc.ver
  18. -HOST_LIBGCC2_CFLAGS += -mlong-double-128 -mno-minimal-toc
  19. +ifeq ($(with_ldbl128),yes)
  20. +HOST_LIBGCC2_CFLAGS += -mlong-double-128
  21. +endif
  22. +HOST_LIBGCC2_CFLAGS += -mno-minimal-toc
  23. diff --git a/libgcc/configure b/libgcc/configure
  24. old mode 100644
  25. new mode 100755
  26. index e7d6c75..e9a9019
  27. --- a/libgcc/configure
  28. +++ b/libgcc/configure
  29. @@ -614,6 +614,7 @@ build_vendor
  30. build_cpu
  31. build
  32. with_aix_soname
  33. +with_ldbl128
  34. enable_vtable_verify
  35. enable_shared
  36. libgcc_topdir
  37. @@ -663,6 +664,7 @@ with_cross_host
  38. with_ld
  39. enable_shared
  40. enable_vtable_verify
  41. +with_long_double_128
  42. with_aix_soname
  43. enable_version_specific_runtime_libs
  44. with_slibdir
  45. @@ -1319,6 +1321,7 @@ Optional Packages:
  46. --with-target-subdir=SUBDIR Configuring in a subdirectory for target
  47. --with-cross-host=HOST Configuring with a cross compiler
  48. --with-ld arrange to use the specified ld (full pathname)
  49. + --with-long-double-128 use 128-bit long double by default
  50. --with-aix-soname=aix|svr4|both
  51. shared library versioning (aka "SONAME") variant to
  52. provide on AIX
  53. @@ -2201,6 +2204,21 @@ fi
  54. +# Check whether --with-long-double-128 was given.
  55. +if test "${with_long_double_128+set}" = set; then :
  56. + withval=$with_long_double_128; with_ldbl128="$with_long_double_128"
  57. +else
  58. + case "${host}" in
  59. + power*-*-musl*)
  60. + with_ldbl128="no";;
  61. + *) with_ldbl128="yes";;
  62. + esac
  63. +
  64. +fi
  65. +
  66. +
  67. +
  68. +
  69. # Check whether --with-aix-soname was given.
  70. if test "${with_aix_soname+set}" = set; then :
  71. withval=$with_aix_soname; case "${host}:${enable_shared}" in
  72. diff --git a/libgcc/configure.ac b/libgcc/configure.ac
  73. index 269997f..81dc3ba 100644
  74. --- a/libgcc/configure.ac
  75. +++ b/libgcc/configure.ac
  76. @@ -77,6 +77,18 @@ AC_ARG_ENABLE(vtable-verify,
  77. [enable_vtable_verify=no])
  78. AC_SUBST(enable_vtable_verify)
  79. +AC_ARG_WITH(long-double-128,
  80. +[AS_HELP_STRING([--with-long-double-128],
  81. + [use 128-bit long double by default])],
  82. + with_ldbl128="$with_long_double_128",
  83. +[case "${host}" in
  84. + power*-*-musl*)
  85. + with_ldbl128="no";;
  86. + *) with_ldbl128="yes";;
  87. + esac
  88. +])
  89. +AC_SUBST(with_ldbl128)
  90. +
  91. AC_ARG_WITH(aix-soname,
  92. [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
  93. [shared library versioning (aka "SONAME") variant to provide on AIX])],