Mark Wielaard reported the following issue "GCC now diagnoses inline assembly that clobbers register r2. This has always been invalid code, and is no longer quietly tolerated." in redhat bug: https://bugzilla.redhat.com/show_bug.cgi?id=1424367
Created attachment 104133 [details] On ppc64*, the TOC ptr should not be considered a scratch register Will Schmidt created the attached patch to address the issue. His fix description is as follows: "On ppc64*, the TOC ptr should not be considered a scratch register, and should not be in the clobber list. This is called out in newer GCC (i.e. gcc7) and triggers an error. Thusly, remove R2 from the clobber list."
Mark Wielaard tested the patch, as reported on the RH bugzilla: That patch fixes things. All arches build now.
I tested and applied Will's patch to Valgrind mainline valgrind commit 16254.
*** Bug 371668 has been marked as a duplicate of this bug. ***