about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorAdhemerval Zanella <azanella@linux.vnet.ibm.com>2015-01-23 11:31:49 -0500
committerAdhemerval Zanella <azanella@linux.vnet.ibm.com>2015-01-24 08:40:04 -0500
commitbea58013607c6507108bc73744a0bf63d735f259 (patch)
tree2dd6cbb498ca7e569407030085920937801f5fe3 /sysdeps
parent0e87343e204b44468ffad0ec5dc8c8d6068f1227 (diff)
downloadglibc-bea58013607c6507108bc73744a0bf63d735f259.tar.gz
glibc-bea58013607c6507108bc73744a0bf63d735f259.tar.xz
glibc-bea58013607c6507108bc73744a0bf63d735f259.zip
powerpc: Fix powerpc64 build failure with binutils 2.22
GLIBC memset optimization for POWER8 uses the '.machine power8'
directive, which is only supported officially on binutils 2.24+.  This
causes a build failure on older binutils.

Since the requirement of .machine power8 is to correctly assembly the
'mtvsrd' instruction and it is already handled by the MTVSRD_V1_R4
macro, there is no really needed of using it.

The patch replaces the power8 with power7 for .machine directive.

It fixes BZ#17869.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/powerpc/powerpc64/power8/memset.S5
1 files changed, 4 insertions, 1 deletions
diff --git a/sysdeps/powerpc/powerpc64/power8/memset.S b/sysdeps/powerpc/powerpc64/power8/memset.S
index 4596926709..eaff0e6b81 100644
--- a/sysdeps/powerpc/powerpc64/power8/memset.S
+++ b/sysdeps/powerpc/powerpc64/power8/memset.S
@@ -23,7 +23,10 @@
 /* __ptr_t [r3] memset (__ptr_t s [r3], int c [r4], size_t n [r5]));
    Returns 's'.  */
 
-	.machine power8
+	/* No need to use .machine power8 since mtvsrd is already
+	   handled by the define.  It avoid breakage on binutils
+	   that does not support this machine specifier.  */
+	.machine power7
 EALIGN (memset, 5, 0)
 	CALL_MCOUNT 3