summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-7.1/0044-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-04-14 18:10:45 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-06-14 10:23:27 +0100
commit70f1fd06439fc0d340639cfe1e90ba8f4d9298fa (patch)
treeca86b04f28a6703d0c170e0223f551678b45cb71 /meta/recipes-devtools/gcc/gcc-7.1/0044-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch
parent89c12fc8de6b80e0e9add7f012553eb4e38dac7f (diff)
downloadpoky-70f1fd06439fc0d340639cfe1e90ba8f4d9298fa.tar.gz
gcc: Add recipes for gcc-7
Switch default compiler to gcc 7 (From OE-Core rev: 03bb12008891cf1a023aaddb6547da6d41d0cab0) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-7.1/0044-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch')
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.1/0044-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch123
1 files changed, 123 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-7.1/0044-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch b/meta/recipes-devtools/gcc/gcc-7.1/0044-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch
new file mode 100644
index 0000000000..522928bfbc
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-7.1/0044-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch
@@ -0,0 +1,123 @@
1From 847aec764540636ec654fd7a012e271afa8d4e0f Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 29 Apr 2016 20:03:28 +0000
4Subject: [PATCH 44/47] libgcc: Add knob to use ldbl-128 on ppc
5
6musl does not support ldbl 128 so we can not assume
7that linux as a whole supports ldbl-128 bits, instead
8act upon configure option passed to gcc and assume no
9on musl and yes otherwise if no option is passed since
10default behaviour is to assume ldbl128 it does not
11change the defaults
12
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 libgcc/Makefile.in | 1 +
16 libgcc/config/rs6000/t-linux | 5 ++++-
17 libgcc/configure | 18 ++++++++++++++++++
18 libgcc/configure.ac | 12 ++++++++++++
19 4 files changed, 35 insertions(+), 1 deletion(-)
20 mode change 100644 => 100755 libgcc/configure
21
22diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in
23index a1a392de88d..2fe6889a342 100644
24--- a/libgcc/Makefile.in
25+++ b/libgcc/Makefile.in
26@@ -48,6 +48,7 @@ unwind_header = @unwind_header@
27 md_unwind_header = @md_unwind_header@
28 sfp_machine_header = @sfp_machine_header@
29 thread_header = @thread_header@
30+with_ldbl128 = @with_ldbl128@
31
32 host_noncanonical = @host_noncanonical@
33 real_host_noncanonical = @real_host_noncanonical@
34diff --git a/libgcc/config/rs6000/t-linux b/libgcc/config/rs6000/t-linux
35index 4f6d4c4a4d2..c50dd94a2da 100644
36--- a/libgcc/config/rs6000/t-linux
37+++ b/libgcc/config/rs6000/t-linux
38@@ -1,3 +1,6 @@
39 SHLIB_MAPFILES += $(srcdir)/config/rs6000/libgcc-glibc.ver
40
41-HOST_LIBGCC2_CFLAGS += -mlong-double-128 -mno-minimal-toc
42+ifeq ($(with_ldbl128),yes)
43+HOST_LIBGCC2_CFLAGS += -mlong-double-128
44+endif
45+HOST_LIBGCC2_CFLAGS += -mno-minimal-toc
46diff --git a/libgcc/configure b/libgcc/configure
47old mode 100644
48new mode 100755
49index 45c459788c3..e2d19b144b8
50--- a/libgcc/configure
51+++ b/libgcc/configure
52@@ -618,6 +618,7 @@ build_vendor
53 build_cpu
54 build
55 with_aix_soname
56+with_ldbl128
57 enable_vtable_verify
58 enable_shared
59 libgcc_topdir
60@@ -667,6 +668,7 @@ with_cross_host
61 with_ld
62 enable_shared
63 enable_vtable_verify
64+with_long_double_128
65 with_aix_soname
66 enable_version_specific_runtime_libs
67 with_slibdir
68@@ -1324,6 +1326,7 @@ Optional Packages:
69 --with-target-subdir=SUBDIR Configuring in a subdirectory for target
70 --with-cross-host=HOST Configuring with a cross compiler
71 --with-ld arrange to use the specified ld (full pathname)
72+ --with-long-double-128 use 128-bit long double by default
73 --with-aix-soname=aix|svr4|both
74 shared library versioning (aka "SONAME") variant to
75 provide on AIX
76@@ -2208,6 +2211,21 @@ fi
77
78
79
80+# Check whether --with-long-double-128 was given.
81+if test "${with_long_double_128+set}" = set; then :
82+ withval=$with_long_double_128; with_ldbl128="$with_long_double_128"
83+else
84+ case "${host}" in
85+ power*-*-musl*)
86+ with_ldbl128="no";;
87+ *) with_ldbl128="yes";;
88+ esac
89+
90+fi
91+
92+
93+
94+
95 # Check whether --with-aix-soname was given.
96 if test "${with_aix_soname+set}" = set; then :
97 withval=$with_aix_soname; case "${host}:${enable_shared}" in
98diff --git a/libgcc/configure.ac b/libgcc/configure.ac
99index af151473709..dada52416da 100644
100--- a/libgcc/configure.ac
101+++ b/libgcc/configure.ac
102@@ -77,6 +77,18 @@ AC_ARG_ENABLE(vtable-verify,
103 [enable_vtable_verify=no])
104 AC_SUBST(enable_vtable_verify)
105
106+AC_ARG_WITH(long-double-128,
107+[AS_HELP_STRING([--with-long-double-128],
108+ [use 128-bit long double by default])],
109+ with_ldbl128="$with_long_double_128",
110+[case "${host}" in
111+ power*-*-musl*)
112+ with_ldbl128="no";;
113+ *) with_ldbl128="yes";;
114+ esac
115+])
116+AC_SUBST(with_ldbl128)
117+
118 AC_ARG_WITH(aix-soname,
119 [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
120 [shared library versioning (aka "SONAME") variant to provide on AIX])],
121--
1222.12.2
123