diff mbox

PR libgcc/70363, fix __float128 problem with non ISA-3.0 assembler

Message ID 20160322203343.GA29277@ibm-tiger.the-meissners.org
State New
Headers show

Commit Message

Michael Meissner March 22, 2016, 8:33 p.m. UTC
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  <meissner@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.

Comments

David Edelsohn March 22, 2016, 8:51 p.m. UTC | #1
On Tue, Mar 22, 2016 at 4:33 PM, Michael Meissner
<meissner@linux.vnet.ibm.com> wrote:
> 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  <meissner@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.

Okay.

Thanks, David
diff mbox

Patch

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)
 {