blob: 38eab5a083f7a2ce8feaa0d0e681daa344ea152d [file] [log] [blame]
Brad Bishop79641f22019-09-10 07:20:22 -04001From 47467f3ab0fb2f2fcede81060fe8bb339d0909eb Mon Sep 17 00:00:00 2001
2From: Szabolcs Nagy <nsz@port70.net>
3Date: Wed, 28 Feb 2018 00:54:05 +0000
4Subject: [PATCH 10/12] ldbl128 config
Brad Bishopc342db32019-05-15 21:57:59 -04005
6Upstream-Status: Pending
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
Brad Bishop79641f22019-09-10 07:20:22 -040010 gcc/configure | 13 +++++++++++++
11 gcc/configure.ac | 16 ++++++++++++++--
12 2 files changed, 27 insertions(+), 2 deletions(-)
Brad Bishopc342db32019-05-15 21:57:59 -040013
Brad Bishop79641f22019-09-10 07:20:22 -040014diff --git a/gcc/configure b/gcc/configure
15index 6121e163259..07ff8597d48 100755
16--- a/gcc/configure
17+++ b/gcc/configure
18@@ -29309,6 +29309,15 @@ if test "${with_long_double_128+set}" = set; then :
19 withval=$with_long_double_128; gcc_cv_target_ldbl128="$with_long_double_128"
20 else
Brad Bishopc342db32019-05-15 21:57:59 -040021
Brad Bishop79641f22019-09-10 07:20:22 -040022+ case "$target" in
23+ s390*-*-linux-musl*)
24+ gcc_cv_target_ldbl128=yes
25+ ;;
26+ powerpc*-*-linux-musl*)
27+ gcc_cv_target_ldbl128=no
28+ ;;
29+ *)
30+
31 if test $glibc_version_major -gt 2 \
32 || ( test $glibc_version_major -eq 2 && test $glibc_version_minor -ge 4 ); then :
33 gcc_cv_target_ldbl128=yes
34@@ -29320,6 +29329,10 @@ else
35 && gcc_cv_target_ldbl128=yes
Brad Bishopc342db32019-05-15 21:57:59 -040036
Brad Bishop79641f22019-09-10 07:20:22 -040037 fi
38+
39+ ;;
40+ esac
41+
42 fi
Brad Bishopc342db32019-05-15 21:57:59 -040043
Brad Bishop79641f22019-09-10 07:20:22 -040044 ;;
45diff --git a/gcc/configure.ac b/gcc/configure.ac
46index b066cc609e1..6c15ed898c0 100644
47--- a/gcc/configure.ac
48+++ b/gcc/configure.ac
49@@ -5971,13 +5971,25 @@ case "$target" in
50 AC_ARG_WITH(long-double-128,
51 [AS_HELP_STRING([--with-long-double-128],
52 [use 128-bit long double by default])],
53- gcc_cv_target_ldbl128="$with_long_double_128",
54+ gcc_cv_target_ldbl128="$with_long_double_128", [
55+ case "$target" in
56+ s390*-*-linux-musl*)
57+ gcc_cv_target_ldbl128=yes
58+ ;;
59+ powerpc*-*-linux-musl*)
60+ gcc_cv_target_ldbl128=no
61+ ;;
62+ *)]
63 [GCC_GLIBC_VERSION_GTE_IFELSE([2], [4], [gcc_cv_target_ldbl128=yes], [
64 [gcc_cv_target_ldbl128=no
65 grep '^[ ]*#[ ]*define[ ][ ]*__LONG_DOUBLE_MATH_OPTIONAL' \
66 $target_header_dir/bits/wordsize.h > /dev/null 2>&1 \
67 && gcc_cv_target_ldbl128=yes
68- ]])])
69+ ]])]
70+ [
71+ ;;
72+ esac
73+ ])
74 ;;
75 esac
76 if test x$gcc_cv_target_ldbl128 = xyes; then
Brad Bishopc342db32019-05-15 21:57:59 -040077--
Brad Bishop79641f22019-09-10 07:20:22 -0400782.17.1
Brad Bishopc342db32019-05-15 21:57:59 -040079