3.12.0-5 Resolve FTBS on ppc64[le] with GCC7.

- Add valgrind-3.12.0-ppc64-r2.patch (#1424367)
This commit is contained in:
Mark Wielaard 2017-02-17 21:47:00 +01:00
parent b2d103673e
commit bfca72b7fc
2 changed files with 62 additions and 1 deletions

View File

@ -0,0 +1,52 @@
On ppc64*, R2 is the TOC pointer, should not be considered a
scratch register, and thus should not be in the clobber list.
This is called out in newer GCC releases and triggers a
compile time error.
Thusly, remove R2 from the clobber list.
diff --git a/coregrind/m_debuglog.c b/coregrind/m_debuglog.c
index dc6e26d..be77680 100644
--- a/coregrind/m_debuglog.c
+++ b/coregrind/m_debuglog.c
@@ -215,7 +215,7 @@ static UInt local_sys_write_stderr ( const HChar* buf, Int n )
:
: "b" (block)
: "cc","memory","cr0","ctr",
- "r0","r2","r3","r4","r5","r6","r7","r8","r9","r10","r11","r12"
+ "r0","r3","r4","r5","r6","r7","r8","r9","r10","r11","r12"
);
if (block[0] < 0)
block[0] = -1;
@@ -231,7 +231,7 @@ static UInt local_sys_getpid ( void )
: "=&r" (__res)
: "i" (__NR_getpid)
: "cc","memory","cr0","ctr",
- "r0","r2","r4","r5","r6","r7","r8","r9","r10","r11","r12"
+ "r0","r4","r5","r6","r7","r8","r9","r10","r11","r12"
);
return (UInt)__res;
}
diff --git a/include/valgrind.h b/include/valgrind.h
index 6892007..d2e7c38 100644
--- a/include/valgrind.h
+++ b/include/valgrind.h
@@ -2708,7 +2708,7 @@ typedef
#define __CALLER_SAVED_REGS \
"lr", "ctr", "xer", \
"cr0", "cr1", "cr2", "cr3", "cr4", "cr5", "cr6", "cr7", \
- "r0", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", \
+ "r0", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", \
"r11", "r12", "r13"
/* Macros to save and align the stack before making a function
@@ -3264,7 +3264,7 @@ typedef
#define __CALLER_SAVED_REGS \
"lr", "ctr", "xer", \
"cr0", "cr1", "cr2", "cr3", "cr4", "cr5", "cr6", "cr7", \
- "r0", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", \
+ "r0", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", \
"r11", "r12", "r13"
/* Macros to save and align the stack before making a function

View File

@ -3,7 +3,7 @@
Summary: Tool for finding memory management bugs in programs
Name: %{?scl_prefix}valgrind
Version: 3.12.0
Release: 4%{?dist}
Release: 5%{?dist}
Epoch: 1
License: GPLv2+
URL: http://www.valgrind.org/
@ -76,6 +76,11 @@ Patch4: valgrind-3.12.0-skip-cond-var.patch
# Cleanup none/tests/nocwd.vgtest tmp dirs.
Patch5: valgrind-3.12.0-nocwd-cleanup.patch
# RHBZ#1424367
# GCC7 now diagnoses inline assembly that clobbers register r2.
# This has always been invalid code, and is no longer quietly tolerated.
Patch6: valgrind-3.12.0-ppc64-r2.patch
%if %{build_multilib}
# Ensure glibc{,-devel} is installed for both multilib arches
BuildRequires: /lib/libc.so.6 /usr/lib/libc.so /lib64/libc.so.6 /usr/lib64/libc.so
@ -190,6 +195,7 @@ Valgrind User Manual for details.
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%build
# We need to use the software collection compiler and binutils if available.
@ -383,6 +389,9 @@ echo ===============END TESTING===============
%endif
%changelog
* Fri Feb 17 2017 Mark Wielaard <mjw@redhat.com> - 3.12.0-5
- Add valgrind-3.12.0-ppc64-r2.patch (#1424367)
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.12.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild