From 85af58487290a46e7252504f2af808ad3c99d5d4 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Sun, 13 Mar 2016 13:21:31 -0700 Subject: [PATCH] Unbreak powerpc-unknown-linux-uclibc. There is invalid assembly in dmalloc for PowerPC. The issue is that 'stw' expects a memory operand, and =g constraint allows both registers and memory. Newer GCC tends to choose register even at -O0, resulting in invalid assembly. Instead, force a register constraint in 'mflr' and let GCC decide if it wants to store it into memory at all. Reported this upstream. Signed-off-by: Alexey Neyman --- patches/dmalloc/5.5.2/170-ppc-bogus-assembly.patch | 13 +++++++++++++ samples/powerpc-unknown-linux-uclibc/broken | 0 2 files changed, 13 insertions(+) create mode 100644 patches/dmalloc/5.5.2/170-ppc-bogus-assembly.patch delete mode 100644 samples/powerpc-unknown-linux-uclibc/broken diff --git a/patches/dmalloc/5.5.2/170-ppc-bogus-assembly.patch b/patches/dmalloc/5.5.2/170-ppc-bogus-assembly.patch new file mode 100644 index 00000000..d92bd8aa --- /dev/null +++ b/patches/dmalloc/5.5.2/170-ppc-bogus-assembly.patch @@ -0,0 +1,13 @@ +diff -ur dmalloc-5.5.2.orig/return.h dmalloc-5.5.2/return.h +--- dmalloc-5.5.2.orig/return.h 2016-03-13 13:11:48.090431764 -0700 ++++ dmalloc-5.5.2/return.h 2016-03-13 13:12:11.246642618 -0700 +@@ -251,8 +251,7 @@ + + #define GET_RET_ADDR(file) \ + do { \ +- asm("mflr 0"); \ +- asm("stw 0,%0" : "=g" (file)); \ ++ asm("mflr %0" : "=r"(file)); \ + } while(0) + + #endif /* __powerpc__ && __GNUC__ && !__OPTIMIZE__ */ diff --git a/samples/powerpc-unknown-linux-uclibc/broken b/samples/powerpc-unknown-linux-uclibc/broken deleted file mode 100644 index e69de29b..00000000