This patch fixes PR libgcc/70363, which is a configuration issue if you build
GCC 6.x with an assembler that does not support the ISA 3.0 instructions.  I
missed one emulation function that needed to be a different name if the IFUNC
functions added for ISA 3.0 support are not being built.

I built a trunk compiler with a stock assembler, and did a program with a
convert from __float128 to long double/__ibm128.  If I did not include the
patch, the linker reported:

        -genoa-> ~/fsf-install-ppc64le/trunk-at9x/bin/gcc -O2 test-float128-6.c 
-DDEBUG && a.out
        /tmp/ccbCLWdO.o: In function `print_hex.constprop.0':
        test-float128-6.c:(.text+0x84): undefined reference to `__extendkftf2'
        collect2: error: ld returned 1 exit status

If built a compiler with the patch, it succeeds.  Is this patch ok to install
in the trunk?

2016-03-22  Michael Meissner  <meiss...@linux.vnet.ibm.com>

        PR libgcc/70363
        * config/rs6000/extendkftf2-sw.c (__extendkftf2_sw): If libgcc was
        built with an assembler that does not support ISA 3.0
        instructions, rename __extendkftf2_sw to __extendkftf2.

-- 
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meiss...@linux.vnet.ibm.com, phone: +1 (978) 899-4797
Index: libgcc/config/rs6000/extendkftf2-sw.c
===================================================================
--- libgcc/config/rs6000/extendkftf2-sw.c       (revision 234405)
+++ libgcc/config/rs6000/extendkftf2-sw.c       (working copy)
@@ -39,6 +39,10 @@
 #include "soft-fp.h"
 #include "quad-float128.h"
 
+#ifndef FLOAT128_HW_INSNS
+#define __extendkftf2_sw __extendkftf2
+#endif
+
 IBM128_TYPE
 __extendkftf2_sw (__float128 value)
 {

Reply via email to