In addition to the previous patch to aid in transitioning the PowerPC long double format to IEEE 128-bit, I have some additional patches that are needed. The previous patch is: https://gcc.gnu.org/ml/gcc-patches/2018-06/msg00634.html
This patch prevents re-running the ibm128 and ieee128 initialization functions when the compiler was handling the clone and target attributes/pragmas. In particular, the compiler would issue an internal compiler error or segfault when the complex multiply/divide built-in functions were re-defined. Note, the GLIBC library that I used is not fully converted. I'm ignoring the issues that are due to the library, and just focusing on the compiler support. I have done separate bootstraps on a little endian power8 system with the long double type set to IBM extended and IEEE 128-bit extended. There were no regressions in using this patch. Can I check it in, and eventually back port it to GCC 8.2 with the other long double transition patches. 2018-06-13 Michael Meissner <meiss...@linux.ibm.com> * config/rs6000/rs6000.c (rs6000_init_libfuncs): Do not re-run the initialization during clone or target pragma/attribute processing. -- Michael Meissner, IBM IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA email: meiss...@linux.ibm.com, phone: +1 (978) 899-4797
Index: gcc/config/rs6000/rs6000.c =================================================================== --- gcc/config/rs6000/rs6000.c (revision 261512) +++ gcc/config/rs6000/rs6000.c (working copy) @@ -18000,6 +18000,13 @@ init_float128_ieee (machine_mode mode) static void rs6000_init_libfuncs (void) { + static bool done_init = false; + + if (done_init) + return; + + done_init = true; + /* __float128 support. */ if (TARGET_FLOAT128_TYPE) {