Description: __float128 is not available on all architectures
 .
 cbmc (5.12-1) unstable; urgency=low
 .
   * New upstream release
   * Updated Standards version to 4.5.0.1 (no changes required)
   * Acknowledge NMU - thanks Adrian for the build fix (Closes: #952256)
Author: Michael Tautschnig <mt@debian.org>
Bug-Debian: https://bugs.debian.org/952256

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: 2020-04-29

--- cbmc-5.12.orig/regression/cbmc/ts18661_typedefs/main.c
+++ cbmc-5.12/regression/cbmc/ts18661_typedefs/main.c
@@ -19,7 +19,11 @@
 #    endif
 
 #    if __GNUC_PREREQ(4, FLOAT128_MINOR_VERSION)
-#      define HAS_FLOAT128
+// https://gcc.gnu.org/onlinedocs/gcc/Floating-Types.html
+#      if defined(__i386__) || defined(__x86_64__) || defined(__ia64__) || \
+          defined(__hppa__) || defined(__powerpc__)
+#        define HAS_FLOAT128
+#      endif
 #    endif
 
 #  endif
--- cbmc-5.12.orig/regression/ansi-c/gcc_version1/gcc-5.c
+++ cbmc-5.12/regression/ansi-c/gcc_version1/gcc-5.c
@@ -9,5 +9,9 @@ typedef long double _Float128;
 typedef long double _Float128x;
 
 // But this type should:
+// https://gcc.gnu.org/onlinedocs/gcc/Floating-Types.html
+#if defined(__i386__) || defined(__x86_64__) || defined(__ia64__) || \
+    defined(__hppa__) || defined(__powerpc__)
 __float128 f128;
+#endif
 #endif
--- cbmc-5.12.orig/regression/ansi-c/gcc_version1/gcc-7.c
+++ cbmc-5.12/regression/ansi-c/gcc_version1/gcc-7.c
@@ -8,5 +8,9 @@ _Float64x f64x;
 _Float128 f128;
 _Float128x f128x;
 
+// https://gcc.gnu.org/onlinedocs/gcc/Floating-Types.html
+#if defined(__i386__) || defined(__x86_64__) || defined(__ia64__) || \
+    defined(__hppa__) || defined(__powerpc__)
 __float128 gcc_f128;
+#endif
 #endif
--- cbmc-5.12.orig/src/cpp/cpp_internal_additions.cpp
+++ cbmc-5.12/src/cpp/cpp_internal_additions.cpp
@@ -111,9 +111,8 @@ void cpp_internal_additions(std::ostream
 
     if(
       config.ansi_c.arch == "i386" || config.ansi_c.arch == "x86_64" ||
-      config.ansi_c.arch == "x32" || config.ansi_c.arch == "powerpc" ||
-      config.ansi_c.arch == "ppc64" || config.ansi_c.arch == "ppc64le" ||
-      config.ansi_c.arch == "ia64")
+      config.ansi_c.arch == "x32" || config.ansi_c.arch == "ia64" ||
+      config.ansi_c.arch == "powerpc" || config.ansi_c.arch == "ppc64")
     {
       // https://gcc.gnu.org/onlinedocs/gcc/Floating-Types.html
       // For clang, __float128 is a keyword.
@@ -131,6 +130,12 @@ void cpp_internal_additions(std::ostream
       if(config.ansi_c.mode != configt::ansi_ct::flavourt::CLANG)
         out << "typedef long double __float128;" << '\n';
     }
+    else if(config.ansi_c.arch == "ppc64le")
+    {
+      // https://patchwork.ozlabs.org/patch/792295/
+      if(config.ansi_c.mode != configt::ansi_ct::flavourt::CLANG)
+        out << "typedef " CPROVER_PREFIX "Float128 __ieee128;\n";
+    }
 
     if(
       config.ansi_c.arch == "i386" || config.ansi_c.arch == "x86_64" ||
