From 18c6c09d2db7d81b8256387055dda06c69824c69366ea3dea63089e2fb2d5b5c Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Mon, 13 Jan 2014 17:13:15 +0000 Subject: [PATCH] Accepting request 213760 from home:michel_mno:branches:devel:tools - add support of ppc64le architecture - added patches: * valgrind-3.9.0-merge.patches.from.Paul.McKenney.patch * valgrind-3.9.0-ppc64le-abiv2.patch - This is a request for devel:tools project but will need also to enable openSUSE:Factory:PowerPC ppc64le build. OBS-URL: https://build.opensuse.org/request/show/213760 OBS-URL: https://build.opensuse.org/package/show/devel:tools/valgrind?expand=0&rev=100 --- ...9.0-merge.patches.from.Paul.McKenney.patch | 3794 +++++++++++++++++ valgrind-3.9.0-ppc64le-abiv2.patch | 438 ++ valgrind.changes | 8 + valgrind.spec | 9 +- 4 files changed, 4248 insertions(+), 1 deletion(-) create mode 100644 valgrind-3.9.0-merge.patches.from.Paul.McKenney.patch create mode 100644 valgrind-3.9.0-ppc64le-abiv2.patch diff --git a/valgrind-3.9.0-merge.patches.from.Paul.McKenney.patch b/valgrind-3.9.0-merge.patches.from.Paul.McKenney.patch new file mode 100644 index 0000000..a39bf3a --- /dev/null +++ b/valgrind-3.9.0-merge.patches.from.Paul.McKenney.patch @@ -0,0 +1,3794 @@ +From f0d5284af2266d4c59c7dd271d6c6b0e43a02a3d Mon Sep 17 00:00:00 2001 +From: Michel Normand +Date: Thu, 7 Nov 2013 15:34:33 +0100 +Subject: [PATCH] valgrind ppc64le big patch + +This is a merge of all the ppc64le patches from Paul McKeeney work +on git://kernel.stglabs.ibm.com/~paulmck/valgrind-3.8.1 +between git commits: 87940d2 ... f41cbb5 + +And then adapted on later valgrind version 3.9.0 in fedpkg env + +TODO: would need to split in subsets when will have to discuss with upstream. + +--- + Makefile.all.am | 25 ++++++++------ + Makefile.in | 4 ++ + Makefile.tool.am | 11 ++++++ + Makefile.vex.in | 4 ++ + VEX/priv/guest_ppc_toIR.c | 35 +++++++++++-------- + VEX/priv/host_ppc_defs.c | 18 ++++++++-- + auxprogs/Makefile.in | 4 ++ + cachegrind/Makefile.in | 15 ++++++++ + cachegrind/cg_arch.c | 2 - + cachegrind/cg_branchpred.c | 4 +- + cachegrind/tests/Makefile.in | 4 ++ + cachegrind/tests/x86/Makefile.in | 4 ++ + callgrind/Makefile.in | 15 ++++++++ + callgrind/tests/Makefile.in | 4 ++ + config.guess | 3 + + configure | 50 ++++++++++++++++++++++++++++ + configure.ac | 22 ++++++++++++ + coregrind/Makefile.in | 4 ++ + coregrind/launcher-darwin.c | 11 +++--- + coregrind/launcher-linux.c | 7 +++ + coregrind/m_aspacemgr/aspacemgr-common.c | 4 +- + coregrind/m_cache.c | 2 - + coregrind/m_coredump/coredump-elf.c | 23 ++++++++++++ + coregrind/m_debugger.c | 2 - + coregrind/m_debuginfo/d3basics.c | 4 +- + coregrind/m_debuginfo/debuginfo.c | 12 +++--- + coregrind/m_debuginfo/priv_storage.h | 2 - + coregrind/m_debuginfo/readdwarf.c | 10 +++-- + coregrind/m_debuginfo/readelf.c | 17 +++++---- + coregrind/m_debuginfo/readmacho.c | 2 + + coregrind/m_debuginfo/storage.c | 2 - + coregrind/m_debuglog.c | 2 - + coregrind/m_dispatch/dispatch-ppc64-linux.S | 4 +- + coregrind/m_gdbserver/target.c | 2 - + coregrind/m_initimg/initimg-linux.c | 18 ++++++---- + coregrind/m_libcassert.c | 2 - + coregrind/m_libcfile.c | 27 ++++++++------- + coregrind/m_libcproc.c | 5 +- + coregrind/m_libcsetjmp.c | 4 +- + coregrind/m_machine.c | 23 ++++++------ + coregrind/m_main.c | 14 ++++--- + coregrind/m_redir.c | 2 - + coregrind/m_scheduler/scheduler.c | 4 +- + coregrind/m_sigframe/sigframe-ppc64-linux.c | 8 +++- + coregrind/m_signals.c | 4 +- + coregrind/m_stacktrace.c | 7 ++- + coregrind/m_syscall.c | 4 +- + coregrind/m_syswrap/priv_types_n_macros.h | 1 + coregrind/m_syswrap/syscall-ppc64-linux.S | 4 +- + coregrind/m_syswrap/syswrap-linux.c | 6 ++- + coregrind/m_syswrap/syswrap-main.c | 29 +++++++++++++--- + coregrind/m_syswrap/syswrap-ppc64-linux.c | 4 +- + coregrind/m_trampoline.S | 2 - + coregrind/m_translate.c | 12 +++--- + coregrind/m_ume/elf.c | 2 - + coregrind/m_ume/macho.c | 2 + + coregrind/m_vki.c | 3 + + coregrind/pub_core_aspacemgr.h | 1 + coregrind/pub_core_basics.h | 2 - + coregrind/pub_core_debuginfo.h | 2 - + coregrind/pub_core_machine.h | 11 ++++-- + coregrind/pub_core_mallocfree.h | 1 + coregrind/pub_core_threadstate.h | 2 - + coregrind/pub_core_trampoline.h | 2 - + coregrind/pub_core_transtab_asm.h | 4 +- + coregrind/vgdb.c | 10 ++--- + drd/Makefile.in | 15 ++++++++ + drd/drd_bitmap.h | 4 +- + drd/drd_load_store.c | 2 - + drd/tests/Makefile.in | 4 ++ + drd/tests/unit_bitmap.c | 3 + + exp-bbv/Makefile.in | 15 ++++++++ + exp-bbv/tests/Makefile.in | 4 ++ + exp-bbv/tests/amd64-linux/Makefile.in | 4 ++ + exp-bbv/tests/arm-linux/Makefile.in | 4 ++ + exp-bbv/tests/ppc32-linux/Makefile.in | 4 ++ + exp-bbv/tests/x86-linux/Makefile.in | 4 ++ + exp-bbv/tests/x86/Makefile.in | 4 ++ + exp-dhat/Makefile.in | 15 ++++++++ + exp-sgcheck/Makefile.in | 15 ++++++++ + exp-sgcheck/tests/Makefile.in | 4 ++ + gdbserver_tests/Makefile.in | 4 ++ + helgrind/Makefile.in | 15 ++++++++ + helgrind/tests/Makefile.in | 4 ++ + helgrind/tests/annotate_hbefore.c | 2 - + include/pub_tool_basics.h | 7 ++- + include/pub_tool_libcsetjmp.h | 2 - + include/pub_tool_machine.h | 2 - + include/pub_tool_vkiscnums_asm.h | 2 - + include/vki/vki-linux.h | 4 +- + lackey/Makefile.in | 15 ++++++++ + massif/Makefile.in | 15 ++++++++ + massif/tests/Makefile.in | 4 ++ + memcheck/Makefile.in | 15 ++++++++ + memcheck/mc_machine.c | 6 +-- + memcheck/tests/Makefile.in | 5 ++ + memcheck/tests/amd64-linux/Makefile.in | 4 ++ + memcheck/tests/amd64/Makefile.in | 4 ++ + memcheck/tests/atomic_incs.c | 8 ++-- + memcheck/tests/darwin/Makefile.in | 4 ++ + memcheck/tests/linux/Makefile.in | 6 ++- + memcheck/tests/ppc32/Makefile.in | 4 ++ + memcheck/tests/ppc64/Makefile.in | 4 ++ + memcheck/tests/s390x/Makefile.in | 4 ++ + memcheck/tests/unit_libcbase.c | 3 + + memcheck/tests/x86-linux/Makefile.in | 4 ++ + memcheck/tests/x86/Makefile.in | 4 ++ + mpi/Makefile.in | 4 ++ + none/Makefile.in | 15 ++++++++ + none/tests/Makefile.in | 7 +++ + none/tests/amd64/Makefile.in | 4 ++ + none/tests/arm/Makefile.in | 4 ++ + none/tests/darwin/Makefile.in | 4 ++ + none/tests/linux/Makefile.in | 4 ++ + none/tests/mips32/Makefile.in | 4 ++ + none/tests/ppc32/Makefile.in | 4 ++ + none/tests/ppc64/Makefile.in | 4 ++ + none/tests/s390x/Makefile.in | 4 ++ + none/tests/x86-linux/Makefile.in | 4 ++ + none/tests/x86/Makefile.in | 4 ++ + perf/Makefile.in | 4 ++ + tests/Makefile.in | 4 ++ + tests/arch_test.c | 4 ++ + 123 files changed, 713 insertions(+), 173 deletions(-) + +Index: valgrind-3.9.0/Makefile.all.am +=================================================================== +--- valgrind-3.9.0.orig/Makefile.all.am ++++ valgrind-3.9.0/Makefile.all.am +@@ -150,6 +150,10 @@ AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g + ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g ++ + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -208,14 +212,15 @@ if VGCONF_PLATVARIANT_IS_ANDROID + PRELOAD_LDFLAGS_COMMON_LINUX += -nostdlib + endif + +-PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ +-PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ +-PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ +-PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ +-PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ +-PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 +-PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +-PRELOAD_LDFLAGS_S390X_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ +-PRELOAD_LDFLAGS_MIPS32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ +-PRELOAD_LDFLAGS_MIPS64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ ++PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ ++PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ ++PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 ++PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 ++PRELOAD_LDFLAGS_S390X_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_MIPS32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ ++PRELOAD_LDFLAGS_MIPS64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + +Index: valgrind-3.9.0/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/Makefile.in ++++ valgrind-3.9.0/Makefile.in +@@ -392,6 +392,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -440,6 +443,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +Index: valgrind-3.9.0/Makefile.tool.am +=================================================================== +--- valgrind-3.9.0.orig/Makefile.tool.am ++++ valgrind-3.9.0/Makefile.tool.am +@@ -49,6 +49,9 @@ TOOL_LDFLAGS_PPC32_LINUX = \ + TOOL_LDFLAGS_PPC64_LINUX = \ + $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + ++TOOL_LDFLAGS_PPC64LE_LINUX = \ ++ $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++ + TOOL_LDFLAGS_ARM_LINUX = \ + $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + +@@ -102,6 +105,9 @@ LIBREPLACEMALLOC_PPC32_LINUX = \ + LIBREPLACEMALLOC_PPC64_LINUX = \ + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc64-linux.a + ++LIBREPLACEMALLOC_PPC64LE_LINUX = \ ++ $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc64le-linux.a ++ + LIBREPLACEMALLOC_ARM_LINUX = \ + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-arm-linux.a + +@@ -140,6 +146,11 @@ LIBREPLACEMALLOC_LDFLAGS_PPC64_LINUX = \ + $(LIBREPLACEMALLOC_PPC64_LINUX) \ + -Wl,--no-whole-archive + ++LIBREPLACEMALLOC_LDFLAGS_PPC64LE_LINUX = \ ++ -Wl,--whole-archive \ ++ $(LIBREPLACEMALLOC_PPC64LE_LINUX) \ ++ -Wl,--no-whole-archive ++ + LIBREPLACEMALLOC_LDFLAGS_ARM_LINUX = \ + -Wl,--whole-archive \ + $(LIBREPLACEMALLOC_ARM_LINUX) \ +Index: valgrind-3.9.0/Makefile.vex.in +=================================================================== +--- valgrind-3.9.0.orig/Makefile.vex.in ++++ valgrind-3.9.0/Makefile.vex.in +@@ -454,6 +454,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -502,6 +505,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +Index: valgrind-3.9.0/VEX/priv/guest_ppc_toIR.c +=================================================================== +--- valgrind-3.9.0.orig/VEX/priv/guest_ppc_toIR.c ++++ valgrind-3.9.0/VEX/priv/guest_ppc_toIR.c +@@ -497,15 +497,22 @@ static ULong extend_s_32to64 ( UInt x ) + return (ULong)((((Long)x) << 32) >> 32); + } + +-/* Do a big-endian load of a 32-bit word, regardless of the endianness ++/* Do a proper-endian load of a 32-bit word, regardless of the endianness + of the underlying host. */ +-static UInt getUIntBigendianly ( UChar* p ) ++static UInt getUIntPPCendianly ( UChar* p ) + { + UInt w = 0; ++#if defined(VGP_ppc32_linux) || defined(VGP_ppc64_linux) + w = (w << 8) | p[0]; + w = (w << 8) | p[1]; + w = (w << 8) | p[2]; + w = (w << 8) | p[3]; ++#else ++ w = (w << 8) | p[3]; ++ w = (w << 8) | p[2]; ++ w = (w << 8) | p[1]; ++ w = (w << 8) | p[0]; ++#endif + return w; + } + +@@ -18511,7 +18518,7 @@ DisResult disInstr_PPC_WRK ( + /* At least this is simple on PPC32: insns are all 4 bytes long, and + 4-aligned. So just fish the whole thing out of memory right now + and have done. */ +- theInstr = getUIntBigendianly( (UChar*)(&guest_code[delta]) ); ++ theInstr = getUIntPPCendianly( (UChar*)(&guest_code[delta]) ); + + if (0) vex_printf("insn: 0x%x\n", theInstr); + +@@ -18536,12 +18543,12 @@ DisResult disInstr_PPC_WRK ( + UInt word2 = mode64 ? 0x78006800 : 0x54006800; + UInt word3 = mode64 ? 0x7800E802 : 0x5400E800; + UInt word4 = mode64 ? 0x78009802 : 0x54009800; +- if (getUIntBigendianly(code+ 0) == word1 && +- getUIntBigendianly(code+ 4) == word2 && +- getUIntBigendianly(code+ 8) == word3 && +- getUIntBigendianly(code+12) == word4) { ++ if (getUIntPPCendianly(code+ 0) == word1 && ++ getUIntPPCendianly(code+ 4) == word2 && ++ getUIntPPCendianly(code+ 8) == word3 && ++ getUIntPPCendianly(code+12) == word4) { + /* Got a "Special" instruction preamble. Which one is it? */ +- if (getUIntBigendianly(code+16) == 0x7C210B78 /* or 1,1,1 */) { ++ if (getUIntPPCendianly(code+16) == 0x7C210B78 /* or 1,1,1 */) { + /* %R3 = client_request ( %R4 ) */ + DIP("r3 = client_request ( %%r4 )\n"); + delta += 20; +@@ -18551,7 +18558,7 @@ DisResult disInstr_PPC_WRK ( + goto decode_success; + } + else +- if (getUIntBigendianly(code+16) == 0x7C421378 /* or 2,2,2 */) { ++ if (getUIntPPCendianly(code+16) == 0x7C421378 /* or 2,2,2 */) { + /* %R3 = guest_NRADDR */ + DIP("r3 = guest_NRADDR\n"); + delta += 20; +@@ -18560,7 +18567,7 @@ DisResult disInstr_PPC_WRK ( + goto decode_success; + } + else +- if (getUIntBigendianly(code+16) == 0x7C631B78 /* or 3,3,3 */) { ++ if (getUIntPPCendianly(code+16) == 0x7C631B78 /* or 3,3,3 */) { + /* branch-and-link-to-noredir %R11 */ + DIP("branch-and-link-to-noredir r11\n"); + delta += 20; +@@ -18571,7 +18578,7 @@ DisResult disInstr_PPC_WRK ( + goto decode_success; + } + else +- if (getUIntBigendianly(code+16) == 0x7C842378 /* or 4,4,4 */) { ++ if (getUIntPPCendianly(code+16) == 0x7C842378 /* or 4,4,4 */) { + /* %R3 = guest_NRADDR_GPR2 */ + DIP("r3 = guest_NRADDR_GPR2\n"); + delta += 20; +@@ -18580,7 +18587,7 @@ DisResult disInstr_PPC_WRK ( + goto decode_success; + } + else +- if (getUIntBigendianly(code+16) == 0x7CA52B78 /* or 5,5,5 */) { ++ if (getUIntPPCendianly(code+16) == 0x7CA52B78 /* or 5,5,5 */) { + DIP("IR injection\n"); + + vex_inject_ir(irsb, Iend_BE); +@@ -18603,7 +18610,7 @@ DisResult disInstr_PPC_WRK ( + } + /* We don't know what it is. Set opc1/opc2 so decode_failure + can print the insn following the Special-insn preamble. */ +- theInstr = getUIntBigendianly(code+16); ++ theInstr = getUIntPPCendianly(code+16); + opc1 = ifieldOPC(theInstr); + opc2 = ifieldOPClo10(theInstr); + goto decode_failure; +@@ -19299,7 +19306,7 @@ DisResult disInstr_PPC_WRK ( + case 0x32E: case 0x34E: case 0x36E: // tabortdc., tabortwci., tabortdci. + case 0x38E: case 0x3AE: case 0x3EE: // tabort., treclaim., trechkpt. + if (dis_transactional_memory( theInstr, +- getUIntBigendianly( (UChar*)(&guest_code[delta + 4])), ++ getUIntPPCendianly( (UChar*)(&guest_code[delta + 4])), + abiinfo, &dres, + resteerOkFn, callback_opaque)) + goto decode_success; +Index: valgrind-3.9.0/VEX/priv/host_ppc_defs.c +=================================================================== +--- valgrind-3.9.0.orig/VEX/priv/host_ppc_defs.c ++++ valgrind-3.9.0/VEX/priv/host_ppc_defs.c +@@ -3115,24 +3115,38 @@ static UInt vregNo ( HReg v ) + return n; + } + +-/* Emit an instruction big-endianly */ ++/* Emit an instruction ppc-endianly */ + static UChar* emit32 ( UChar* p, UInt w32 ) + { ++#if defined(VGP_ppc32_linux) || defined(VGP_ppc64_linux) + *p++ = toUChar((w32 >> 24) & 0x000000FF); + *p++ = toUChar((w32 >> 16) & 0x000000FF); + *p++ = toUChar((w32 >> 8) & 0x000000FF); + *p++ = toUChar((w32) & 0x000000FF); ++#else ++ *p++ = toUChar((w32) & 0x000000FF); ++ *p++ = toUChar((w32 >> 8) & 0x000000FF); ++ *p++ = toUChar((w32 >> 16) & 0x000000FF); ++ *p++ = toUChar((w32 >> 24) & 0x000000FF); ++#endif + return p; + } + +-/* Fetch an instruction big-endianly */ ++/* Fetch an instruction ppc-endianly */ + static UInt fetch32 ( UChar* p ) + { + UInt w32 = 0; ++#if defined(VGP_ppc32_linux) || defined(VGP_ppc64_linux) + w32 |= ((0xFF & (UInt)p[0]) << 24); + w32 |= ((0xFF & (UInt)p[1]) << 16); + w32 |= ((0xFF & (UInt)p[2]) << 8); + w32 |= ((0xFF & (UInt)p[3]) << 0); ++#else ++ w32 |= ((0xFF & (UInt)p[3]) << 24); ++ w32 |= ((0xFF & (UInt)p[2]) << 16); ++ w32 |= ((0xFF & (UInt)p[1]) << 8); ++ w32 |= ((0xFF & (UInt)p[0]) << 0); ++#endif + return w32; + } + +Index: valgrind-3.9.0/auxprogs/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/auxprogs/Makefile.in ++++ valgrind-3.9.0/auxprogs/Makefile.in +@@ -326,6 +326,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -374,6 +377,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +Index: valgrind-3.9.0/cachegrind/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/cachegrind/Makefile.in ++++ valgrind-3.9.0/cachegrind/Makefile.in +@@ -413,6 +413,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -461,6 +464,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +@@ -511,6 +515,9 @@ TOOL_LDFLAGS_PPC32_LINUX = \ + TOOL_LDFLAGS_PPC64_LINUX = \ + $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + ++TOOL_LDFLAGS_PPC64LE_LINUX = \ ++ $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++ + TOOL_LDFLAGS_ARM_LINUX = $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M32@ \ + $(am__append_2) + TOOL_LDFLAGS_S390X_LINUX = \ +@@ -556,6 +563,9 @@ LIBREPLACEMALLOC_PPC32_LINUX = \ + LIBREPLACEMALLOC_PPC64_LINUX = \ + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc64-linux.a + ++LIBREPLACEMALLOC_PPC64LE_LINUX = \ ++ $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc64le-linux.a ++ + LIBREPLACEMALLOC_ARM_LINUX = \ + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-arm-linux.a + +@@ -594,6 +604,11 @@ LIBREPLACEMALLOC_LDFLAGS_PPC64_LINUX = \ + $(LIBREPLACEMALLOC_PPC64_LINUX) \ + -Wl,--no-whole-archive + ++LIBREPLACEMALLOC_LDFLAGS_PPC64LE_LINUX = \ ++ -Wl,--whole-archive \ ++ $(LIBREPLACEMALLOC_PPC64LE_LINUX) \ ++ -Wl,--no-whole-archive ++ + LIBREPLACEMALLOC_LDFLAGS_ARM_LINUX = \ + -Wl,--whole-archive \ + $(LIBREPLACEMALLOC_ARM_LINUX) \ +Index: valgrind-3.9.0/cachegrind/cg_arch.c +=================================================================== +--- valgrind-3.9.0.orig/cachegrind/cg_arch.c ++++ valgrind-3.9.0/cachegrind/cg_arch.c +@@ -353,7 +353,7 @@ configure_caches(cache_t *I1c, cache_t * + *D1c = (cache_t) { 65536, 2, 64 }; + *LLc = (cache_t) { 262144, 8, 64 }; + +-#elif defined(VGA_ppc64) ++#elif defined(VGA_ppc64) || defined(VGA_ppc64le) + + // Default cache configuration + *I1c = (cache_t) { 65536, 2, 64 }; +Index: valgrind-3.9.0/cachegrind/cg_branchpred.c +=================================================================== +--- valgrind-3.9.0.orig/cachegrind/cg_branchpred.c ++++ valgrind-3.9.0/cachegrind/cg_branchpred.c +@@ -44,8 +44,8 @@ + + /* How many bits at the bottom of an instruction address are + guaranteed to be zero? */ +-#if defined(VGA_ppc32) || defined(VGA_ppc64) || defined(VGA_arm) \ +- || defined(VGA_mips32) || defined(VGA_mips64) ++#if defined(VGA_ppc32) || defined(VGA_ppc64) || defined(VGA_ppc64le) \ ++ || defined(VGA_arm) || defined(VGA_mips32) || defined(VGA_mips64) + # define N_IADDR_LO_ZERO_BITS 2 + #elif defined(VGA_x86) || defined(VGA_amd64) + # define N_IADDR_LO_ZERO_BITS 0 +Index: valgrind-3.9.0/cachegrind/tests/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/cachegrind/tests/Makefile.in ++++ valgrind-3.9.0/cachegrind/tests/Makefile.in +@@ -371,6 +371,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -419,6 +422,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +Index: valgrind-3.9.0/cachegrind/tests/x86/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/cachegrind/tests/x86/Makefile.in ++++ valgrind-3.9.0/cachegrind/tests/x86/Makefile.in +@@ -323,6 +323,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -371,6 +374,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +Index: valgrind-3.9.0/callgrind/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/callgrind/Makefile.in ++++ valgrind-3.9.0/callgrind/Makefile.in +@@ -426,6 +426,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -474,6 +477,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +@@ -524,6 +528,9 @@ TOOL_LDFLAGS_PPC32_LINUX = \ + TOOL_LDFLAGS_PPC64_LINUX = \ + $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + ++TOOL_LDFLAGS_PPC64LE_LINUX = \ ++ $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++ + TOOL_LDFLAGS_ARM_LINUX = $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M32@ \ + $(am__append_2) + TOOL_LDFLAGS_S390X_LINUX = \ +@@ -569,6 +576,9 @@ LIBREPLACEMALLOC_PPC32_LINUX = \ + LIBREPLACEMALLOC_PPC64_LINUX = \ + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc64-linux.a + ++LIBREPLACEMALLOC_PPC64LE_LINUX = \ ++ $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc64le-linux.a ++ + LIBREPLACEMALLOC_ARM_LINUX = \ + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-arm-linux.a + +@@ -607,6 +617,11 @@ LIBREPLACEMALLOC_LDFLAGS_PPC64_LINUX = \ + $(LIBREPLACEMALLOC_PPC64_LINUX) \ + -Wl,--no-whole-archive + ++LIBREPLACEMALLOC_LDFLAGS_PPC64LE_LINUX = \ ++ -Wl,--whole-archive \ ++ $(LIBREPLACEMALLOC_PPC64LE_LINUX) \ ++ -Wl,--no-whole-archive ++ + LIBREPLACEMALLOC_LDFLAGS_ARM_LINUX = \ + -Wl,--whole-archive \ + $(LIBREPLACEMALLOC_ARM_LINUX) \ +Index: valgrind-3.9.0/callgrind/tests/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/callgrind/tests/Makefile.in ++++ valgrind-3.9.0/callgrind/tests/Makefile.in +@@ -364,6 +364,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -412,6 +415,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +Index: valgrind-3.9.0/config.guess +=================================================================== +--- valgrind-3.9.0.orig/config.guess ++++ valgrind-3.9.0/config.guess +@@ -868,6 +868,9 @@ EOF + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; ++ ppc64le:Linux:*:*) ++ echo powerpc64le-unknown-linux-gnu ++ exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; +Index: valgrind-3.9.0/configure +=================================================================== +--- valgrind-3.9.0.orig/configure ++++ valgrind-3.9.0/configure +@@ -748,6 +748,8 @@ VGCONF_PLATFORMS_INCLUDE_ARM_LINUX_FALSE + VGCONF_PLATFORMS_INCLUDE_ARM_LINUX_TRUE + VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX_FALSE + VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX_TRUE ++VGCONF_PLATFORMS_INCLUDE_PPC64LE_LINUX_FALSE ++VGCONF_PLATFORMS_INCLUDE_PPC64LE_LINUX_TRUE + VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX_FALSE + VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX_TRUE + VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX_FALSE +@@ -5377,6 +5379,12 @@ $as_echo "ok (${host_cpu})" >&6; } + ARCH_MAX="ppc64" + ;; + ++ powerpc64le) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok (${host_cpu})" >&5 ++$as_echo "ok (${host_cpu})" >&6; } ++ ARCH_MAX="ppc64le" ++ ;; ++ + powerpc) + # On Linux this means only a 32-bit capable CPU. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok (${host_cpu})" >&5 +@@ -5798,6 +5806,16 @@ $as_echo "ok (${ARCH_MAX}-${VGCONF_OS})" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok (${ARCH_MAX}-${VGCONF_OS})" >&5 + $as_echo "ok (${ARCH_MAX}-${VGCONF_OS})" >&6; } + ;; ++ ppc64le-linux) ++ valt_load_address_sec_norml="0xUNSET" ++ valt_load_address_sec_inner="0xUNSET" ++ VGCONF_ARCH_PRI="ppc64le" ++ VGCONF_ARCH_SEC="" ++ VGCONF_PLATFORM_PRI_CAPS="PPC64LE_LINUX" ++ VGCONF_PLATFORM_SEC_CAPS="" ++ valt_load_address_pri_norml="0x38000000" ++ valt_load_address_pri_inner="0x28000000" ++ ;; + # Darwin gets identified as 32-bit even when it supports 64-bit. + # (Not sure why, possibly because 'uname' returns "i386"?) Just about + # all Macs support both 32-bit and 64-bit, so we just build both. If +@@ -5938,6 +5956,14 @@ else + VGCONF_ARCHS_INCLUDE_PPC64_FALSE= + fi + ++ if test x$VGCONF_PLATFORM_PRI_CAPS = xPPC64LE_LINUX ; then ++ VGCONF_ARCHS_INCLUDE_PPC64LE_TRUE= ++ VGCONF_ARCHS_INCLUDE_PPC64LE_FALSE='#' ++else ++ VGCONF_ARCHS_INCLUDE_PPC64LE_TRUE='#' ++ VGCONF_ARCHS_INCLUDE_PPC64LE_FALSE= ++fi ++ + if test x$VGCONF_PLATFORM_PRI_CAPS = xARM_LINUX ; then + VGCONF_ARCHS_INCLUDE_ARM_TRUE= + VGCONF_ARCHS_INCLUDE_ARM_FALSE='#' +@@ -6007,6 +6033,14 @@ else + VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX_FALSE= + fi + ++ if test x$VGCONF_PLATFORM_PRI_CAPS = xPPC64LE_LINUX; then ++ VGCONF_PLATFORMS_INCLUDE_PPC64LE_LINUX_TRUE= ++ VGCONF_PLATFORMS_INCLUDE_PPC64LE_LINUX_FALSE='#' ++else ++ VGCONF_PLATFORMS_INCLUDE_PPC64LE_LINUX_TRUE='#' ++ VGCONF_PLATFORMS_INCLUDE_PPC64LE_LINUX_FALSE= ++fi ++ + if test x$VGCONF_PLATFORM_PRI_CAPS = xARM_LINUX; then + VGCONF_PLATFORMS_INCLUDE_ARM_LINUX_TRUE= + VGCONF_PLATFORMS_INCLUDE_ARM_LINUX_FALSE='#' +@@ -6067,6 +6101,7 @@ fi + -o x$VGCONF_PLATFORM_PRI_CAPS = xAMD64_LINUX \ + -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_LINUX \ + -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_LINUX \ ++ -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC64LE_LINUX \ + -o x$VGCONF_PLATFORM_PRI_CAPS = xARM_LINUX \ + -o x$VGCONF_PLATFORM_PRI_CAPS = xS390X_LINUX \ + -o x$VGCONF_PLATFORM_PRI_CAPS = xMIPS32_LINUX \ +@@ -6689,6 +6724,16 @@ $as_echo "#define GLIBC_2_18 1" >>confde + DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" + DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" + ;; ++ 2.17) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.17 family" >&5 ++$as_echo "2.17 family" >&6; } ++ ++$as_echo "#define GLIBC_2_17 1" >>confdefs.h ++ ++ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" ++ ;; + darwin) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Darwin" >&5 + $as_echo "Darwin" >&6; } +@@ -10167,6 +10212,7 @@ if test x$VGCONF_PLATFORM_PRI_CAPS = xX8 + mflag_primary=$FLAG_M32 + elif test x$VGCONF_PLATFORM_PRI_CAPS = xAMD64_LINUX \ + -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_LINUX \ ++ -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC64LE_LINUX \ + -o x$VGCONF_PLATFORM_PRI_CAPS = xS390X_LINUX ; then + mflag_primary=$FLAG_M64 + elif test x$VGCONF_PLATFORM_PRI_CAPS = xX86_DARWIN ; then +@@ -11065,6 +11111,10 @@ if test -z "${VGCONF_PLATFORMS_INCLUDE_P + as_fn_error $? "conditional \"VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${VGCONF_PLATFORMS_INCLUDE_PPC64LE_LINUX_TRUE}" && test -z "${VGCONF_PLATFORMS_INCLUDE_PPC64LE_LINUX_FALSE}"; then ++ as_fn_error "conditional \"VGCONF_PLATFORMS_INCLUDE_PPC64LE_LINUX\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${VGCONF_PLATFORMS_INCLUDE_ARM_LINUX_TRUE}" && test -z "${VGCONF_PLATFORMS_INCLUDE_ARM_LINUX_FALSE}"; then + as_fn_error $? "conditional \"VGCONF_PLATFORMS_INCLUDE_ARM_LINUX\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 +Index: valgrind-3.9.0/coregrind/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/coregrind/Makefile.in ++++ valgrind-3.9.0/coregrind/Makefile.in +@@ -945,6 +945,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -993,6 +996,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +Index: valgrind-3.9.0/coregrind/launcher-darwin.c +=================================================================== +--- valgrind-3.9.0.orig/coregrind/launcher-darwin.c ++++ valgrind-3.9.0/coregrind/launcher-darwin.c +@@ -59,11 +59,12 @@ static struct { + const char *apple_name; // e.g. x86_64 + const char *valgrind_name; // e.g. amd64 + } valid_archs[] = { +- { CPU_TYPE_X86, "i386", "x86" }, +- { CPU_TYPE_X86_64, "x86_64", "amd64" }, +- { CPU_TYPE_ARM, "arm", "arm" }, +- { CPU_TYPE_POWERPC, "ppc", "ppc32" }, +- { CPU_TYPE_POWERPC64, "ppc64", "ppc64" }, ++ { CPU_TYPE_X86, "i386", "x86" }, ++ { CPU_TYPE_X86_64, "x86_64", "amd64" }, ++ { CPU_TYPE_ARM, "arm", "arm" }, ++ { CPU_TYPE_POWERPC, "ppc", "ppc32" }, ++ { CPU_TYPE_POWERPC64, "ppc64", "ppc64" }, ++ { CPU_TYPE_POWERPC64LE, "ppc64le", "ppc64le" }, + }; + static int valid_archs_count = sizeof(valid_archs)/sizeof(valid_archs[0]); + +Index: valgrind-3.9.0/coregrind/launcher-linux.c +=================================================================== +--- valgrind-3.9.0.orig/coregrind/launcher-linux.c ++++ valgrind-3.9.0/coregrind/launcher-linux.c +@@ -221,6 +221,12 @@ static const char *select_platform(const + ehdr->e_ident[EI_OSABI] == ELFOSABI_LINUX)) { + platform = "mips64-linux"; + } ++ else ++ if (ehdr->e_machine == EM_PPC64 && ++ (ehdr->e_ident[EI_OSABI] == ELFOSABI_SYSV || ++ ehdr->e_ident[EI_OSABI] == ELFOSABI_LINUX)) { ++ platform = "ppc64le-linux"; ++ } + } else if (header[EI_DATA] == ELFDATA2MSB) { + # if !defined(VGPV_arm_linux_android) && !defined(VGPV_x86_linux_android) + if (ehdr->e_machine == EM_PPC64 && +@@ -311,6 +317,7 @@ int main(int argc, char** argv, char** e + (0==strcmp(VG_PLATFORM,"amd64-linux")) || + (0==strcmp(VG_PLATFORM,"ppc32-linux")) || + (0==strcmp(VG_PLATFORM,"ppc64-linux")) || ++ (0==strcmp(VG_PLATFORM,"ppc64le-linux")) || + (0==strcmp(VG_PLATFORM,"arm-linux")) || + (0==strcmp(VG_PLATFORM,"s390x-linux")) || + (0==strcmp(VG_PLATFORM,"mips32-linux")) || +Index: valgrind-3.9.0/coregrind/m_aspacemgr/aspacemgr-common.c +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_aspacemgr/aspacemgr-common.c ++++ valgrind-3.9.0/coregrind/m_aspacemgr/aspacemgr-common.c +@@ -159,8 +159,8 @@ SysRes VG_(am_do_mmap_NO_NOTIFY)( Addr s + res = VG_(do_syscall6)(__NR_mmap2, (UWord)start, length, + prot, flags, fd, offset / 4096); + # elif defined(VGP_amd64_linux) || defined(VGP_ppc64_linux) \ +- || defined(VGP_s390x_linux) || defined(VGP_mips32_linux) \ +- || defined(VGP_mips64_linux) ++ || defined(VGP_ppc64le_linux) || defined(VGP_s390x_linux) \ ++ || defined(VGP_mips32_linux) || defined(VGP_mips64_linux) + res = VG_(do_syscall6)(__NR_mmap, (UWord)start, length, + prot, flags, fd, offset); + # elif defined(VGP_x86_darwin) +Index: valgrind-3.9.0/coregrind/m_cache.c +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_cache.c ++++ valgrind-3.9.0/coregrind/m_cache.c +@@ -539,7 +539,7 @@ get_cache_info(VexArchInfo *vai) + } + + #elif defined(VGA_arm) || defined(VGA_ppc32) || defined(VGA_ppc64) || \ +- defined(VGA_mips32) || defined(VGA_mips64) ++ defined(VGA_ppc64le)|| defined(VGA_mips32) || defined(VGA_mips64) + + static Bool + get_cache_info(VexArchInfo *vai) +Index: valgrind-3.9.0/coregrind/m_coredump/coredump-elf.c +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_coredump/coredump-elf.c ++++ valgrind-3.9.0/coregrind/m_coredump/coredump-elf.c +@@ -346,6 +346,27 @@ static void fill_prstatus(const ThreadSt + regs->dsisr = 0; + regs->result = 0; + ++#elif defined(VGP_ppc64le_linux) ++# define DO(n) regs->gpr[n] = arch->vex.guest_GPR##n ++ DO(0); DO(1); DO(2); DO(3); DO(4); DO(5); DO(6); DO(7); ++ DO(8); DO(9); DO(10); DO(11); DO(12); DO(13); DO(14); DO(15); ++ DO(16); DO(17); DO(18); DO(19); DO(20); DO(21); DO(22); DO(23); ++ DO(24); DO(25); DO(26); DO(27); DO(28); DO(29); DO(30); DO(31); ++# undef DO ++ ++ regs->nip = arch->vex.guest_CIA; ++ regs->msr = 0xf033; /* pretty arbitrary */ ++ regs->orig_gpr3 = arch->vex.guest_GPR3; ++ regs->ctr = arch->vex.guest_CTR; ++ regs->link = arch->vex.guest_LR; ++ regs->xer = LibVEX_GuestPPC64_get_XER( &((ThreadArchState*)arch)->vex ); ++ regs->ccr = LibVEX_GuestPPC64_get_CR( &((ThreadArchState*)arch)->vex ); ++ /* regs->mq = 0; */ ++ regs->trap = 0; ++ regs->dar = 0; /* should be fault address? */ ++ regs->dsisr = 0; ++ regs->result = 0; ++ + #elif defined(VGP_arm_linux) + regs->ARM_r0 = arch->vex.guest_R0; + regs->ARM_r1 = arch->vex.guest_R1; +@@ -454,7 +475,7 @@ static void fill_fpu(const ThreadState * + DO(24); DO(25); DO(26); DO(27); DO(28); DO(29); DO(30); DO(31); + # undef DO + +-#elif defined(VGP_ppc64_linux) ++#elif defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + /* The guest state has the FPR fields declared as ULongs, so need + to fish out the values without converting them. + NOTE: The 32 FP registers map to the first 32 VSX registers.*/ +Index: valgrind-3.9.0/coregrind/m_debugger.c +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_debugger.c ++++ valgrind-3.9.0/coregrind/m_debugger.c +@@ -152,7 +152,7 @@ static Int ptrace_setregs(Int pid, VexGu + (void*)LibVEX_GuestPPC32_get_XER(vex)); + return rc; + +-#elif defined(VGP_ppc64_linux) ++#elif defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + Int rc = 0; + /* FRJ: copied nearly verbatim from the ppc32 case. I compared the + vki-ppc64-linux.h with its ppc32 counterpart and saw no +Index: valgrind-3.9.0/coregrind/m_debuginfo/d3basics.c +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_debuginfo/d3basics.c ++++ valgrind-3.9.0/coregrind/m_debuginfo/d3basics.c +@@ -406,7 +406,7 @@ static Bool get_Dwarf_Reg( /*OUT*/Addr* + if (regno == 7/*RSP*/) { *a = regs->sp; return True; } + # elif defined(VGP_ppc32_linux) + if (regno == 1/*SP*/) { *a = regs->sp; return True; } +-# elif defined(VGP_ppc64_linux) ++# elif defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + if (regno == 1/*SP*/) { *a = regs->sp; return True; } + # elif defined(VGP_arm_linux) + if (regno == 13) { *a = regs->sp; return True; } +@@ -861,7 +861,7 @@ GXResult ML_(evaluate_Dwarf3_Expr) ( UCh + if (!regs) + FAIL("evaluate_Dwarf3_Expr: " + "DW_OP_call_frame_cfa but no reg info"); +-#if defined(VGP_ppc32_linux) || defined(VGP_ppc64_linux) ++#if defined(VGP_ppc32_linux) || defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + /* Valgrind on ppc32/ppc64 currently doesn't use unwind info. */ + uw1 = ML_(read_Addr)((UChar*)regs->sp); + #else +Index: valgrind-3.9.0/coregrind/m_debuginfo/debuginfo.c +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_debuginfo/debuginfo.c ++++ valgrind-3.9.0/coregrind/m_debuginfo/debuginfo.c +@@ -824,7 +824,8 @@ ULong VG_(di_notify_mmap)( Addr a, Bool + || defined(VGA_mips64) + is_rx_map = seg->hasR && seg->hasX; + is_rw_map = seg->hasR && seg->hasW; +-# elif defined(VGA_amd64) || defined(VGA_ppc64) || defined(VGA_arm) ++# elif defined(VGA_amd64) || defined(VGA_arm) \ ++ || defined(VGA_ppc64) || defined(VGA_ppc64le) + is_rx_map = seg->hasR && seg->hasX && !seg->hasW; + is_rw_map = seg->hasR && seg->hasW && !seg->hasX; + # elif defined(VGP_s390x_linux) +@@ -2112,7 +2113,8 @@ UWord evalCfiExpr ( XArray* exprs, Int i + case Creg_IA_SP: return eec->uregs->sp; + case Creg_IA_BP: return eec->uregs->fp; + case Creg_MIPS_RA: return eec->uregs->ra; +-# elif defined(VGA_ppc32) || defined(VGA_ppc64) ++# elif defined(VGA_ppc32) \ ++ || defined(VGA_ppc64) || defined(VGA_ppc64le) + # else + # error "Unsupported arch" + # endif +@@ -2356,7 +2358,7 @@ static Addr compute_cfa ( D3UnwindRegs* + case CFIC_IA_BPREL: + cfa = cfsi->cfa_off + uregs->fp; + break; +-# elif defined(VGA_ppc32) || defined(VGA_ppc64) ++# elif defined(VGA_ppc32) || defined(VGA_ppc64) || defined(VGA_ppc64le) + # else + # error "Unsupported arch" + # endif +@@ -2452,7 +2454,7 @@ Bool VG_(use_CF_info) ( /*MOD*/D3UnwindR + ipHere = uregsHere->ia; + # elif defined(VGA_mips32) || defined(VGA_mips64) + ipHere = uregsHere->pc; +-# elif defined(VGA_ppc32) || defined(VGA_ppc64) ++# elif defined(VGA_ppc32) || defined(VGA_ppc64) || defined(VGA_ppc64le) + # else + # error "Unknown arch" + # endif +@@ -2532,7 +2534,7 @@ Bool VG_(use_CF_info) ( /*MOD*/D3UnwindR + COMPUTE(uregsPrev.pc, uregsHere->pc, cfsi->ra_how, cfsi->ra_off); + COMPUTE(uregsPrev.sp, uregsHere->sp, cfsi->sp_how, cfsi->sp_off); + COMPUTE(uregsPrev.fp, uregsHere->fp, cfsi->fp_how, cfsi->fp_off); +-# elif defined(VGA_ppc32) || defined(VGA_ppc64) ++# elif defined(VGA_ppc32) || defined(VGA_ppc64) || defined(VGA_ppc64le) + # else + # error "Unknown arch" + # endif +Index: valgrind-3.9.0/coregrind/m_debuginfo/priv_storage.h +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_debuginfo/priv_storage.h ++++ valgrind-3.9.0/coregrind/m_debuginfo/priv_storage.h +@@ -232,7 +232,7 @@ typedef + Int r7_off; + } + DiCfSI; +-#elif defined(VGA_ppc32) || defined(VGA_ppc64) ++#elif defined(VGA_ppc32) || defined(VGA_ppc64) || defined(VGA_ppc64le) + /* Just have a struct with the common fields in, so that code that + processes the common fields doesn't have to be ifdef'd against + VGP_/VGA_ symbols. These are not used in any way on ppc32/64-linux +Index: valgrind-3.9.0/coregrind/m_debuginfo/readdwarf.c +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_debuginfo/readdwarf.c ++++ valgrind-3.9.0/coregrind/m_debuginfo/readdwarf.c +@@ -1833,7 +1833,7 @@ void ML_(read_debuginfo_dwarf1) ( + # define FP_REG 1 + # define SP_REG 1 + # define RA_REG_DEFAULT 65 +-#elif defined(VGP_ppc64_linux) ++#elif defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + # define FP_REG 1 + # define SP_REG 1 + # define RA_REG_DEFAULT 65 +@@ -1870,6 +1870,7 @@ void ML_(read_debuginfo_dwarf1) ( + 7 (DWARF for the ARM Architecture) specifies that values up to 320 + might exist, for Neon/VFP-v3. */ + #if defined(VGP_ppc32_linux) || defined(VGP_ppc64_linux) \ ++ || defined(VGP_ppc64le_linux) \ + || defined(VGP_mips32_linux) || defined(VGP_mips64_linux) + # define N_CFI_REGS 72 + #elif defined(VGP_arm_linux) +@@ -2433,7 +2434,7 @@ static Bool summarise_context( /*OUT*/Di + + + +-# elif defined(VGA_ppc32) || defined(VGA_ppc64) ++# elif defined(VGA_ppc32) || defined(VGA_ppc64) || defined(VGA_ppc64le) + # else + # error "Unknown arch" + # endif +@@ -2521,7 +2522,7 @@ static Int copy_convert_CfiExpr_tree ( X + return ML_(CfiExpr_CfiReg)( dstxa, Creg_IA_BP ); + if (dwreg == srcuc->ra_reg) + return ML_(CfiExpr_CfiReg)( dstxa, Creg_IA_IP ); +-# elif defined(VGA_ppc32) || defined(VGA_ppc64) ++# elif defined(VGA_ppc32) || defined(VGA_ppc64) || defined(VGA_ppc64le) + # else + # error "Unknown arch" + # endif +@@ -3688,7 +3689,8 @@ void ML_(read_callframe_info_dwarf3) + if (!is_ehframe) + vg_assert(frame_avma == 0); + +-# if defined(VGP_ppc32_linux) || defined(VGP_ppc64_linux) ++# if defined(VGP_ppc32_linux) || defined(VGP_ppc64_linux) || \ ++ defined(VGP_ppc64le_linux) + /* These targets don't use CFI-based stack unwinding. */ + return; + # endif +Index: valgrind-3.9.0/coregrind/m_debuginfo/readelf.c +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_debuginfo/readelf.c ++++ valgrind-3.9.0/coregrind/m_debuginfo/readelf.c +@@ -244,7 +244,7 @@ Bool get_elf_symbol_info ( + ) + { + Bool plausible; +-# if defined(VGP_ppc64_linux) ++# if defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + Bool is_in_opd; + # endif + Bool in_text, in_data, in_sdata, in_rodata, in_bss, in_sbss; +@@ -374,7 +374,7 @@ Bool get_elf_symbol_info ( + } + # endif + +-# if defined(VGP_ppc64_linux) ++# if defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + /* Allow STT_NOTYPE in the very special case where we're running on + ppc64-linux and the symbol is one which the .opd-chasing hack + below will chase. */ +@@ -481,7 +481,7 @@ Bool get_elf_symbol_info ( + See thread starting at + http://gcc.gnu.org/ml/gcc-patches/2004-08/msg00557.html + */ +-# if defined(VGP_ppc64_linux) ++# if defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + is_in_opd = False; + # endif + +@@ -489,7 +489,7 @@ Bool get_elf_symbol_info ( + && di->opd_size > 0 + && *sym_avma_out >= di->opd_avma + && *sym_avma_out < di->opd_avma + di->opd_size) { +-# if !defined(VGP_ppc64_linux) ++# if !defined(VGP_ppc64_linux) && !defined(VGP_ppc64le_linux) + if (TRACE_SYMTAB_ENABLED) { + HChar* sym_name = ML_(img_strdup)(escn_strtab->img, + "di.gesi.6", sym_name_ioff); +@@ -584,7 +584,7 @@ Bool get_elf_symbol_info ( + + /* Here's yet another ppc64-linux hack. Get rid of leading dot if + the symbol is outside .opd. */ +-# if defined(VGP_ppc64_linux) ++# if defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + if (di->opd_size > 0 + && !is_in_opd + && *sym_name_out_ioff != DiOffT_INVALID +@@ -668,7 +668,7 @@ Bool get_elf_symbol_info ( + } + } + +-# if defined(VGP_ppc64_linux) ++# if defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + /* It's crucial that we never add symbol addresses in the .opd + section. This would completely mess up function redirection and + intercepting. This assert ensures that any symbols that make it +@@ -2112,7 +2112,7 @@ Bool ML_(read_elf_debug_info) ( struct _ + BAD(".plt"); + } + } +-# elif defined(VGP_ppc64_linux) ++# elif defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + /* Accept .plt where mapped as rw (data), or unmapped */ + if (0 == VG_(strcmp)(name, ".plt")) { + if (inrw && !di->plt_present) { +@@ -2728,7 +2728,7 @@ Bool ML_(read_elf_debug_info) ( struct _ + void (*read_elf_symtab)(struct _DebugInfo*, const HChar*, + DiSlice*, DiSlice*, DiSlice*, Bool); + Bool symtab_in_debug; +-# if defined(VGP_ppc64_linux) ++# if defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + read_elf_symtab = read_elf_symtab__ppc64_linux; + # else + read_elf_symtab = read_elf_symtab__normal; +@@ -2772,6 +2772,7 @@ Bool ML_(read_elf_debug_info) ( struct _ + # if !defined(VGP_amd64_linux) \ + && !defined(VGP_s390x_linux) \ + && !defined(VGP_ppc64_linux) \ ++ && !defined(VGP_ppc64le_linux) \ + && !defined(VGPV_arm_linux_android) \ + && !defined(VGPV_x86_linux_android) \ + && !defined(VGP_mips64_linux) +Index: valgrind-3.9.0/coregrind/m_debuginfo/readmacho.c +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_debuginfo/readmacho.c ++++ valgrind-3.9.0/coregrind/m_debuginfo/readmacho.c +@@ -199,6 +199,8 @@ static DiSlice map_image_aboard ( DebugI + Int cputype = CPU_TYPE_POWERPC; + # elif defined(VGA_ppc64) + Int cputype = CPU_TYPE_POWERPC64; ++# elif defined(VGA_ppc64le) ++ Int cputype = CPU_TYPE_POWERPC64LE; + # elif defined(VGA_x86) + Int cputype = CPU_TYPE_X86; + # elif defined(VGA_amd64) +Index: valgrind-3.9.0/coregrind/m_debuginfo/storage.c +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_debuginfo/storage.c ++++ valgrind-3.9.0/coregrind/m_debuginfo/storage.c +@@ -189,7 +189,7 @@ void ML_(ppDiCfSI) ( XArray* /* of CfiEx + SHOW_HOW(si->r11_how, si->r11_off); + VG_(printf)(" R7="); + SHOW_HOW(si->r7_how, si->r7_off); +-# elif defined(VGA_ppc32) || defined(VGA_ppc64) ++# elif defined(VGA_ppc32) || defined(VGA_ppc64) || defined(VGA_ppc64le) + # elif defined(VGA_s390x) || defined(VGA_mips32) || defined(VGA_mips64) + VG_(printf)(" SP="); + SHOW_HOW(si->sp_how, si->sp_off); +Index: valgrind-3.9.0/coregrind/m_debuglog.c +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_debuglog.c ++++ valgrind-3.9.0/coregrind/m_debuglog.c +@@ -188,7 +188,7 @@ static UInt local_sys_getpid ( void ) + return __res; + } + +-#elif defined(VGP_ppc64_linux) ++#elif defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + + static UInt local_sys_write_stderr ( const HChar* buf, Int n ) + { +Index: valgrind-3.9.0/coregrind/m_dispatch/dispatch-ppc64-linux.S +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_dispatch/dispatch-ppc64-linux.S ++++ valgrind-3.9.0/coregrind/m_dispatch/dispatch-ppc64-linux.S +@@ -28,7 +28,7 @@ + The GNU General Public License is contained in the file COPYING. + */ + +-#if defined(VGP_ppc64_linux) ++#if defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + + #include "pub_core_basics_asm.h" + #include "pub_core_dispatch_asm.h" +@@ -530,7 +530,7 @@ VG_(disp_cp_evcheck_fail): + /* Let the linker know we don't need an executable stack */ + .section .note.GNU-stack,"",@progbits + +-#endif // defined(VGP_ppc64_linux) ++#endif // defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + + /*--------------------------------------------------------------------*/ + /*--- end ---*/ +Index: valgrind-3.9.0/coregrind/m_gdbserver/target.c +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_gdbserver/target.c ++++ valgrind-3.9.0/coregrind/m_gdbserver/target.c +@@ -643,7 +643,7 @@ void valgrind_initialize_target(void) + arm_init_architecture(&the_low_target); + #elif defined(VGA_ppc32) + ppc32_init_architecture(&the_low_target); +-#elif defined(VGA_ppc64) ++#elif defined(VGA_ppc64) || defined(VGA_ppc64le) + ppc64_init_architecture(&the_low_target); + #elif defined(VGA_s390x) + s390x_init_architecture(&the_low_target); +Index: valgrind-3.9.0/coregrind/m_initimg/initimg-linux.c +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_initimg/initimg-linux.c ++++ valgrind-3.9.0/coregrind/m_initimg/initimg-linux.c +@@ -366,7 +366,7 @@ struct auxv *find_auxv(UWord* sp) + sp++; + sp++; + +-#if defined(VGA_ppc32) || defined(VGA_ppc64) ++#if defined(VGA_ppc32) || defined(VGA_ppc64) || defined(VGA_ppc64le) + # if defined AT_IGNOREPPC + while (*sp == AT_IGNOREPPC) // skip AT_IGNOREPPC entries + sp += 2; +@@ -457,7 +457,8 @@ Addr setup_client_stack( void* init_sp, + auxsize += sizeof(*cauxv); + } + +-# if defined(VGP_ppc32_linux) || defined(VGP_ppc64_linux) ++# if defined(VGP_ppc32_linux) || defined(VGP_ppc64_linux) || \ ++ defined(VGP_ppc64le_linux) + auxsize += 2 * sizeof(*cauxv); + # endif + +@@ -614,7 +615,8 @@ Addr setup_client_stack( void* init_sp, + // We do not take ULong* (as ULong 8 bytes on a 32 bits), + // => we take UWord* + +-# if defined(VGP_ppc32_linux) || defined(VGP_ppc64_linux) ++# if defined(VGP_ppc32_linux) || defined(VGP_ppc64_linux) \ ++ || defined(VGP_ppc64le_linux) + auxv[0].a_type = AT_IGNOREPPC; + auxv[0].u.a_val = AT_IGNOREPPC; + auxv[1].a_type = AT_IGNOREPPC; +@@ -716,7 +718,7 @@ Addr setup_client_stack( void* init_sp, + "PPC32 icache line size %u (type %u)\n", + (UInt)auxv->u.a_val, (UInt)auxv->a_type ); + } +-# elif defined(VGP_ppc64_linux) ++# elif defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + /* acquire cache info */ + if (auxv->u.a_val > 0) { + VG_(machine_ppc64_set_clszB)( auxv->u.a_val ); +@@ -727,7 +729,8 @@ Addr setup_client_stack( void* init_sp, + # endif + break; + +-# if defined(VGP_ppc32_linux) || defined(VGP_ppc64_linux) ++# if defined(VGP_ppc32_linux) || defined(VGP_ppc64_linux) || \ ++ defined(VGP_ppc64le_linux) + case AT_IGNOREPPC: + break; + # endif +@@ -747,7 +750,8 @@ Addr setup_client_stack( void* init_sp, + auxv->a_type = AT_IGNORE; + break; + +-# if !defined(VGP_ppc32_linux) && !defined(VGP_ppc64_linux) ++# if !defined(VGP_ppc32_linux) && !defined(VGP_ppc64_linux) && \ ++ !defined(VGP_ppc64le_linux) + case AT_SYSINFO_EHDR: { + /* Trash this, because we don't reproduce it */ + const NSegment* ehdrseg = VG_(am_find_nsegment)((Addr)auxv->u.a_ptr); +@@ -1033,7 +1037,7 @@ void VG_(ii_finalise_image)( IIFinaliseI + arch->vex.guest_GPR1 = iifii.initial_client_SP; + arch->vex.guest_CIA = iifii.initial_client_IP; + +-# elif defined(VGP_ppc64_linux) ++# elif defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + vg_assert(0 == sizeof(VexGuestPPC64State) % 16); + + /* Zero out the initial state, and set up the simulated FPU in a +Index: valgrind-3.9.0/coregrind/m_libcassert.c +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_libcassert.c ++++ valgrind-3.9.0/coregrind/m_libcassert.c +@@ -96,7 +96,7 @@ + (srP)->r_sp = (ULong)r1; \ + (srP)->misc.PPC32.r_lr = lr; \ + } +-#elif defined(VGP_ppc64_linux) ++#elif defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + # define GET_STARTREGS(srP) \ + { ULong cia, r1, lr; \ + __asm__ __volatile__( \ +Index: valgrind-3.9.0/coregrind/m_libcfile.c +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_libcfile.c ++++ valgrind-3.9.0/coregrind/m_libcfile.c +@@ -623,8 +623,8 @@ SysRes VG_(pread) ( Int fd, void* buf, I + 0, 0, offset); + return res; + # elif defined(VGP_amd64_linux) \ +- || defined(VGP_ppc64_linux) || defined(VGP_s390x_linux) \ +- || defined(VGP_mips64_linux) ++ || defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) \ ++ || defined(VGP_s390x_linux) || defined(VGP_mips64_linux) + res = VG_(do_syscall4)(__NR_pread64, fd, (UWord)buf, count, offset); + return res; + # elif defined(VGP_amd64_darwin) +@@ -867,7 +867,8 @@ static Int parse_inet_addr_and_port ( co + Int VG_(socket) ( Int domain, Int type, Int protocol ) + { + # if defined(VGP_x86_linux) || defined(VGP_ppc32_linux) \ +- || defined(VGP_ppc64_linux) || defined(VGP_s390x_linux) ++ || defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) \ ++ || defined(VGP_s390x_linux) + SysRes res; + UWord args[3]; + args[0] = domain; +@@ -906,7 +907,8 @@ static + Int my_connect ( Int sockfd, struct vki_sockaddr_in* serv_addr, Int addrlen ) + { + # if defined(VGP_x86_linux) || defined(VGP_ppc32_linux) \ +- || defined(VGP_ppc64_linux) || defined(VGP_s390x_linux) ++ || defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) \ ++ || defined(VGP_s390x_linux) + SysRes res; + UWord args[3]; + args[0] = sockfd; +@@ -944,7 +946,8 @@ Int VG_(write_socket)( Int sd, const voi + SIGPIPE */ + + # if defined(VGP_x86_linux) || defined(VGP_ppc32_linux) \ +- || defined(VGP_ppc64_linux) || defined(VGP_s390x_linux) ++ || defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) \ ++ || defined(VGP_s390x_linux) + SysRes res; + UWord args[4]; + args[0] = sd; +@@ -974,8 +977,8 @@ Int VG_(write_socket)( Int sd, const voi + Int VG_(getsockname) ( Int sd, struct vki_sockaddr *name, Int *namelen) + { + # if defined(VGP_x86_linux) || defined(VGP_ppc32_linux) \ +- || defined(VGP_ppc64_linux) || defined(VGP_s390x_linux) \ +- || defined(VGP_mips32_linux) ++ || defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) \ ++ || defined(VGP_s390x_linux) || defined(VGP_mips32_linux) + SysRes res; + UWord args[3]; + args[0] = sd; +@@ -1005,8 +1008,8 @@ Int VG_(getsockname) ( Int sd, struct vk + Int VG_(getpeername) ( Int sd, struct vki_sockaddr *name, Int *namelen) + { + # if defined(VGP_x86_linux) || defined(VGP_ppc32_linux) \ +- || defined(VGP_ppc64_linux) || defined(VGP_s390x_linux) \ +- || defined(VGP_mips32_linux) ++ || defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) \ ++ || defined(VGP_s390x_linux) || defined(VGP_mips32_linux) + SysRes res; + UWord args[3]; + args[0] = sd; +@@ -1037,7 +1040,8 @@ Int VG_(getsockopt) ( Int sd, Int level, + Int *optlen) + { + # if defined(VGP_x86_linux) || defined(VGP_ppc32_linux) \ +- || defined(VGP_ppc64_linux) || defined(VGP_s390x_linux) ++ || defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) \ ++ || defined(VGP_s390x_linux) + SysRes res; + UWord args[5]; + args[0] = sd; +@@ -1073,7 +1077,8 @@ Int VG_(setsockopt) ( Int sd, Int level, + Int optlen) + { + # if defined(VGP_x86_linux) || defined(VGP_ppc32_linux) \ +- || defined(VGP_ppc64_linux) || defined(VGP_s390x_linux) ++ || defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) \ ++ || defined(VGP_s390x_linux) + SysRes res; + UWord args[5]; + args[0] = sd; +Index: valgrind-3.9.0/coregrind/m_libcproc.c +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_libcproc.c ++++ valgrind-3.9.0/coregrind/m_libcproc.c +@@ -550,7 +550,8 @@ Int VG_(getgroups)( Int size, UInt* list + return sr_Res(sres); + + # elif defined(VGP_amd64_linux) || defined(VGP_ppc64_linux) \ +- || defined(VGP_arm_linux) \ ++ || defined(VGP_ppc64le_linux) \ ++ || defined(VGP_arm_linux) \ + || defined(VGO_darwin) || defined(VGP_s390x_linux) \ + || defined(VGP_mips32_linux) + SysRes sres; +@@ -735,7 +736,7 @@ void VG_(invalidate_icache) ( void *ptr, + // If I-caches are coherent, nothing needs to be done here + if (vai.hwcache_info.icaches_maintain_coherence) return; + +-# if defined(VGA_ppc32) || defined(VGA_ppc64) ++# if defined(VGA_ppc32) || defined(VGA_ppc64) || defined(VGA_ppc64le) + Addr startaddr = (Addr) ptr; + Addr endaddr = startaddr + nbytes; + Addr cls; +Index: valgrind-3.9.0/coregrind/m_libcsetjmp.c +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_libcsetjmp.c ++++ valgrind-3.9.0/coregrind/m_libcsetjmp.c +@@ -149,7 +149,7 @@ __asm__( + + /* ------------ ppc64-linux ------------ */ + +-#if defined(VGP_ppc64_linux) ++#if defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + + __asm__( + ".section \".toc\",\"aw\"" "\n" +@@ -270,7 +270,7 @@ __asm__( + ".previous" "\n" + ); + +-#endif /* VGP_ppc64_linux */ ++#endif /* VGP_ppc64_linux || VGP_ppc64le_linux */ + + + /* ------------ amd64-{linux,darwin} ------------ */ +Index: valgrind-3.9.0/coregrind/m_machine.c +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_machine.c ++++ valgrind-3.9.0/coregrind/m_machine.c +@@ -81,7 +81,7 @@ void VG_(get_UnwindStartRegs) ( /*OUT*/U + regs->r_sp = (ULong)VG_(threads)[tid].arch.vex.guest_GPR1; + regs->misc.PPC32.r_lr + = VG_(threads)[tid].arch.vex.guest_LR; +-# elif defined(VGA_ppc64) ++# elif defined(VGA_ppc64) || defined(VGA_ppc64le) + regs->r_pc = VG_(threads)[tid].arch.vex.guest_CIA; + regs->r_sp = VG_(threads)[tid].arch.vex.guest_GPR1; + regs->misc.PPC64.r_lr +@@ -140,7 +140,8 @@ void VG_(set_syscall_return_shadows) ( T + # elif defined(VGP_amd64_linux) + VG_(threads)[tid].arch.vex_shadow1.guest_RAX = s1res; + VG_(threads)[tid].arch.vex_shadow2.guest_RAX = s2res; +-# elif defined(VGP_ppc32_linux) || defined(VGP_ppc64_linux) ++# elif defined(VGP_ppc32_linux) || defined(VGP_ppc64_linux) \ ++ || defined(VGP_ppc64le_linux) + VG_(threads)[tid].arch.vex_shadow1.guest_GPR3 = s1res; + VG_(threads)[tid].arch.vex_shadow2.guest_GPR3 = s2res; + # elif defined(VGP_arm_linux) +@@ -239,7 +240,7 @@ static void apply_to_GPs_of_tid(ThreadId + (*f)(tid, "R13", vex->guest_R13); + (*f)(tid, "R14", vex->guest_R14); + (*f)(tid, "R15", vex->guest_R15); +-#elif defined(VGA_ppc32) || defined(VGA_ppc64) ++#elif defined(VGA_ppc32) || defined(VGA_ppc64) || defined(VGA_ppc64le) + (*f)(tid, "GPR0" , vex->guest_GPR0 ); + (*f)(tid, "GPR1" , vex->guest_GPR1 ); + (*f)(tid, "GPR2" , vex->guest_GPR2 ); +@@ -437,7 +438,7 @@ UInt VG_(machine_x86_have_mxcsr) = 0; + UInt VG_(machine_ppc32_has_FP) = 0; + UInt VG_(machine_ppc32_has_VMX) = 0; + #endif +-#if defined(VGA_ppc64) ++#if defined(VGA_ppc64) || defined(VGA_ppc64le) + ULong VG_(machine_ppc64_has_VMX) = 0; + #endif + #if defined(VGA_arm) +@@ -447,7 +448,7 @@ Int VG_(machine_arm_archlevel) = 4; + + /* For hwcaps detection on ppc32/64, s390x, and arm we'll need to do SIGILL + testing, so we need a VG_MINIMAL_JMP_BUF. */ +-#if defined(VGA_ppc32) || defined(VGA_ppc64) \ ++#if defined(VGA_ppc32) || defined(VGA_ppc64) || defined(VGA_ppc64le) \ + || defined(VGA_arm) || defined(VGA_s390x) || defined(VGA_mips32) + #include "pub_core_libcsetjmp.h" + static VG_MINIMAL_JMP_BUF(env_unsup_insn); +@@ -465,7 +466,7 @@ static void handler_unsup_insn ( Int x ) + * Not very defensive: assumes that as long as the dcbz/dcbzl + * instructions don't raise a SIGILL, that they will zero an aligned, + * contiguous block of memory of a sensible size. */ +-#if defined(VGA_ppc32) || defined(VGA_ppc64) ++#if defined(VGA_ppc32) || defined(VGA_ppc64) || defined(VGA_ppc64le) + static void find_ppc_dcbz_sz(VexArchInfo *arch_info) + { + Int dcbz_szB = 0; +@@ -518,7 +519,7 @@ static void find_ppc_dcbz_sz(VexArchInfo + dcbz_szB, dcbzl_szB); + # undef MAX_DCBZL_SZB + } +-#endif /* defined(VGA_ppc32) || defined(VGA_ppc64) */ ++#endif /* defined(VGA_ppc32) || defined(VGA_ppc64) || defined(VGA_ppc64le) */ + + #ifdef VGA_s390x + +@@ -1054,7 +1055,7 @@ Bool VG_(machine_get_hwcaps)( void ) + return True; + } + +-#elif defined(VGA_ppc64) ++#elif defined(VGA_ppc64) || defined(VGA_ppc64le) + { + /* Same instruction set detection algorithm as for ppc32. */ + vki_sigset_t saved_set, tmp_set; +@@ -1552,7 +1553,7 @@ void VG_(machine_ppc32_set_clszB)( Int s + + + /* Notify host cpu instruction cache line size. */ +-#if defined(VGA_ppc64) ++#if defined(VGA_ppc64) || defined(VGA_ppc64le) + void VG_(machine_ppc64_set_clszB)( Int szB ) + { + vg_assert(hwcaps_done); +@@ -1634,7 +1635,7 @@ Int VG_(machine_get_size_of_largest_gues + if (vai.hwcaps & VEX_HWCAPS_PPC32_DFP) return 16; + return 8; + +-# elif defined(VGA_ppc64) ++# elif defined(VGA_ppc64) || defined(VGA_ppc64le) + /* 8 if boring; 16 if signs of Altivec or other exotic stuff */ + if (vai.hwcaps & VEX_HWCAPS_PPC64_V) return 16; + if (vai.hwcaps & VEX_HWCAPS_PPC64_VX) return 16; +@@ -1673,7 +1674,7 @@ void* VG_(fnptr_to_fnentry)( void* f ) + || defined(VGP_s390x_linux) || defined(VGP_mips32_linux) \ + || defined(VGP_mips64_linux) + return f; +-# elif defined(VGP_ppc64_linux) ++# elif defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + /* ppc64-linux uses the AIX scheme, in which f is a pointer to a + 3-word function descriptor, of which the first word is the entry + address. */ +Index: valgrind-3.9.0/coregrind/m_main.c +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_main.c ++++ valgrind-3.9.0/coregrind/m_main.c +@@ -2015,7 +2015,8 @@ Int valgrind_main ( Int argc, HChar **ar + + # if defined(VGP_x86_linux) + iters = 10; +-# elif defined(VGP_amd64_linux) || defined(VGP_ppc64_linux) ++# elif defined(VGP_amd64_linux) || defined(VGP_ppc64_linux) \ ++ || defined(VGP_ppc64le_linux) + iters = 10; + # elif defined(VGP_ppc32_linux) + iters = 5; +@@ -2567,7 +2568,7 @@ void shutdown_actions_NORETURN( ThreadId + static void final_tidyup(ThreadId tid) + { + #if !defined(VGO_darwin) +-# if defined(VGP_ppc64_linux) ++# if defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + Addr r2; + # endif + Addr __libc_freeres_wrapper = VG_(client___libc_freeres_wrapper); +@@ -2579,7 +2580,7 @@ static void final_tidyup(ThreadId tid) + 0 == __libc_freeres_wrapper ) + return; /* can't/won't do it */ + +-# if defined(VGP_ppc64_linux) ++# if defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + r2 = VG_(get_tocptr)( __libc_freeres_wrapper ); + if (r2 == 0) { + VG_(message)(Vg_UserMsg, +@@ -2602,7 +2603,7 @@ static void final_tidyup(ThreadId tid) + directly. However, we need to set R2 (the toc pointer) + appropriately. */ + VG_(set_IP)(tid, __libc_freeres_wrapper); +-# if defined(VGP_ppc64_linux) ++# if defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + VG_(threads)[tid].arch.vex.guest_GPR2 = r2; + # endif + /* mips-linux note: we need to set t9 */ +@@ -2799,7 +2800,7 @@ asm("\n" + "\ttrap\n" + ".previous\n" + ); +-#elif defined(VGP_ppc64_linux) ++#elif defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + asm("\n" + /* PPC64 ELF ABI says '_start' points to a function descriptor. + So we must have one, and that is what goes into the .opd section. */ +@@ -3033,7 +3034,8 @@ void _start_in_C_linux ( UWord* pArgc ) + + the_iicii.sp_at_startup = (Addr)pArgc; + +-# if defined(VGP_ppc32_linux) || defined(VGP_ppc64_linux) ++# if defined(VGP_ppc32_linux) || defined(VGP_ppc64_linux) \ ++ || defined(VGP_ppc64le_linux) + { + /* ppc/ppc64 can be configured with different page sizes. + Determine this early. This is an ugly hack and really should +Index: valgrind-3.9.0/coregrind/m_redir.c +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_redir.c ++++ valgrind-3.9.0/coregrind/m_redir.c +@@ -1278,7 +1278,7 @@ void VG_(redir_initialise) ( void ) + ); + } + +-# elif defined(VGP_ppc64_linux) ++# elif defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + /* If we're using memcheck, use these intercepts right from + the start, otherwise ld.so makes a lot of noise. */ + if (0==VG_(strcmp)("Memcheck", VG_(details).name)) { +Index: valgrind-3.9.0/coregrind/m_scheduler/scheduler.c +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_scheduler/scheduler.c ++++ valgrind-3.9.0/coregrind/m_scheduler/scheduler.c +@@ -766,7 +766,7 @@ static void do_pre_run_checks ( ThreadSt + vg_assert(VG_IS_8_ALIGNED(offsetof(VexGuestAMD64State,guest_RIP))); + # endif + +-# if defined(VGA_ppc32) || defined(VGA_ppc64) ++# if defined(VGA_ppc32) || defined(VGA_ppc64) || defined(VGA_ppc64le) + /* ppc guest_state vector regs must be 16 byte aligned for + loads/stores. This is important! */ + vg_assert(VG_IS_16_ALIGNED(& tst->arch.vex.guest_VSR0)); +@@ -1592,7 +1592,7 @@ void VG_(nuke_all_threads_except) ( Thre + #elif defined(VGA_amd64) + # define VG_CLREQ_ARGS guest_RAX + # define VG_CLREQ_RET guest_RDX +-#elif defined(VGA_ppc32) || defined(VGA_ppc64) ++#elif defined(VGA_ppc32) || defined(VGA_ppc64) || defined(VGA_ppc64le) + # define VG_CLREQ_ARGS guest_GPR4 + # define VG_CLREQ_RET guest_GPR3 + #elif defined(VGA_arm) +Index: valgrind-3.9.0/coregrind/m_sigframe/sigframe-ppc64-linux.c +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_sigframe/sigframe-ppc64-linux.c ++++ valgrind-3.9.0/coregrind/m_sigframe/sigframe-ppc64-linux.c +@@ -31,7 +31,7 @@ + The GNU General Public License is contained in the file COPYING. + */ + +-#if defined(VGP_ppc64_linux) ++#if defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + + #include "pub_core_basics.h" + #include "pub_core_vki.h" +@@ -252,7 +252,11 @@ void VG_(sigframe_create)( ThreadId tid, + # undef DO + + frame->uc.uc_mcontext.gp_regs[VKI_PT_NIP] = tst->arch.vex.guest_CIA; ++#ifdef VGP_ppc64le_linux ++ frame->uc.uc_mcontext.gp_regs[VKI_PT_MSR] = 0xf033; /* pretty arbitrary */ ++#else + frame->uc.uc_mcontext.gp_regs[VKI_PT_MSR] = 0xf032; /* pretty arbitrary */ ++#endif + frame->uc.uc_mcontext.gp_regs[VKI_PT_ORIG_R3] = tst->arch.vex.guest_GPR3; + frame->uc.uc_mcontext.gp_regs[VKI_PT_CTR] = tst->arch.vex.guest_CTR; + frame->uc.uc_mcontext.gp_regs[VKI_PT_LNK] = tst->arch.vex.guest_LR; +@@ -388,7 +392,7 @@ void VG_(sigframe_destroy)( ThreadId tid + VG_TRACK( post_deliver_signal, tid, sigNo ); + } + +-#endif // defined(VGP_ppc64_linux) ++#endif // defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + + /*--------------------------------------------------------------------*/ + /*--- end ---*/ +Index: valgrind-3.9.0/coregrind/m_signals.c +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_signals.c ++++ valgrind-3.9.0/coregrind/m_signals.c +@@ -348,7 +348,7 @@ typedef struct SigQueue { + (srP)->misc.PPC32.r_lr = (uc)->uc_regs->mc_gregs[VKI_PT_LNK]; \ + } + +-#elif defined(VGP_ppc64_linux) ++#elif defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + # define VG_UCONTEXT_INSTR_PTR(uc) ((uc)->uc_mcontext.gp_regs[VKI_PT_NIP]) + # define VG_UCONTEXT_STACK_PTR(uc) ((uc)->uc_mcontext.gp_regs[VKI_PT_R1]) + /* Dubious hack: if there is an error, only consider the lowest 8 +@@ -838,7 +838,7 @@ extern void my_sigreturn(void); + " sc\n" \ + ".previous\n" + +-#elif defined(VGP_ppc64_linux) ++#elif defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + # define _MY_SIGRETURN(name) \ + ".align 2\n" \ + ".globl my_sigreturn\n" \ +Index: valgrind-3.9.0/coregrind/m_stacktrace.c +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_stacktrace.c ++++ valgrind-3.9.0/coregrind/m_stacktrace.c +@@ -620,7 +620,8 @@ UInt VG_(get_StackTrace_wrk) ( ThreadId + + /* -----------------------ppc32/64 ---------------------- */ + +-#if defined(VGP_ppc32_linux) || defined(VGP_ppc64_linux) ++#if defined(VGP_ppc32_linux) || defined(VGP_ppc64_linux) \ ++ || defined(VGP_ppc64le_linux) + + UInt VG_(get_StackTrace_wrk) ( ThreadId tid_if_known, + /*OUT*/Addr* ips, UInt max_n_ips, +@@ -648,7 +649,7 @@ UInt VG_(get_StackTrace_wrk) ( ThreadId + Addr fp = sp; + # if defined(VGP_ppc32_linux) + Addr lr = startRegs->misc.PPC32.r_lr; +-# elif defined(VGP_ppc64_linux) ++# elif defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + Addr lr = startRegs->misc.PPC64.r_lr; + # endif + Addr fp_min = sp; +@@ -684,7 +685,7 @@ UInt VG_(get_StackTrace_wrk) ( ThreadId + /* fp is %r1. ip is %cia. Note, ppc uses r1 as both the stack and + frame pointers. */ + +-# if defined(VGP_ppc64_linux) ++# if defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + redir_stack_size = VEX_GUEST_PPC64_REDIR_STACK_SIZE; + redirs_used = 0; + # endif +Index: valgrind-3.9.0/coregrind/m_syscall.c +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_syscall.c ++++ valgrind-3.9.0/coregrind/m_syscall.c +@@ -374,7 +374,7 @@ asm( + ".previous\n" + ); + +-#elif defined(VGP_ppc64_linux) ++#elif defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + /* Due to the need to return 65 bits of result, this is completely + different from the ppc32 case. The single arg register points to a + 7-word block containing the syscall # and the 6 args. The syscall +@@ -680,7 +680,7 @@ SysRes VG_(do_syscall) ( UWord sysno, UW + UInt cr0so = (UInt)(ret); + return VG_(mk_SysRes_ppc32_linux)( val, cr0so ); + +-# elif defined(VGP_ppc64_linux) ++# elif defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + ULong argblock[7]; + argblock[0] = sysno; + argblock[1] = a1; +Index: valgrind-3.9.0/coregrind/m_syswrap/priv_types_n_macros.h +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_syswrap/priv_types_n_macros.h ++++ valgrind-3.9.0/coregrind/m_syswrap/priv_types_n_macros.h +@@ -91,6 +91,7 @@ typedef + Int o_sysno; + # if defined(VGP_x86_linux) || defined(VGP_amd64_linux) \ + || defined(VGP_ppc32_linux) || defined(VGP_ppc64_linux) \ ++ || defined(VGP_ppc64le_linux) \ + || defined(VGP_arm_linux) || defined(VGP_s390x_linux) \ + || defined(VGP_mips64_linux) + Int o_arg1; +Index: valgrind-3.9.0/coregrind/m_syswrap/syscall-ppc64-linux.S +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_syswrap/syscall-ppc64-linux.S ++++ valgrind-3.9.0/coregrind/m_syswrap/syscall-ppc64-linux.S +@@ -27,7 +27,7 @@ + The GNU General Public License is contained in the file COPYING. + */ + +-#if defined(VGP_ppc64_linux) ++#if defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + + #include "pub_core_basics_asm.h" + #include "pub_core_vkiscnums_asm.h" +@@ -165,7 +165,7 @@ ML_(blksys_finished): .quad 5b + /* Let the linker know we don't need an executable stack */ + .section .note.GNU-stack,"",@progbits + +-#endif // defined(VGP_ppc64_linux) ++#endif // defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + + /*--------------------------------------------------------------------*/ + /*--- end ---*/ +Index: valgrind-3.9.0/coregrind/m_syswrap/syswrap-linux.c +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_syswrap/syswrap-linux.c ++++ valgrind-3.9.0/coregrind/m_syswrap/syswrap-linux.c +@@ -242,7 +242,8 @@ static void run_a_thread_NORETURN ( Word + : "n" (VgTs_Empty), "n" (__NR_exit), "m" (tst->os_state.exitcode) + : "rax", "rdi" + ); +-#elif defined(VGP_ppc32_linux) || defined(VGP_ppc64_linux) ++#elif defined(VGP_ppc32_linux) || defined(VGP_ppc64_linux) \ ++ || defined(VGP_ppc64le_linux) + { UInt vgts_empty = (UInt)VgTs_Empty; + asm volatile ( + "stw %1,%0\n\t" /* set tst->status = VgTs_Empty */ +@@ -373,7 +374,7 @@ void VG_(main_thread_wrapper_NORETURN)(T + sp -= 16; + sp &= ~0xF; + *(UWord *)sp = 0; +-#elif defined(VGP_ppc64_linux) ++#elif defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + /* make a stack frame */ + sp -= 112; + sp &= ~((Addr)0xF); +@@ -427,6 +428,7 @@ SysRes ML_(do_fork_clone) ( ThreadId tid + VG_(clone) stuff */ + #if defined(VGP_x86_linux) \ + || defined(VGP_ppc32_linux) || defined(VGP_ppc64_linux) \ ++ || defined(VGP_ppc64le_linux) \ + || defined(VGP_arm_linux) || defined(VGP_mips32_linux) \ + || defined(VGP_mips64_linux) + res = VG_(do_syscall5)( __NR_clone, flags, +Index: valgrind-3.9.0/coregrind/m_syswrap/syswrap-main.c +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_syswrap/syswrap-main.c ++++ valgrind-3.9.0/coregrind/m_syswrap/syswrap-main.c +@@ -440,7 +440,7 @@ void getSyscallArgsFromGuestState ( /*OU + canonical->arg7 = 0; + canonical->arg8 = 0; + +-#elif defined(VGP_ppc64_linux) ++#elif defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + VexGuestPPC64State* gst = (VexGuestPPC64State*)gst_vanilla; + canonical->sysno = gst->guest_GPR0; + canonical->arg1 = gst->guest_GPR3; +@@ -666,7 +666,7 @@ void putSyscallArgsIntoGuestState ( /*IN + gst->guest_GPR7 = canonical->arg5; + gst->guest_GPR8 = canonical->arg6; + +-#elif defined(VGP_ppc64_linux) ++#elif defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + VexGuestPPC64State* gst = (VexGuestPPC64State*)gst_vanilla; + gst->guest_GPR0 = canonical->sysno; + gst->guest_GPR3 = canonical->arg1; +@@ -787,7 +787,7 @@ void getSyscallStatusFromGuestState ( /* + canonical->sres = VG_(mk_SysRes_ppc32_linux)( gst->guest_GPR3, cr0so ); + canonical->what = SsComplete; + +-# elif defined(VGP_ppc64_linux) ++# elif defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + VexGuestPPC64State* gst = (VexGuestPPC64State*)gst_vanilla; + UInt cr = LibVEX_GuestPPC64_get_CR( gst ); + UInt cr0so = (cr >> 28) & 1; +@@ -940,7 +940,7 @@ void putSyscallStatusIntoGuestState ( /* + VG_TRACK( post_reg_write, Vg_CoreSysCall, tid, + OFFSET_ppc32_CR0_0, sizeof(UChar) ); + +-# elif defined(VGP_ppc64_linux) ++# elif defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + VexGuestPPC64State* gst = (VexGuestPPC64State*)gst_vanilla; + UInt old_cr = LibVEX_GuestPPC64_get_CR(gst); + vg_assert(canonical->what == SsComplete); +@@ -1129,7 +1129,7 @@ void getSyscallArgLayout ( /*OUT*/Syscal + layout->uu_arg7 = -1; /* impossible value */ + layout->uu_arg8 = -1; /* impossible value */ + +-#elif defined(VGP_ppc64_linux) ++#elif defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + layout->o_sysno = OFFSET_ppc64_GPR0; + layout->o_arg1 = OFFSET_ppc64_GPR3; + layout->o_arg2 = OFFSET_ppc64_GPR4; +@@ -1943,6 +1943,25 @@ void ML_(fixup_guest_state_to_restart_sy + vg_assert(p[0] == 0x44 && p[1] == 0x0 && p[2] == 0x0 && p[3] == 0x2); + } + ++#elif defined(VGP_ppc64le_linux) ++ arch->vex.guest_CIA -= 4; // sizeof(ppc32 instr) ++ ++ /* Make sure our caller is actually sane, and we're really backing ++ back over a syscall. ++ ++ sc == 44 00 00 02 ++ */ ++ { ++ UChar *p = (UChar *)arch->vex.guest_CIA; ++ ++ if (p[3] != 0x44 || p[2] != 0x0 || p[1] != 0x0 || p[0] != 0x02) ++ VG_(message)(Vg_DebugMsg, ++ "?! restarting over syscall at %#llx %02x %02x %02x %02x\n", ++ arch->vex.guest_CIA + 0ULL, p[3], p[2], p[1], p[0]); ++ ++ vg_assert(p[3] == 0x44 && p[2] == 0x0 && p[1] == 0x0 && p[0] == 0x2); ++ } ++ + #elif defined(VGP_arm_linux) + if (arch->vex.guest_R15T & 1) { + // Thumb mode. SVC is a encoded as +Index: valgrind-3.9.0/coregrind/m_syswrap/syswrap-ppc64-linux.c +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_syswrap/syswrap-ppc64-linux.c ++++ valgrind-3.9.0/coregrind/m_syswrap/syswrap-ppc64-linux.c +@@ -28,7 +28,7 @@ + The GNU General Public License is contained in the file COPYING. + */ + +-#if defined(VGP_ppc64_linux) ++#if defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + + #include "pub_core_basics.h" + #include "pub_core_vki.h" +@@ -1072,7 +1072,7 @@ SyscallTableEntry* ML_(get_linux_syscall + return NULL; + } + +-#endif // defined(VGP_ppc64_linux) ++#endif // defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + + /*--------------------------------------------------------------------*/ + /*--- end ---*/ +Index: valgrind-3.9.0/coregrind/m_trampoline.S +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_trampoline.S ++++ valgrind-3.9.0/coregrind/m_trampoline.S +@@ -416,7 +416,7 @@ VG_(trampoline_stuff_end): + + /*---------------- ppc64-linux ----------------*/ + #else +-#if defined(VGP_ppc64_linux) ++#if defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + + # define UD2_16 trap ; trap ; trap; trap + # define UD2_64 UD2_16 ; UD2_16 ; UD2_16 ; UD2_16 +Index: valgrind-3.9.0/coregrind/m_translate.c +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_translate.c ++++ valgrind-3.9.0/coregrind/m_translate.c +@@ -941,7 +941,7 @@ static void gen_PUSH ( IRSB* bb, IRExpr* + IRTemp t1; + IRExpr* one; + +-# if defined(VGP_ppc64_linux) ++# if defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + Int stack_size = VEX_GUEST_PPC64_REDIR_STACK_SIZE; + Int offB_REDIR_SP = offsetof(VexGuestPPC64State,guest_REDIR_SP); + Int offB_REDIR_STACK = offsetof(VexGuestPPC64State,guest_REDIR_STACK); +@@ -1035,7 +1035,7 @@ static void gen_PUSH ( IRSB* bb, IRExpr* + + static IRTemp gen_POP ( IRSB* bb ) + { +-# if defined(VGP_ppc64_linux) ++# if defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + Int stack_size = VEX_GUEST_PPC64_REDIR_STACK_SIZE; + Int offB_REDIR_SP = offsetof(VexGuestPPC64State,guest_REDIR_SP); + Int offB_REDIR_STACK = offsetof(VexGuestPPC64State,guest_REDIR_STACK); +@@ -1127,7 +1127,7 @@ static IRTemp gen_POP ( IRSB* bb ) + + static void gen_push_and_set_LR_R2 ( IRSB* bb, Addr64 new_R2_value ) + { +-# if defined(VGP_ppc64_linux) ++# if defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + Addr64 bogus_RA = (Addr64)&VG_(ppctoc_magic_redirect_return_stub); + Int offB_GPR2 = offsetof(VexGuestPPC64State,guest_GPR2); + Int offB_LR = offsetof(VexGuestPPC64State,guest_LR); +@@ -1143,7 +1143,7 @@ static void gen_push_and_set_LR_R2 ( IRS + + static void gen_pop_R2_LR_then_bLR ( IRSB* bb ) + { +-# if defined(VGP_ppc64_linux) ++# if defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + Int offB_GPR2 = offsetof(VexGuestPPC64State,guest_GPR2); + Int offB_LR = offsetof(VexGuestPPC64State,guest_LR); + Int offB_CIA = offsetof(VexGuestPPC64State,guest_CIA); +@@ -1277,7 +1277,7 @@ Bool mk_preamble__set_NRADDR_to_nraddr ( + Int offB_GPR25 = offsetof(VexGuestMIPS64State, guest_r25); + addStmtToIRSB(bb, IRStmt_Put(offB_GPR25, mkU64(closure->readdr))); + # endif +-# if defined(VGP_ppc64_linux) ++# if defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + addStmtToIRSB( + bb, + IRStmt_Put( +@@ -1513,7 +1513,7 @@ Bool VG_(translate) ( ThreadId tid, + vex_abiinfo.guest_ppc_zap_RZ_at_bl = NULL; + vex_abiinfo.host_ppc32_regalign_int64_args = True; + # endif +-# if defined(VGP_ppc64_linux) ++# if defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + vex_abiinfo.guest_ppc_zap_RZ_at_blr = True; + vex_abiinfo.guest_ppc_zap_RZ_at_bl = const_True; + vex_abiinfo.host_ppc_calls_use_fndescrs = True; +Index: valgrind-3.9.0/coregrind/m_ume/elf.c +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_ume/elf.c ++++ valgrind-3.9.0/coregrind/m_ume/elf.c +@@ -511,7 +511,7 @@ Int VG_(load_ELF)(Int fd, const HChar* n + info->exe_base = minaddr + ebase; + info->exe_end = maxaddr + ebase; + +-#if defined(VGP_ppc64_linux) ++#if defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + /* On PPC64, a func ptr is represented by a TOC entry ptr. This + TOC entry contains three words; the first word is the function + address, the second word is the TOC ptr (r2), and the third word +Index: valgrind-3.9.0/coregrind/m_ume/macho.c +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_ume/macho.c ++++ valgrind-3.9.0/coregrind/m_ume/macho.c +@@ -701,6 +701,8 @@ load_fat_file(int fd, vki_off_t offset, + good_arch = CPU_TYPE_POWERPC; + #elif defined(VGA_ppc64) + good_arch = CPU_TYPE_POWERPC64; ++#elif defined(VGA_ppc64le) ++ good_arch = CPU_TYPE_POWERPC64LE; + #elif defined(VGA_x86) + good_arch = CPU_TYPE_I386; + #elif defined(VGA_amd64) +Index: valgrind-3.9.0/coregrind/m_vki.c +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_vki.c ++++ valgrind-3.9.0/coregrind/m_vki.c +@@ -42,7 +42,8 @@ + /* ppc32/64-linux determines page size at startup, hence m_vki is + the logical place to store that info. */ + +-#if defined(VGP_ppc32_linux) || defined(VGP_ppc64_linux) ++#if defined(VGP_ppc32_linux) || defined(VGP_ppc64_linux) \ ++ || defined(VGP_ppc64le_linux) + unsigned long VKI_PAGE_SHIFT = 12; + unsigned long VKI_PAGE_SIZE = 1UL << 12; + #endif +Index: valgrind-3.9.0/coregrind/pub_core_aspacemgr.h +=================================================================== +--- valgrind-3.9.0.orig/coregrind/pub_core_aspacemgr.h ++++ valgrind-3.9.0/coregrind/pub_core_aspacemgr.h +@@ -345,6 +345,7 @@ extern Bool VG_(am_relocate_nooverlap_cl + // protects such stacks. + + #if defined(VGP_ppc32_linux) || defined(VGP_ppc64_linux) \ ++ || defined(VGP_ppc64le_linux) \ + || defined(VGP_mips32_linux) || defined(VGP_mips64_linux) + # define VG_STACK_GUARD_SZB 65536 // 1 or 16 pages + # define VG_STACK_ACTIVE_SZB (4096 * 256) // 1Mb +Index: valgrind-3.9.0/coregrind/pub_core_basics.h +=================================================================== +--- valgrind-3.9.0.orig/coregrind/pub_core_basics.h ++++ valgrind-3.9.0/coregrind/pub_core_basics.h +@@ -54,7 +54,7 @@ + # include "libvex_guest_amd64.h" + #elif defined(VGA_ppc32) + # include "libvex_guest_ppc32.h" +-#elif defined(VGA_ppc64) ++#elif defined(VGA_ppc64) || defined(VGA_ppc64le) + # include "libvex_guest_ppc64.h" + #elif defined(VGA_arm) + # include "libvex_guest_arm.h" +Index: valgrind-3.9.0/coregrind/pub_core_debuginfo.h +=================================================================== +--- valgrind-3.9.0.orig/coregrind/pub_core_debuginfo.h ++++ valgrind-3.9.0/coregrind/pub_core_debuginfo.h +@@ -112,7 +112,7 @@ typedef + typedef + struct { Addr r15; Addr r14; Addr r13; Addr r12; Addr r11; Addr r7; } + D3UnwindRegs; +-#elif defined(VGA_ppc32) || defined(VGA_ppc64) ++#elif defined(VGA_ppc32) || defined(VGA_ppc64) || defined(VGA_ppc64le) + typedef + UChar /* should be void, but gcc complains at use points */ + D3UnwindRegs; +Index: valgrind-3.9.0/coregrind/pub_core_machine.h +=================================================================== +--- valgrind-3.9.0.orig/coregrind/pub_core_machine.h ++++ valgrind-3.9.0/coregrind/pub_core_machine.h +@@ -61,6 +61,11 @@ + # define VG_ELF_MACHINE EM_PPC64 + # define VG_ELF_CLASS ELFCLASS64 + # define VG_PLAT_USES_PPCTOC 1 ++#elif defined(VGP_ppc64le_linux) ++# define VG_ELF_DATA2XXX ELFDATA2LSB ++# define VG_ELF_MACHINE EM_PPC64 ++# define VG_ELF_CLASS ELFCLASS64 ++# define VG_PLAT_USES_PPCTOC 1 + #elif defined(VGP_arm_linux) + # define VG_ELF_DATA2XXX ELFDATA2LSB + # define VG_ELF_MACHINE EM_ARM +@@ -114,7 +119,7 @@ + # define VG_INSTR_PTR guest_CIA + # define VG_STACK_PTR guest_GPR1 + # define VG_FRAME_PTR guest_GPR1 // No frame ptr for PPC +-#elif defined(VGA_ppc64) ++#elif defined(VGA_ppc64) || defined(VGA_ppc64le) + # define VG_INSTR_PTR guest_CIA + # define VG_STACK_PTR guest_GPR1 + # define VG_FRAME_PTR guest_GPR1 // No frame ptr for PPC +@@ -224,7 +229,7 @@ extern Bool VG_(machine_get_cache_info)( + extern void VG_(machine_ppc32_set_clszB)( Int ); + #endif + +-#if defined(VGA_ppc64) ++#if defined(VGA_ppc64) || defined(VGA_ppc64le) + extern void VG_(machine_ppc64_set_clszB)( Int ); + #endif + +@@ -256,7 +261,7 @@ extern UInt VG_(machine_ppc32_has_VMX); + /* PPC64: set to 1 if Altivec instructions are supported in + user-space, else 0. Is referenced from assembly code, so do not + change from a 64-bit int. */ +-#if defined(VGA_ppc64) ++#if defined(VGA_ppc64) || defined(VGA_ppc64le) + extern ULong VG_(machine_ppc64_has_VMX); + #endif + +Index: valgrind-3.9.0/coregrind/pub_core_mallocfree.h +=================================================================== +--- valgrind-3.9.0.orig/coregrind/pub_core_mallocfree.h ++++ valgrind-3.9.0/coregrind/pub_core_mallocfree.h +@@ -74,6 +74,7 @@ typedef Int ArenaId; + #elif defined(VGP_amd64_linux) || \ + defined(VGP_ppc32_linux) || \ + defined(VGP_ppc64_linux) || \ ++ defined(VGP_ppc64le_linux) || \ + defined(VGP_s390x_linux) || \ + defined(VGP_mips64_linux) || \ + defined(VGP_x86_darwin) || \ +Index: valgrind-3.9.0/coregrind/pub_core_threadstate.h +=================================================================== +--- valgrind-3.9.0.orig/coregrind/pub_core_threadstate.h ++++ valgrind-3.9.0/coregrind/pub_core_threadstate.h +@@ -84,7 +84,7 @@ typedef + typedef VexGuestAMD64State VexGuestArchState; + #elif defined(VGA_ppc32) + typedef VexGuestPPC32State VexGuestArchState; +-#elif defined(VGA_ppc64) ++#elif defined(VGA_ppc64) || defined(VGA_ppc64le) + typedef VexGuestPPC64State VexGuestArchState; + #elif defined(VGA_arm) + typedef VexGuestARMState VexGuestArchState; +Index: valgrind-3.9.0/coregrind/pub_core_trampoline.h +=================================================================== +--- valgrind-3.9.0.orig/coregrind/pub_core_trampoline.h ++++ valgrind-3.9.0/coregrind/pub_core_trampoline.h +@@ -81,7 +81,7 @@ extern UInt VG_(ppc32_linux_REDIR_FOR_s + extern void* VG_(ppc32_linux_REDIR_FOR_strchr)( void*, Int ); + #endif + +-#if defined(VGP_ppc64_linux) ++#if defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + extern Addr VG_(ppc64_linux_SUBST_FOR_rt_sigreturn); + extern UInt VG_(ppc64_linux_REDIR_FOR_strlen)( void* ); + extern void* VG_(ppc64_linux_REDIR_FOR_strchr)( void*, Int ); +Index: valgrind-3.9.0/coregrind/pub_core_transtab_asm.h +=================================================================== +--- valgrind-3.9.0.orig/coregrind/pub_core_transtab_asm.h ++++ valgrind-3.9.0/coregrind/pub_core_transtab_asm.h +@@ -62,8 +62,8 @@ + #elif defined(VGA_s390x) || defined(VGA_arm) + # define VG_TT_FAST_HASH(_addr) ((((UWord)(_addr)) >> 1) & VG_TT_FAST_MASK) + +-#elif defined(VGA_ppc32) || defined(VGA_ppc64) || defined(VGA_mips32) \ +- || defined(VGA_mips64) ++#elif defined(VGA_ppc32) || defined(VGA_ppc64) || defined(VGA_ppc64le) \ ++ || defined(VGA_mips32) || defined(VGA_mips64) + # define VG_TT_FAST_HASH(_addr) ((((UWord)(_addr)) >> 2) & VG_TT_FAST_MASK) + + #else +Index: valgrind-3.9.0/coregrind/vgdb.c +=================================================================== +--- valgrind-3.9.0.orig/coregrind/vgdb.c ++++ valgrind-3.9.0/coregrind/vgdb.c +@@ -80,8 +80,8 @@ + can be "waken up". PTRACEINVOKER implies some architecture + specific code and/or some OS specific code. */ + #if defined(VGA_arm) || defined(VGA_x86) || defined(VGA_amd64) \ +- || defined(VGA_ppc32) || defined(VGA_ppc64) || defined(VGA_s390x) \ +- || defined(VGA_mips32) || defined(VGA_mips64) ++ || defined(VGA_ppc32) || defined(VGA_ppc64) || defined(VGA_ppc64le) \ ++ || defined(VGA_s390x) || defined(VGA_mips32) || defined(VGA_mips64) + #define PTRACEINVOKER + #else + I_die_here : (PTRACEINVOKER) architecture missing in vgdb.c +@@ -911,7 +911,7 @@ Bool invoke_gdbserver (int pid) + sp = user_mod.regs.uregs[13]; + #elif defined(VGA_ppc32) + sp = user_mod.regs.gpr[1]; +-#elif defined(VGA_ppc64) ++#elif defined(VGA_ppc64) || defined(VGA_ppc64le) + sp = user_mod.regs.gpr[1]; + #elif defined(VGA_s390x) + sp = user_mod.regs.gprs[15]; +@@ -975,7 +975,7 @@ Bool invoke_gdbserver (int pid) + I_die_here : not x86 or amd64 in x86/amd64 section/ + #endif + +-#elif defined(VGA_ppc32) || defined(VGA_ppc64) ++#elif defined(VGA_ppc32) || defined(VGA_ppc64) || defined(VGA_ppc64le) + user_mod.regs.nip = shared32->invoke_gdbserver; + user_mod.regs.trap = -1L; + /* put check arg in register 3 */ +@@ -1042,7 +1042,7 @@ Bool invoke_gdbserver (int pid) + assert(0); // cannot vgdb a 64 bits executable with a 32 bits exe + #elif defined(VGA_ppc32) + assert(0); // cannot vgdb a 64 bits executable with a 32 bits exe +-#elif defined(VGA_ppc64) ++#elif defined(VGA_ppc64) || defined(VGA_ppc64le) + Addr64 func_addr; + Addr64 toc_addr; + int rw; +Index: valgrind-3.9.0/drd/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/drd/Makefile.in ++++ valgrind-3.9.0/drd/Makefile.in +@@ -472,6 +472,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -520,6 +523,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +@@ -570,6 +574,9 @@ TOOL_LDFLAGS_PPC32_LINUX = \ + TOOL_LDFLAGS_PPC64_LINUX = \ + $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + ++TOOL_LDFLAGS_PPC64LE_LINUX = \ ++ $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++ + TOOL_LDFLAGS_ARM_LINUX = $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M32@ \ + $(am__append_2) + TOOL_LDFLAGS_S390X_LINUX = \ +@@ -615,6 +622,9 @@ LIBREPLACEMALLOC_PPC32_LINUX = \ + LIBREPLACEMALLOC_PPC64_LINUX = \ + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc64-linux.a + ++LIBREPLACEMALLOC_PPC64LE_LINUX = \ ++ $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc64le-linux.a ++ + LIBREPLACEMALLOC_ARM_LINUX = \ + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-arm-linux.a + +@@ -653,6 +663,11 @@ LIBREPLACEMALLOC_LDFLAGS_PPC64_LINUX = \ + $(LIBREPLACEMALLOC_PPC64_LINUX) \ + -Wl,--no-whole-archive + ++LIBREPLACEMALLOC_LDFLAGS_PPC64LE_LINUX = \ ++ -Wl,--whole-archive \ ++ $(LIBREPLACEMALLOC_PPC64LE_LINUX) \ ++ -Wl,--no-whole-archive ++ + LIBREPLACEMALLOC_LDFLAGS_ARM_LINUX = \ + -Wl,--whole-archive \ + $(LIBREPLACEMALLOC_ARM_LINUX) \ +Index: valgrind-3.9.0/drd/drd_bitmap.h +=================================================================== +--- valgrind-3.9.0.orig/drd/drd_bitmap.h ++++ valgrind-3.9.0/drd/drd_bitmap.h +@@ -139,8 +139,8 @@ Addr make_address(const UWord a1, const + #if defined(VGA_x86) || defined(VGA_ppc32) || defined(VGA_arm) \ + || defined(VGA_mips32) + #define BITS_PER_BITS_PER_UWORD 5 +-#elif defined(VGA_amd64) || defined(VGA_ppc64) || defined(VGA_s390x) \ +- || defined(VGA_mips64) ++#elif defined(VGA_amd64) || defined(VGA_ppc64) || defined(VGA_ppc64le) \ ++ || defined(VGA_s390x) || defined(VGA_mips64) + #define BITS_PER_BITS_PER_UWORD 6 + #else + #error Unknown platform. +Index: valgrind-3.9.0/drd/drd_load_store.c +=================================================================== +--- valgrind-3.9.0.orig/drd/drd_load_store.c ++++ valgrind-3.9.0/drd/drd_load_store.c +@@ -43,7 +43,7 @@ + #define STACK_POINTER_OFFSET OFFSET_amd64_RSP + #elif defined(VGA_ppc32) + #define STACK_POINTER_OFFSET OFFSET_ppc32_GPR1 +-#elif defined(VGA_ppc64) ++#elif defined(VGA_ppc64) || defined(VGA_ppc64le) + #define STACK_POINTER_OFFSET OFFSET_ppc64_GPR1 + #elif defined(VGA_arm) + #define STACK_POINTER_OFFSET OFFSET_arm_R13 +Index: valgrind-3.9.0/drd/tests/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/drd/tests/Makefile.in ++++ valgrind-3.9.0/drd/tests/Makefile.in +@@ -696,6 +696,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -744,6 +747,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +Index: valgrind-3.9.0/drd/tests/unit_bitmap.c +=================================================================== +--- valgrind-3.9.0.orig/drd/tests/unit_bitmap.c ++++ valgrind-3.9.0/drd/tests/unit_bitmap.c +@@ -83,7 +83,8 @@ struct { Addr address; SizeT size; BmAcc + { 0x00ffffffULL, 1, eLoad }, + { 0xffffffffULL - (((1 << ADDR_LSB_BITS) + 1) << ADDR_IGNORED_BITS), + 1, eStore }, +-#if defined(VGP_amd64_linux) || defined(VGP_ppc64_linux) ++#if defined(VGP_amd64_linux) || defined(VGP_ppc64_linux) \ ++ || defined(VGP_ppc64le_linux) + { 0xffffffffULL - (1 << ADDR_LSB_BITS << ADDR_IGNORED_BITS), + 1, eStore }, + { 0xffffffffULL, 1, eStore }, +Index: valgrind-3.9.0/exp-bbv/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/exp-bbv/Makefile.in ++++ valgrind-3.9.0/exp-bbv/Makefile.in +@@ -366,6 +366,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -414,6 +417,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +@@ -464,6 +468,9 @@ TOOL_LDFLAGS_PPC32_LINUX = \ + TOOL_LDFLAGS_PPC64_LINUX = \ + $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + ++TOOL_LDFLAGS_PPC64LE_LINUX = \ ++ $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++ + TOOL_LDFLAGS_ARM_LINUX = $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M32@ \ + $(am__append_2) + TOOL_LDFLAGS_S390X_LINUX = \ +@@ -509,6 +516,9 @@ LIBREPLACEMALLOC_PPC32_LINUX = \ + LIBREPLACEMALLOC_PPC64_LINUX = \ + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc64-linux.a + ++LIBREPLACEMALLOC_PPC64LE_LINUX = \ ++ $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc64le-linux.a ++ + LIBREPLACEMALLOC_ARM_LINUX = \ + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-arm-linux.a + +@@ -547,6 +557,11 @@ LIBREPLACEMALLOC_LDFLAGS_PPC64_LINUX = \ + $(LIBREPLACEMALLOC_PPC64_LINUX) \ + -Wl,--no-whole-archive + ++LIBREPLACEMALLOC_LDFLAGS_PPC64LE_LINUX = \ ++ -Wl,--whole-archive \ ++ $(LIBREPLACEMALLOC_PPC64LE_LINUX) \ ++ -Wl,--no-whole-archive ++ + LIBREPLACEMALLOC_LDFLAGS_ARM_LINUX = \ + -Wl,--whole-archive \ + $(LIBREPLACEMALLOC_ARM_LINUX) \ +Index: valgrind-3.9.0/exp-bbv/tests/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/exp-bbv/tests/Makefile.in ++++ valgrind-3.9.0/exp-bbv/tests/Makefile.in +@@ -354,6 +354,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -402,6 +405,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +Index: valgrind-3.9.0/exp-bbv/tests/amd64-linux/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/exp-bbv/tests/amd64-linux/Makefile.in ++++ valgrind-3.9.0/exp-bbv/tests/amd64-linux/Makefile.in +@@ -343,6 +343,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -391,6 +394,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +Index: valgrind-3.9.0/exp-bbv/tests/arm-linux/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/exp-bbv/tests/arm-linux/Makefile.in ++++ valgrind-3.9.0/exp-bbv/tests/arm-linux/Makefile.in +@@ -326,6 +326,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -374,6 +377,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +Index: valgrind-3.9.0/exp-bbv/tests/ppc32-linux/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/exp-bbv/tests/ppc32-linux/Makefile.in ++++ valgrind-3.9.0/exp-bbv/tests/ppc32-linux/Makefile.in +@@ -326,6 +326,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -374,6 +377,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +Index: valgrind-3.9.0/exp-bbv/tests/x86-linux/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/exp-bbv/tests/x86-linux/Makefile.in ++++ valgrind-3.9.0/exp-bbv/tests/x86-linux/Makefile.in +@@ -326,6 +326,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -374,6 +377,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +Index: valgrind-3.9.0/exp-bbv/tests/x86/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/exp-bbv/tests/x86/Makefile.in ++++ valgrind-3.9.0/exp-bbv/tests/x86/Makefile.in +@@ -335,6 +335,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -383,6 +386,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +Index: valgrind-3.9.0/exp-dhat/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/exp-dhat/Makefile.in ++++ valgrind-3.9.0/exp-dhat/Makefile.in +@@ -390,6 +390,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -438,6 +441,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +@@ -488,6 +492,9 @@ TOOL_LDFLAGS_PPC32_LINUX = \ + TOOL_LDFLAGS_PPC64_LINUX = \ + $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + ++TOOL_LDFLAGS_PPC64LE_LINUX = \ ++ $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++ + TOOL_LDFLAGS_ARM_LINUX = $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M32@ \ + $(am__append_2) + TOOL_LDFLAGS_S390X_LINUX = \ +@@ -533,6 +540,9 @@ LIBREPLACEMALLOC_PPC32_LINUX = \ + LIBREPLACEMALLOC_PPC64_LINUX = \ + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc64-linux.a + ++LIBREPLACEMALLOC_PPC64LE_LINUX = \ ++ $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc64le-linux.a ++ + LIBREPLACEMALLOC_ARM_LINUX = \ + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-arm-linux.a + +@@ -571,6 +581,11 @@ LIBREPLACEMALLOC_LDFLAGS_PPC64_LINUX = \ + $(LIBREPLACEMALLOC_PPC64_LINUX) \ + -Wl,--no-whole-archive + ++LIBREPLACEMALLOC_LDFLAGS_PPC64LE_LINUX = \ ++ -Wl,--whole-archive \ ++ $(LIBREPLACEMALLOC_PPC64LE_LINUX) \ ++ -Wl,--no-whole-archive ++ + LIBREPLACEMALLOC_LDFLAGS_ARM_LINUX = \ + -Wl,--whole-archive \ + $(LIBREPLACEMALLOC_ARM_LINUX) \ +Index: valgrind-3.9.0/exp-sgcheck/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/exp-sgcheck/Makefile.in ++++ valgrind-3.9.0/exp-sgcheck/Makefile.in +@@ -409,6 +409,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -457,6 +460,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +@@ -507,6 +511,9 @@ TOOL_LDFLAGS_PPC32_LINUX = \ + TOOL_LDFLAGS_PPC64_LINUX = \ + $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + ++TOOL_LDFLAGS_PPC64LE_LINUX = \ ++ $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++ + TOOL_LDFLAGS_ARM_LINUX = $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M32@ \ + $(am__append_2) + TOOL_LDFLAGS_S390X_LINUX = \ +@@ -552,6 +559,9 @@ LIBREPLACEMALLOC_PPC32_LINUX = \ + LIBREPLACEMALLOC_PPC64_LINUX = \ + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc64-linux.a + ++LIBREPLACEMALLOC_PPC64LE_LINUX = \ ++ $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc64le-linux.a ++ + LIBREPLACEMALLOC_ARM_LINUX = \ + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-arm-linux.a + +@@ -590,6 +600,11 @@ LIBREPLACEMALLOC_LDFLAGS_PPC64_LINUX = \ + $(LIBREPLACEMALLOC_PPC64_LINUX) \ + -Wl,--no-whole-archive + ++LIBREPLACEMALLOC_LDFLAGS_PPC64LE_LINUX = \ ++ -Wl,--whole-archive \ ++ $(LIBREPLACEMALLOC_PPC64LE_LINUX) \ ++ -Wl,--no-whole-archive ++ + LIBREPLACEMALLOC_LDFLAGS_ARM_LINUX = \ + -Wl,--whole-archive \ + $(LIBREPLACEMALLOC_ARM_LINUX) \ +Index: valgrind-3.9.0/exp-sgcheck/tests/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/exp-sgcheck/tests/Makefile.in ++++ valgrind-3.9.0/exp-sgcheck/tests/Makefile.in +@@ -351,6 +351,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -399,6 +402,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +Index: valgrind-3.9.0/gdbserver_tests/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/gdbserver_tests/Makefile.in ++++ valgrind-3.9.0/gdbserver_tests/Makefile.in +@@ -361,6 +361,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -409,6 +412,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +Index: valgrind-3.9.0/helgrind/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/helgrind/Makefile.in ++++ valgrind-3.9.0/helgrind/Makefile.in +@@ -439,6 +439,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -487,6 +490,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +@@ -537,6 +541,9 @@ TOOL_LDFLAGS_PPC32_LINUX = \ + TOOL_LDFLAGS_PPC64_LINUX = \ + $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + ++TOOL_LDFLAGS_PPC64LE_LINUX = \ ++ $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++ + TOOL_LDFLAGS_ARM_LINUX = $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M32@ \ + $(am__append_2) + TOOL_LDFLAGS_S390X_LINUX = \ +@@ -582,6 +589,9 @@ LIBREPLACEMALLOC_PPC32_LINUX = \ + LIBREPLACEMALLOC_PPC64_LINUX = \ + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc64-linux.a + ++LIBREPLACEMALLOC_PPC64LE_LINUX = \ ++ $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc64le-linux.a ++ + LIBREPLACEMALLOC_ARM_LINUX = \ + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-arm-linux.a + +@@ -620,6 +630,11 @@ LIBREPLACEMALLOC_LDFLAGS_PPC64_LINUX = \ + $(LIBREPLACEMALLOC_PPC64_LINUX) \ + -Wl,--no-whole-archive + ++LIBREPLACEMALLOC_LDFLAGS_PPC64LE_LINUX = \ ++ -Wl,--whole-archive \ ++ $(LIBREPLACEMALLOC_PPC64LE_LINUX) \ ++ -Wl,--no-whole-archive ++ + LIBREPLACEMALLOC_LDFLAGS_ARM_LINUX = \ + -Wl,--whole-archive \ + $(LIBREPLACEMALLOC_ARM_LINUX) \ +Index: valgrind-3.9.0/helgrind/tests/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/helgrind/tests/Makefile.in ++++ valgrind-3.9.0/helgrind/tests/Makefile.in +@@ -567,6 +567,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -615,6 +618,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +Index: valgrind-3.9.0/helgrind/tests/annotate_hbefore.c +=================================================================== +--- valgrind-3.9.0.orig/helgrind/tests/annotate_hbefore.c ++++ valgrind-3.9.0/helgrind/tests/annotate_hbefore.c +@@ -20,7 +20,7 @@ + + typedef unsigned long int UWord; + +-#if defined(VGA_ppc64) ++#if defined(VGA_ppc64) || defined(VGA_ppc64le) + + // ppc64 + /* return 1 if success, 0 if failure */ +Index: valgrind-3.9.0/include/pub_tool_basics.h +=================================================================== +--- valgrind-3.9.0.orig/include/pub_tool_basics.h ++++ valgrind-3.9.0/include/pub_tool_basics.h +@@ -269,7 +269,8 @@ static inline Bool sr_EQ ( SysRes sr1, S + #undef VG_LITTLEENDIAN + + #if defined(VGA_x86) || defined(VGA_amd64) || defined (VGA_arm) \ +- || ((defined(VGA_mips32) || defined(VGA_mips64)) && defined (_MIPSEL)) ++ || ((defined(VGA_mips32) || defined(VGA_mips64)) && defined (_MIPSEL)) \ ++ || defined(VGA_ppc64le) + # define VG_LITTLEENDIAN 1 + #elif defined(VGA_ppc32) || defined(VGA_ppc64) || defined(VGA_s390x) \ + || ((defined(VGA_mips32) || defined(VGA_mips64)) && defined (_MIPSEB)) +@@ -281,8 +282,8 @@ static inline Bool sr_EQ ( SysRes sr1, S + /* Regparmness */ + #if defined(VGA_x86) + # define VG_REGPARM(n) __attribute__((regparm(n))) +-#elif defined(VGA_amd64) || defined(VGA_ppc32) \ +- || defined(VGA_ppc64) || defined(VGA_arm) || defined(VGA_s390x) \ ++#elif defined(VGA_amd64) || defined(VGA_ppc32) || defined(VGA_ppc64) \ ++ || defined(VGA_ppc64le) || defined(VGA_arm) || defined(VGA_s390x) \ + || defined(VGA_mips32) || defined(VGA_mips64) + # define VG_REGPARM(n) /* */ + #else +Index: valgrind-3.9.0/include/pub_tool_libcsetjmp.h +=================================================================== +--- valgrind-3.9.0.orig/include/pub_tool_libcsetjmp.h ++++ valgrind-3.9.0/include/pub_tool_libcsetjmp.h +@@ -82,7 +82,7 @@ __attribute__((noreturn)) + void VG_MINIMAL_LONGJMP(VG_MINIMAL_JMP_BUF(_env)); + + +-#elif defined(VGP_ppc64_linux) ++#elif defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + + #define VG_MINIMAL_JMP_BUF(_name) ULong _name [32+1+1] + __attribute__((returns_twice)) +Index: valgrind-3.9.0/include/pub_tool_machine.h +=================================================================== +--- valgrind-3.9.0.orig/include/pub_tool_machine.h ++++ valgrind-3.9.0/include/pub_tool_machine.h +@@ -53,7 +53,7 @@ + # define VG_CLREQ_SZB 20 + # define VG_STACK_REDZONE_SZB 0 + +-#elif defined(VGP_ppc64_linux) ++#elif defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + # define VG_MIN_INSTR_SZB 4 + # define VG_MAX_INSTR_SZB 4 + # define VG_CLREQ_SZB 20 +Index: valgrind-3.9.0/include/pub_tool_vkiscnums_asm.h +=================================================================== +--- valgrind-3.9.0.orig/include/pub_tool_vkiscnums_asm.h ++++ valgrind-3.9.0/include/pub_tool_vkiscnums_asm.h +@@ -42,7 +42,7 @@ + #elif defined(VGP_ppc32_linux) + # include "vki/vki-scnums-ppc32-linux.h" + +-#elif defined(VGP_ppc64_linux) ++#elif defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + # include "vki/vki-scnums-ppc64-linux.h" + + #elif defined(VGP_s390x_linux) +Index: valgrind-3.9.0/include/vki/vki-linux.h +=================================================================== +--- valgrind-3.9.0.orig/include/vki/vki-linux.h ++++ valgrind-3.9.0/include/vki/vki-linux.h +@@ -85,7 +85,7 @@ + # include "vki-posixtypes-amd64-linux.h" + #elif defined(VGA_ppc32) + # include "vki-posixtypes-ppc32-linux.h" +-#elif defined(VGA_ppc64) ++#elif defined(VGA_ppc64) || defined(VGA_ppc64le) + # include "vki-posixtypes-ppc64-linux.h" + #elif defined(VGA_arm) + # include "vki-posixtypes-arm-linux.h" +@@ -209,7 +209,7 @@ typedef unsigned int vki_uint; + # include "vki-amd64-linux.h" + #elif defined(VGA_ppc32) + # include "vki-ppc32-linux.h" +-#elif defined(VGA_ppc64) ++#elif defined(VGA_ppc64) || defined(VGA_ppc64le) + # include "vki-ppc64-linux.h" + #elif defined(VGA_arm) + # include "vki-arm-linux.h" +Index: valgrind-3.9.0/lackey/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/lackey/Makefile.in ++++ valgrind-3.9.0/lackey/Makefile.in +@@ -366,6 +366,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -414,6 +417,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +@@ -464,6 +468,9 @@ TOOL_LDFLAGS_PPC32_LINUX = \ + TOOL_LDFLAGS_PPC64_LINUX = \ + $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + ++TOOL_LDFLAGS_PPC64LE_LINUX = \ ++ $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++ + TOOL_LDFLAGS_ARM_LINUX = $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M32@ \ + $(am__append_2) + TOOL_LDFLAGS_S390X_LINUX = \ +@@ -509,6 +516,9 @@ LIBREPLACEMALLOC_PPC32_LINUX = \ + LIBREPLACEMALLOC_PPC64_LINUX = \ + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc64-linux.a + ++LIBREPLACEMALLOC_PPC64LE_LINUX = \ ++ $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc64le-linux.a ++ + LIBREPLACEMALLOC_ARM_LINUX = \ + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-arm-linux.a + +@@ -547,6 +557,11 @@ LIBREPLACEMALLOC_LDFLAGS_PPC64_LINUX = \ + $(LIBREPLACEMALLOC_PPC64_LINUX) \ + -Wl,--no-whole-archive + ++LIBREPLACEMALLOC_LDFLAGS_PPC64LE_LINUX = \ ++ -Wl,--whole-archive \ ++ $(LIBREPLACEMALLOC_PPC64LE_LINUX) \ ++ -Wl,--no-whole-archive ++ + LIBREPLACEMALLOC_LDFLAGS_ARM_LINUX = \ + -Wl,--whole-archive \ + $(LIBREPLACEMALLOC_ARM_LINUX) \ +Index: valgrind-3.9.0/massif/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/massif/Makefile.in ++++ valgrind-3.9.0/massif/Makefile.in +@@ -421,6 +421,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -469,6 +472,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +@@ -519,6 +523,9 @@ TOOL_LDFLAGS_PPC32_LINUX = \ + TOOL_LDFLAGS_PPC64_LINUX = \ + $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + ++TOOL_LDFLAGS_PPC64LE_LINUX = \ ++ $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++ + TOOL_LDFLAGS_ARM_LINUX = $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M32@ \ + $(am__append_2) + TOOL_LDFLAGS_S390X_LINUX = \ +@@ -564,6 +571,9 @@ LIBREPLACEMALLOC_PPC32_LINUX = \ + LIBREPLACEMALLOC_PPC64_LINUX = \ + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc64-linux.a + ++LIBREPLACEMALLOC_PPC64LE_LINUX = \ ++ $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc64le-linux.a ++ + LIBREPLACEMALLOC_ARM_LINUX = \ + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-arm-linux.a + +@@ -602,6 +612,11 @@ LIBREPLACEMALLOC_LDFLAGS_PPC64_LINUX = \ + $(LIBREPLACEMALLOC_PPC64_LINUX) \ + -Wl,--no-whole-archive + ++LIBREPLACEMALLOC_LDFLAGS_PPC64LE_LINUX = \ ++ -Wl,--whole-archive \ ++ $(LIBREPLACEMALLOC_PPC64LE_LINUX) \ ++ -Wl,--no-whole-archive ++ + LIBREPLACEMALLOC_LDFLAGS_ARM_LINUX = \ + -Wl,--whole-archive \ + $(LIBREPLACEMALLOC_ARM_LINUX) \ +Index: valgrind-3.9.0/massif/tests/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/massif/tests/Makefile.in ++++ valgrind-3.9.0/massif/tests/Makefile.in +@@ -404,6 +404,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -452,6 +455,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +Index: valgrind-3.9.0/memcheck/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/memcheck/Makefile.in ++++ valgrind-3.9.0/memcheck/Makefile.in +@@ -439,6 +439,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -487,6 +490,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +@@ -537,6 +541,9 @@ TOOL_LDFLAGS_PPC32_LINUX = \ + TOOL_LDFLAGS_PPC64_LINUX = \ + $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + ++TOOL_LDFLAGS_PPC64LE_LINUX = \ ++ $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++ + TOOL_LDFLAGS_ARM_LINUX = $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M32@ \ + $(am__append_2) + TOOL_LDFLAGS_S390X_LINUX = \ +@@ -582,6 +589,9 @@ LIBREPLACEMALLOC_PPC32_LINUX = \ + LIBREPLACEMALLOC_PPC64_LINUX = \ + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc64-linux.a + ++LIBREPLACEMALLOC_PPC64LE_LINUX = \ ++ $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc64le-linux.a ++ + LIBREPLACEMALLOC_ARM_LINUX = \ + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-arm-linux.a + +@@ -620,6 +630,11 @@ LIBREPLACEMALLOC_LDFLAGS_PPC64_LINUX = \ + $(LIBREPLACEMALLOC_PPC64_LINUX) \ + -Wl,--no-whole-archive + ++LIBREPLACEMALLOC_LDFLAGS_PPC64LE_LINUX = \ ++ -Wl,--whole-archive \ ++ $(LIBREPLACEMALLOC_PPC64LE_LINUX) \ ++ -Wl,--no-whole-archive ++ + LIBREPLACEMALLOC_LDFLAGS_ARM_LINUX = \ + -Wl,--whole-archive \ + $(LIBREPLACEMALLOC_ARM_LINUX) \ +Index: valgrind-3.9.0/memcheck/mc_machine.c +=================================================================== +--- valgrind-3.9.0.orig/memcheck/mc_machine.c ++++ valgrind-3.9.0/memcheck/mc_machine.c +@@ -61,7 +61,7 @@ + # define MC_SIZEOF_GUEST_STATE sizeof(VexGuestPPC32State) + #endif + +-#if defined(VGA_ppc64) ++#if defined(VGA_ppc64) || defined(VGA_ppc64le) + # include "libvex_guest_ppc64.h" + # define MC_SIZEOF_GUEST_STATE sizeof(VexGuestPPC64State) + #endif +@@ -145,7 +145,7 @@ static Int get_otrack_shadow_offset_wrk + { + /* -------------------- ppc64 -------------------- */ + +-# if defined(VGA_ppc64) ++# if defined(VGA_ppc64) || defined(VGA_ppc64le) + + # define GOF(_fieldname) \ + (offsetof(VexGuestPPC64State,guest_##_fieldname)) +@@ -1175,7 +1175,7 @@ static Int get_otrack_shadow_offset_wrk + IRType MC_(get_otrack_reg_array_equiv_int_type) ( IRRegArray* arr ) + { + /* -------------------- ppc64 -------------------- */ +-# if defined(VGA_ppc64) ++# if defined(VGA_ppc64) || defined(VGA_ppc64le) + /* The redir stack. */ + if (arr->base == offsetof(VexGuestPPC64State,guest_REDIR_STACK[0]) + && arr->elemTy == Ity_I64 +Index: valgrind-3.9.0/memcheck/tests/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/memcheck/tests/Makefile.in ++++ valgrind-3.9.0/memcheck/tests/Makefile.in +@@ -85,6 +85,7 @@ DIST_COMMON = $(dist_noinst_SCRIPTS) $(n + @VGCONF_ARCHS_INCLUDE_AMD64_TRUE@am__append_7 = amd64 + @VGCONF_ARCHS_INCLUDE_PPC32_TRUE@am__append_8 = ppc32 + @VGCONF_ARCHS_INCLUDE_PPC64_TRUE@am__append_9 = ppc64 ++@VGCONF_ARCHS_INCLUDE_PPC64LE_TRUE@am__append_9 = ppc64 + @VGCONF_ARCHS_INCLUDE_S390X_TRUE@am__append_10 = s390x + + # OS-specific tests +@@ -995,6 +996,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -1043,6 +1047,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +Index: valgrind-3.9.0/memcheck/tests/amd64-linux/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/memcheck/tests/amd64-linux/Makefile.in ++++ valgrind-3.9.0/memcheck/tests/amd64-linux/Makefile.in +@@ -326,6 +326,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -374,6 +377,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +Index: valgrind-3.9.0/memcheck/tests/amd64/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/memcheck/tests/amd64/Makefile.in ++++ valgrind-3.9.0/memcheck/tests/amd64/Makefile.in +@@ -368,6 +368,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -416,6 +419,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +Index: valgrind-3.9.0/memcheck/tests/atomic_incs.c +=================================================================== +--- valgrind-3.9.0.orig/memcheck/tests/atomic_incs.c ++++ valgrind-3.9.0/memcheck/tests/atomic_incs.c +@@ -62,7 +62,7 @@ __attribute__((noinline)) void atomic_ad + : /*trash*/ "memory", "cc", "r15" + ); + } while (success != 1); +-#elif defined(VGA_ppc64) ++#elif defined(VGA_ppc64) || defined(VGA_ppc64le) + /* Nasty hack. Does correctly atomically do *p += n, but only if p + is 8-aligned -- guaranteed by caller. */ + unsigned long success; +@@ -243,7 +243,7 @@ __attribute__((noinline)) void atomic_ad + : /*trash*/ "memory", "cc", "r15" + ); + } while (success != 1); +-#elif defined(VGA_ppc64) ++#elif defined(VGA_ppc64) || defined(VGA_ppc64le) + /* Nasty hack. Does correctly atomically do *p += n, but only if p + is 8-aligned -- guaranteed by caller. */ + unsigned long success; +@@ -421,7 +421,7 @@ __attribute__((noinline)) void atomic_ad + : /*trash*/ "memory", "cc", "r15" + ); + } while (success != 1); +-#elif defined(VGA_ppc64) ++#elif defined(VGA_ppc64) || defined(VGA_ppc64le) + /* Nasty hack. Does correctly atomically do *p += n, but only if p + is 8-aligned -- guaranteed by caller. */ + unsigned long success; +@@ -520,7 +520,7 @@ __attribute__((noinline)) void atomic_ad + "lock; addq %%rbx,(%%rax)" "\n" + : : "S"(&block[0])/* S means "rsi only" */ : "memory","cc","rax","rbx" + ); +-#elif defined(VGA_ppc64) ++#elif defined(VGA_ppc64) || defined(VGA_ppc64le) + unsigned long success; + do { + __asm__ __volatile__( +Index: valgrind-3.9.0/memcheck/tests/darwin/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/memcheck/tests/darwin/Makefile.in ++++ valgrind-3.9.0/memcheck/tests/darwin/Makefile.in +@@ -346,6 +346,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -394,6 +397,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +Index: valgrind-3.9.0/memcheck/tests/linux/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/memcheck/tests/linux/Makefile.in ++++ valgrind-3.9.0/memcheck/tests/linux/Makefile.in +@@ -372,6 +372,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -420,6 +423,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +@@ -461,7 +465,7 @@ EXTRA_DIST = \ + getregset.stderr.exp getregset.stdout.exp + + stack_switch_LDADD = -lpthread +-timerfd_syscall_LDADD = -lrt ++timerfd_syscall_LDADD = -lrt -lpthread + all: all-am + + .SUFFIXES: +Index: valgrind-3.9.0/memcheck/tests/ppc32/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/memcheck/tests/ppc32/Makefile.in ++++ valgrind-3.9.0/memcheck/tests/ppc32/Makefile.in +@@ -323,6 +323,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -371,6 +374,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +Index: valgrind-3.9.0/memcheck/tests/ppc64/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/memcheck/tests/ppc64/Makefile.in ++++ valgrind-3.9.0/memcheck/tests/ppc64/Makefile.in +@@ -323,6 +323,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -371,6 +374,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +Index: valgrind-3.9.0/memcheck/tests/s390x/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/memcheck/tests/s390x/Makefile.in ++++ valgrind-3.9.0/memcheck/tests/s390x/Makefile.in +@@ -347,6 +347,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -395,6 +398,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +Index: valgrind-3.9.0/memcheck/tests/unit_libcbase.c +=================================================================== +--- valgrind-3.9.0.orig/memcheck/tests/unit_libcbase.c ++++ valgrind-3.9.0/memcheck/tests/unit_libcbase.c +@@ -56,7 +56,8 @@ void test_VG_STREQN(void) + } + + // On PPC/Linux VKI_PAGE_SIZE is a variable, not a macro. +-#if defined(VGP_ppc32_linux) || defined(VGP_ppc64_linux) ++#if defined(VGP_ppc32_linux) || defined(VGP_ppc64_linux) \ ++ || defined(VGP_ppc64le_linux) + unsigned long VKI_PAGE_SIZE = 1UL << 12; + #endif + +Index: valgrind-3.9.0/memcheck/tests/x86-linux/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/memcheck/tests/x86-linux/Makefile.in ++++ valgrind-3.9.0/memcheck/tests/x86-linux/Makefile.in +@@ -346,6 +346,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -394,6 +397,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +Index: valgrind-3.9.0/memcheck/tests/x86/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/memcheck/tests/x86/Makefile.in ++++ valgrind-3.9.0/memcheck/tests/x86/Makefile.in +@@ -373,6 +373,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -421,6 +424,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +Index: valgrind-3.9.0/mpi/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/mpi/Makefile.in ++++ valgrind-3.9.0/mpi/Makefile.in +@@ -338,6 +338,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -386,6 +389,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +Index: valgrind-3.9.0/none/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/none/Makefile.in ++++ valgrind-3.9.0/none/Makefile.in +@@ -364,6 +364,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -412,6 +415,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +@@ -462,6 +466,9 @@ TOOL_LDFLAGS_PPC32_LINUX = \ + TOOL_LDFLAGS_PPC64_LINUX = \ + $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + ++TOOL_LDFLAGS_PPC64LE_LINUX = \ ++ $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++ + TOOL_LDFLAGS_ARM_LINUX = $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M32@ \ + $(am__append_2) + TOOL_LDFLAGS_S390X_LINUX = \ +@@ -507,6 +514,9 @@ LIBREPLACEMALLOC_PPC32_LINUX = \ + LIBREPLACEMALLOC_PPC64_LINUX = \ + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc64-linux.a + ++LIBREPLACEMALLOC_PPC64LE_LINUX = \ ++ $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc64le-linux.a ++ + LIBREPLACEMALLOC_ARM_LINUX = \ + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-arm-linux.a + +@@ -545,6 +555,11 @@ LIBREPLACEMALLOC_LDFLAGS_PPC64_LINUX = \ + $(LIBREPLACEMALLOC_PPC64_LINUX) \ + -Wl,--no-whole-archive + ++LIBREPLACEMALLOC_LDFLAGS_PPC64LE_LINUX = \ ++ -Wl,--whole-archive \ ++ $(LIBREPLACEMALLOC_PPC64LE_LINUX) \ ++ -Wl,--no-whole-archive ++ + LIBREPLACEMALLOC_LDFLAGS_ARM_LINUX = \ + -Wl,--whole-archive \ + $(LIBREPLACEMALLOC_ARM_LINUX) \ +Index: valgrind-3.9.0/none/tests/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/none/tests/Makefile.in ++++ valgrind-3.9.0/none/tests/Makefile.in +@@ -85,6 +85,7 @@ DIST_COMMON = $(dist_noinst_SCRIPTS) $(n + @VGCONF_ARCHS_INCLUDE_AMD64_TRUE@am__append_7 = amd64 + @VGCONF_ARCHS_INCLUDE_PPC32_TRUE@am__append_8 = ppc32 + @VGCONF_ARCHS_INCLUDE_PPC64_TRUE@am__append_9 = ppc64 ++@VGCONF_ARCHS_INCLUDE_PPC64LE_TRUE@am__append_9 = ppc64 + @VGCONF_ARCHS_INCLUDE_ARM_TRUE@am__append_10 = arm + @VGCONF_ARCHS_INCLUDE_S390X_TRUE@am__append_11 = s390x + @VGCONF_ARCHS_INCLUDE_MIPS32_TRUE@am__append_12 = mips32 +@@ -710,6 +711,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -758,6 +762,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +@@ -921,7 +926,7 @@ floored_LDADD = -lm + manythreads_LDADD = -lpthread + @VGCONF_OS_IS_DARWIN_FALSE@nestedfns_CFLAGS = $(AM_CFLAGS) + @VGCONF_OS_IS_DARWIN_TRUE@nestedfns_CFLAGS = $(AM_CFLAGS) -fnested-functions +-@VGCONF_OS_IS_DARWIN_FALSE@mq_LDADD = -lrt ++@VGCONF_OS_IS_DARWIN_FALSE@mq_LDADD = -lrt -lpthread + pth_atfork1_LDADD = -lpthread + pth_blockedsig_LDADD = -lpthread + pth_cancel1_CFLAGS = $(AM_CFLAGS) -Wno-shadow +Index: valgrind-3.9.0/none/tests/amd64/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/none/tests/amd64/Makefile.in ++++ valgrind-3.9.0/none/tests/amd64/Makefile.in +@@ -559,6 +559,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -607,6 +610,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +Index: valgrind-3.9.0/none/tests/arm/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/none/tests/arm/Makefile.in ++++ valgrind-3.9.0/none/tests/arm/Makefile.in +@@ -376,6 +376,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -424,6 +427,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +Index: valgrind-3.9.0/none/tests/darwin/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/none/tests/darwin/Makefile.in ++++ valgrind-3.9.0/none/tests/darwin/Makefile.in +@@ -328,6 +328,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -376,6 +379,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +Index: valgrind-3.9.0/none/tests/linux/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/none/tests/linux/Makefile.in ++++ valgrind-3.9.0/none/tests/linux/Makefile.in +@@ -331,6 +331,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -379,6 +382,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +Index: valgrind-3.9.0/none/tests/mips32/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/none/tests/mips32/Makefile.in ++++ valgrind-3.9.0/none/tests/mips32/Makefile.in +@@ -387,6 +387,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -435,6 +438,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +Index: valgrind-3.9.0/none/tests/ppc32/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/none/tests/ppc32/Makefile.in ++++ valgrind-3.9.0/none/tests/ppc32/Makefile.in +@@ -465,6 +465,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -513,6 +516,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +Index: valgrind-3.9.0/none/tests/ppc64/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/none/tests/ppc64/Makefile.in ++++ valgrind-3.9.0/none/tests/ppc64/Makefile.in +@@ -432,6 +432,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -480,6 +483,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +Index: valgrind-3.9.0/none/tests/s390x/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/none/tests/s390x/Makefile.in ++++ valgrind-3.9.0/none/tests/s390x/Makefile.in +@@ -766,6 +766,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -814,6 +817,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +Index: valgrind-3.9.0/none/tests/x86-linux/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/none/tests/x86-linux/Makefile.in ++++ valgrind-3.9.0/none/tests/x86-linux/Makefile.in +@@ -324,6 +324,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -372,6 +375,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +Index: valgrind-3.9.0/none/tests/x86/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/none/tests/x86/Makefile.in ++++ valgrind-3.9.0/none/tests/x86/Makefile.in +@@ -516,6 +516,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -564,6 +567,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +Index: valgrind-3.9.0/perf/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/perf/Makefile.in ++++ valgrind-3.9.0/perf/Makefile.in +@@ -357,6 +357,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -405,6 +408,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +Index: valgrind-3.9.0/tests/Makefile.in +=================================================================== +--- valgrind-3.9.0.orig/tests/Makefile.in ++++ valgrind-3.9.0/tests/Makefile.in +@@ -346,6 +346,9 @@ AM_CCASFLAGS_PPC32_LINUX = @FLAG_M32@ -g + AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ + AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) + AM_CCASFLAGS_PPC64_LINUX = @FLAG_M64@ -g ++AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@ ++AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) ++AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 +@@ -394,6 +397,7 @@ PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LD + PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ ++PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ + PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ + PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 + PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 +Index: valgrind-3.9.0/tests/arch_test.c +=================================================================== +--- valgrind-3.9.0.orig/tests/arch_test.c ++++ valgrind-3.9.0/tests/arch_test.c +@@ -27,6 +27,7 @@ char* all_archs[] = { + "amd64", + "ppc32", + "ppc64", ++ "ppc64le", + "arm", + "s390x", + "mips32", +@@ -54,6 +55,9 @@ static Bool go(char* arch) + if ( 0 == strcmp( arch, "ppc32" ) ) return True; + #endif + ++#elif defined(VGP_ppc64le_linux) ++ if ( 0 == strcmp( arch, "ppc64" ) ) return True; ++ + #elif defined(VGP_s390x_linux) + if ( 0 == strcmp( arch, "s390x" ) ) return True; + +Index: valgrind-3.9.0/configure.ac +=================================================================== +--- valgrind-3.9.0.orig/configure.ac ++++ valgrind-3.9.0/configure.ac +@@ -179,6 +179,11 @@ case "${host_cpu}" in + ARCH_MAX="ppc64" + ;; + ++ powerpc64le) ++ AC_MSG_RESULT([ok (${host_cpu})]) ++ ARCH_MAX="ppc64le" ++ ;; ++ + powerpc) + # On Linux this means only a 32-bit capable CPU. + AC_MSG_RESULT([ok (${host_cpu})]) +@@ -513,6 +518,17 @@ case "$ARCH_MAX-$VGCONF_OS" in + fi + AC_MSG_RESULT([ok (${ARCH_MAX}-${VGCONF_OS})]) + ;; ++ ppc64le-linux) ++ valt_load_address_sec_norml="0xUNSET" ++ valt_load_address_sec_inner="0xUNSET" ++ VGCONF_ARCH_PRI="ppc64le" ++ VGCONF_ARCH_SEC="" ++ VGCONF_PLATFORM_PRI_CAPS="PPC64LE_LINUX" ++ VGCONF_PLATFORM_SEC_CAPS="" ++ valt_load_address_pri_norml="0x38000000" ++ valt_load_address_pri_inner="0x28000000" ++ AC_MSG_RESULT([ok (${ARCH_MAX}-${VGCONF_OS})]) ++ ;; + # Darwin gets identified as 32-bit even when it supports 64-bit. + # (Not sure why, possibly because 'uname' returns "i386"?) Just about + # all Macs support both 32-bit and 64-bit, so we just build both. If +@@ -623,6 +639,8 @@ AM_CONDITIONAL(VGCONF_ARCHS_INCLUDE_PPC3 + -o x$VGCONF_PLATFORM_SEC_CAPS = xPPC32_LINUX ) + AM_CONDITIONAL(VGCONF_ARCHS_INCLUDE_PPC64, + test x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_LINUX ) ++AM_CONDITIONAL(VGCONF_ARCHS_INCLUDE_PPC64LE, ++ test x$VGCONF_PLATFORM_PRI_CAPS = xPPC64LE_LINUX ) + AM_CONDITIONAL(VGCONF_ARCHS_INCLUDE_ARM, + test x$VGCONF_PLATFORM_PRI_CAPS = xARM_LINUX ) + AM_CONDITIONAL(VGCONF_ARCHS_INCLUDE_S390X, +@@ -644,6 +662,8 @@ AM_CONDITIONAL(VGCONF_PLATFORMS_INCLUDE_ + -o x$VGCONF_PLATFORM_SEC_CAPS = xPPC32_LINUX) + AM_CONDITIONAL(VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX, + test x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_LINUX) ++AM_CONDITIONAL(VGCONF_PLATFORMS_INCLUDE_PPC64LE_LINUX, ++ test x$VGCONF_PLATFORM_PRI_CAPS = xPPC64LE_LINUX) + AM_CONDITIONAL(VGCONF_PLATFORMS_INCLUDE_ARM_LINUX, + test x$VGCONF_PLATFORM_PRI_CAPS = xARM_LINUX) + AM_CONDITIONAL(VGCONF_PLATFORMS_INCLUDE_S390X_LINUX, +@@ -669,6 +689,7 @@ AM_CONDITIONAL(VGCONF_OS_IS_LINUX, + -o x$VGCONF_PLATFORM_PRI_CAPS = xAMD64_LINUX \ + -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_LINUX \ + -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_LINUX \ ++ -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC64LE_LINUX \ + -o x$VGCONF_PLATFORM_PRI_CAPS = xARM_LINUX \ + -o x$VGCONF_PLATFORM_PRI_CAPS = xS390X_LINUX \ + -o x$VGCONF_PLATFORM_PRI_CAPS = xMIPS32_LINUX \ +@@ -2406,6 +2427,7 @@ if test x$VGCONF_PLATFORM_PRI_CAPS = xX8 + mflag_primary=$FLAG_M32 + elif test x$VGCONF_PLATFORM_PRI_CAPS = xAMD64_LINUX \ + -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC64_LINUX \ ++ -o x$VGCONF_PLATFORM_PRI_CAPS = xPPC64LE_LINUX \ + -o x$VGCONF_PLATFORM_PRI_CAPS = xS390X_LINUX ; then + mflag_primary=$FLAG_M64 + elif test x$VGCONF_PLATFORM_PRI_CAPS = xX86_DARWIN ; then diff --git a/valgrind-3.9.0-ppc64le-abiv2.patch b/valgrind-3.9.0-ppc64le-abiv2.patch new file mode 100644 index 0000000..c69c6de --- /dev/null +++ b/valgrind-3.9.0-ppc64le-abiv2.patch @@ -0,0 +1,438 @@ +Subject: valgrind 3.9.0 ppc64le abiv2 +From: Guy Menanteau + +more changes for ppc64le arch now that ABI V2 is supported. +This is a complement of previous valgrind-3.9.0-merge.patches.from.Paul.McKenney.patch + +Signed-off-by: Guy Menanteau +Signed-off-by: Michel Normand +--- + coregrind/m_dispatch/dispatch-ppc64-linux.S | 57 +++++++++++++++++++++++++++- + coregrind/m_libcsetjmp.c | 13 ++++++ + coregrind/m_main.c | 40 +++++++++++++++++++ + coregrind/m_signals.c | 2 + coregrind/m_syscall.c | 6 ++ + coregrind/m_syswrap/syscall-ppc64-linux.S | 6 ++ + coregrind/m_syswrap/syswrap-ppc64-linux.c | 12 +++++ + coregrind/m_trampoline.S | 16 +++++++ + 8 files changed, 149 insertions(+), 3 deletions(-) + +Index: valgrind-3.9.0/coregrind/m_main.c +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_main.c ++++ valgrind-3.9.0/coregrind/m_main.c +@@ -2800,7 +2800,7 @@ asm("\n" + "\ttrap\n" + ".previous\n" + ); +-#elif defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) ++#elif defined(VGP_ppc64_linux) || (defined(VGP_ppc64le_linux) && _CALL_ELF != 2) + asm("\n" + /* PPC64 ELF ABI says '_start' points to a function descriptor. + So we must have one, and that is what goes into the .opd section. */ +@@ -2819,6 +2819,44 @@ asm("\n" + "\tori 16,16,vgPlain_interim_stack@higher\n" + "\tsldi 16,16,32\n" + "\toris 16,16,vgPlain_interim_stack@h\n" ++ "\tori 16,16,vgPlain_interim_stack@l\n" ++ "\txor 17,17,17\n" ++ "\tlis 17,("VG_STRINGIFY(VG_STACK_GUARD_SZB)" >> 16)\n" ++ "\tori 17,17,("VG_STRINGIFY(VG_STACK_GUARD_SZB)" & 0xFFFF)\n" ++ "\txor 18,18,18\n" ++ "\tlis 18,("VG_STRINGIFY(VG_STACK_ACTIVE_SZB)" >> 16)\n" ++ "\tori 18,18,("VG_STRINGIFY(VG_STACK_ACTIVE_SZB)" & 0xFFFF)\n" ++ "\tadd 16,17,16\n" ++ "\tadd 16,18,16\n" ++ "\trldicr 16,16,0,59\n" ++ /* now r16 = &vgPlain_interim_stack + VG_STACK_GUARD_SZB + ++ VG_STACK_ACTIVE_SZB rounded down to the nearest 16-byte ++ boundary. And r1 is the original SP. Set the SP to r16 and ++ call _start_in_C_linux, passing it the initial SP. */ ++ "\tmr 3,1\n" ++ "\tmr 1,16\n" ++ "\tlis 14, _start_in_C_linux@highest\n" ++ "\tori 14,14,_start_in_C_linux@higher\n" ++ "\tsldi 14,14,32\n" ++ "\toris 14,14,_start_in_C_linux@h\n" ++ "\tori 14,14,_start_in_C_linux@l\n" ++ "\tld 14,0(14)\n" ++ "\tmtctr 14\n" ++ "\tbctrl\n" ++ "\tnop\n" ++ "\ttrap\n" ++); ++#elif defined(VGP_ppc64le_linux) && _CALL_ELF == 2 ++asm("\n" ++ ".text\n" ++ "\t.globl _start\n" ++ "\t.type _start,@function\n" ++ "_start:\n" ++ /* set up the new stack in r16 */ ++ "\tlis 16,vgPlain_interim_stack@ha\n" ++ "\tori 16,16,vgPlain_interim_stack@higher\n" ++ "\tsldi 16,16,32\n" ++ "\toris 16,16,vgPlain_interim_stack@h\n" + "\tori 16,16,vgPlain_interim_stack@l\n" + "\txor 17,17,17\n" + "\tlis 17,("VG_STRINGIFY(VG_STACK_GUARD_SZB)" >> 16)\n" +Index: valgrind-3.9.0/coregrind/m_signals.c +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_signals.c ++++ valgrind-3.9.0/coregrind/m_signals.c +@@ -829,7 +829,7 @@ extern void my_sigreturn(void); + " syscall\n" \ + ".previous\n" + +-#elif defined(VGP_ppc32_linux) ++#elif defined(VGP_ppc32_linux) || (defined(VGP_ppc64le_linux) && _CALL_ELF == 2) + # define _MY_SIGRETURN(name) \ + ".text\n" \ + ".globl my_sigreturn\n" \ +Index: valgrind-3.9.0/coregrind/m_libcsetjmp.c +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_libcsetjmp.c ++++ valgrind-3.9.0/coregrind/m_libcsetjmp.c +@@ -152,6 +152,7 @@ __asm__( + #if defined(VGP_ppc64_linux) || defined(VGP_ppc64le_linux) + + __asm__( ++#if _CALL_ELF != 2 + ".section \".toc\",\"aw\"" "\n" + + ".section \".text\"" "\n" +@@ -167,6 +168,13 @@ __asm__( + + ".type VG_MINIMAL_SETJMP, @function" "\n" + ".L.VG_MINIMAL_SETJMP:" "\n" ++#else ++".text" "\n" ++"" "\n" ++".global VG_MINIMAL_SETJMP" "\n" // r3 = jmp_buf ++".type VG_MINIMAL_SETJMP, @function" "\n" ++"VG_MINIMAL_SETJMP:" "\n" ++#endif + " std 0, 0(3)" "\n" + " std 1, 8(3)" "\n" + " std 2, 16(3)" "\n" +@@ -211,6 +219,7 @@ __asm__( + + ".globl VG_MINIMAL_LONGJMP" "\n" + ++#if _CALL_ELF != 2 + ".section \".opd\",\"aw\"" "\n" + ".align 3" "\n" + "VG_MINIMAL_LONGJMP:" "\n" +@@ -219,6 +228,10 @@ __asm__( + + ".type VG_MINIMAL_LONGJMP, @function" "\n" + ".L.VG_MINIMAL_LONGJMP:" "\n" ++#else ++".type VG_MINIMAL_LONGJMP, @function" "\n" ++"VG_MINIMAL_LONGJMP:" "\n" ++#endif + // do r4 = 1 + // and park it in the restore slot for r3 (the ret reg) + " li 4, 1" "\n" +Index: valgrind-3.9.0/coregrind/m_syscall.c +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_syscall.c ++++ valgrind-3.9.0/coregrind/m_syscall.c +@@ -382,6 +382,7 @@ asm( + bottom bit of [1]. */ + extern void do_syscall_WRK ( ULong* argblock ); + asm( ++#if _CALL_ELF != 2 + ".align 2\n" + ".globl do_syscall_WRK\n" + ".section \".opd\",\"aw\"\n" +@@ -392,6 +393,11 @@ asm( + ".type .do_syscall_WRK,@function\n" + ".globl .do_syscall_WRK\n" + ".do_syscall_WRK:\n" ++#else ++".globl do_syscall_WRK\n" ++".type do_syscall_WRK,@function\n" ++"do_syscall_WRK:\n" ++#endif + " std 3,-16(1)\n" /* stash arg */ + " ld 8, 48(3)\n" /* sc arg 6 */ + " ld 7, 40(3)\n" /* sc arg 5 */ +Index: valgrind-3.9.0/coregrind/m_trampoline.S +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_trampoline.S ++++ valgrind-3.9.0/coregrind/m_trampoline.S +@@ -441,6 +441,13 @@ VG_(ppc64_linux_SUBST_FOR_rt_sigreturn): + VG_(ppctoc_magic_redirect_return_stub): + trap + ++#if _CALL_ELF == 2 ++ .globl VG_(ppc64_linux_REDIR_FOR_strlen) ++ .size VG_(ppc64_linux_REDIR_FOR_strlen), \ ++ .L0end-VG_(ppc64_linux_REDIR_FOR_strlen) ++ .type VG_(ppc64_linux_REDIR_FOR_strlen), @function ++VG_(ppc64_linux_REDIR_FOR_strlen): ++#else + /* this function is written using the "dotless" ABI convention */ + .align 2 + .globl VG_(ppc64_linux_REDIR_FOR_strlen) +@@ -454,6 +461,7 @@ VG_(ppc64_linux_REDIR_FOR_strlen): + .type VG_(ppc64_linux_REDIR_FOR_strlen), @function + + .L.VG_(ppc64_linux_REDIR_FOR_strlen): ++#endif + mr 9,3 + lbz 0,0(3) + li 3,0 +@@ -471,6 +479,13 @@ VG_(ppc64_linux_REDIR_FOR_strlen): + .byte 0,0,0,0,0,0,0,0 + .L0end: + ++#if _CALL_ELF == 2 ++ .globl VG_(ppc64_linux_REDIR_FOR_strchr) ++ .size VG_(ppc64_linux_REDIR_FOR_strchr), \ ++ .L1end-VG_(ppc64_linux_REDIR_FOR_strchr) ++ .type VG_(ppc64_linux_REDIR_FOR_strchr),@function ++VG_(ppc64_linux_REDIR_FOR_strchr): ++#else + /* this function is written using the "dotless" ABI convention */ + .align 2 + .globl VG_(ppc64_linux_REDIR_FOR_strchr) +@@ -484,6 +499,7 @@ VG_(ppc64_linux_REDIR_FOR_strchr): + .type VG_(ppc64_linux_REDIR_FOR_strchr),@function + + .L.VG_(ppc64_linux_REDIR_FOR_strchr): ++#endif + lbz 0,0(3) + rldicl 4,4,0,56 + cmpw 7,4,0 +Index: valgrind-3.9.0/coregrind/m_dispatch/dispatch-ppc64-linux.S +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_dispatch/dispatch-ppc64-linux.S ++++ valgrind-3.9.0/coregrind/m_dispatch/dispatch-ppc64-linux.S +@@ -72,6 +72,11 @@ void VG_(disp_run_translations)( UWord* + */ + + .section ".text" ++#if _CALL_ELF == 2 ++.globl VG_(disp_run_translations) ++.type VG_(disp_run_translations),@function ++VG_(disp_run_translations): ++#else + .align 2 + .globl VG_(disp_run_translations) + .section ".opd","aw" +@@ -82,12 +87,27 @@ VG_(disp_run_translations): + .type .VG_(disp_run_translations),@function + .globl .VG_(disp_run_translations) + .VG_(disp_run_translations): ++#endif + /* r3 holds two_words */ + /* r4 holds guest_state */ + /* r5 holds host_addr */ + ++#if _CALL_ELF != 2 ++ /* ----- entry point to VG_(disp_run_translations) ----- */ ++ /* PPC64 ABIv1 saves LR->16(prt_sp), CR->8(prt_sp)) */ ++ ++ /* Save lr, cr */ ++ mflr 6 ++ std 6,16(1) ++ mfcr 6 ++ std 6,8(1) ++ ++ /* New stack frame */ ++ stdu 1,-624(1) /* sp should maintain 16-byte alignment */ ++#else ++/* FIXME !!!!!!!!! */ + /* ----- entry point to VG_(disp_run_translations) ----- */ +- /* PPC64 ABI saves LR->16(prt_sp), CR->8(prt_sp)) */ ++ /* PPC64 ABIv2 saves LR->16(prt_sp), CR->8(prt_sp)) */ + + /* Save lr, cr */ + mflr 6 +@@ -97,6 +117,7 @@ VG_(disp_run_translations): + + /* New stack frame */ + stdu 1,-624(1) /* sp should maintain 16-byte alignment */ ++#endif + + /* General reg save area : 152 bytes */ + std 31,472(1) +@@ -392,6 +413,11 @@ VG_(disp_run_translations): + + /* ------ Chain me to slow entry point ------ */ + .section ".text" ++#if _CALL_ELF == 2 ++ .globl VG_(disp_cp_chain_me_to_slowEP) ++ .type VG_(disp_cp_chain_me_to_slowEP),@function ++VG_(disp_cp_chain_me_to_slowEP): ++#else + .align 2 + .globl VG_(disp_cp_chain_me_to_slowEP) + .section ".opd","aw" +@@ -402,6 +428,7 @@ VG_(disp_cp_chain_me_to_slowEP): + .type .VG_(disp_cp_chain_me_to_slowEP),@function + .globl .VG_(disp_cp_chain_me_to_slowEP) + .VG_(disp_cp_chain_me_to_slowEP): ++#endif + /* We got called. The return address indicates + where the patching needs to happen. Collect + the return address and, exit back to C land, +@@ -417,6 +444,11 @@ VG_(disp_cp_chain_me_to_slowEP): + + /* ------ Chain me to fast entry point ------ */ + .section ".text" ++#if _CALL_ELF == 2 ++ .globl VG_(disp_cp_chain_me_to_fastEP) ++ .type VG_(disp_cp_chain_me_to_fastEP),@function ++VG_(disp_cp_chain_me_to_fastEP): ++#else + .align 2 + .globl VG_(disp_cp_chain_me_to_fastEP) + .section ".opd","aw" +@@ -427,6 +459,7 @@ VG_(disp_cp_chain_me_to_fastEP): + .type .VG_(disp_cp_chain_me_to_fastEP),@function + .globl .VG_(disp_cp_chain_me_to_fastEP) + .VG_(disp_cp_chain_me_to_fastEP): ++#endif + /* We got called. The return address indicates + where the patching needs to happen. Collect + the return address and, exit back to C land, +@@ -442,6 +475,11 @@ VG_(disp_cp_chain_me_to_fastEP): + + /* ------ Indirect but boring jump ------ */ + .section ".text" ++#if _CALL_ELF == 2 ++ .globl VG_(disp_cp_xindir) ++ .type VG_(disp_cp_xindir),@function ++VG_(disp_cp_xindir): ++#else + .align 2 + .globl VG_(disp_cp_xindir) + .section ".opd","aw" +@@ -452,6 +490,7 @@ VG_(disp_cp_xindir): + .type .VG_(disp_cp_xindir),@function + .globl .VG_(disp_cp_xindir) + .VG_(disp_cp_xindir): ++#endif + /* Where are we going? */ + ld 3,OFFSET_ppc64_CIA(31) + +@@ -493,6 +532,11 @@ VG_(disp_cp_xindir): + + /* ------ Assisted jump ------ */ + .section ".text" ++#if _CALL_ELF == 2 ++ .globl VG_(disp_cp_xassisted) ++ .type VG_(disp_cp_xassisted),@function ++VG_(disp_cp_xassisted): ++#else + .align 2 + .globl VG_(disp_cp_xassisted) + .section ".opd","aw" +@@ -503,6 +547,7 @@ VG_(disp_cp_xassisted): + .type .VG_(disp_cp_xassisted),@function + .globl .VG_(disp_cp_xassisted) + .VG_(disp_cp_xassisted): ++#endif + /* r31 contains the TRC */ + mr 6,31 + li 7,0 +@@ -510,6 +555,11 @@ VG_(disp_cp_xassisted): + + /* ------ Event check failed ------ */ + .section ".text" ++#if _CALL_ELF == 2 ++ .globl VG_(disp_cp_evcheck_fail) ++ .type VG_(disp_cp_evcheck_fail),@function ++VG_(disp_cp_evcheck_fail): ++#else + .align 2 + .globl VG_(disp_cp_evcheck_fail) + .section ".opd","aw" +@@ -520,12 +570,17 @@ VG_(disp_cp_evcheck_fail): + .type .VG_(disp_cp_evcheck_fail),@function + .globl .VG_(disp_cp_evcheck_fail) + .VG_(disp_cp_evcheck_fail): ++#endif + li 6,VG_TRC_INNER_COUNTERZERO + li 7,0 + b .postamble + + ++#if _CALL_ELF == 2 ++.size .VG_(disp_run_translations), .-VG_(disp_run_translations) ++#else + .size .VG_(disp_run_translations), .-.VG_(disp_run_translations) ++#endif + + /* Let the linker know we don't need an executable stack */ + .section .note.GNU-stack,"",@progbits +Index: valgrind-3.9.0/coregrind/m_syswrap/syswrap-ppc64-linux.c +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_syswrap/syswrap-ppc64-linux.c ++++ valgrind-3.9.0/coregrind/m_syswrap/syswrap-ppc64-linux.c +@@ -78,6 +78,11 @@ void ML_(call_on_new_stack_0_1) ( Addr s + address, the second word is the TOC ptr (r2), and the third word is + the static chain value. */ + asm( ++#if _CALL_ELF == 2 ++" .globl vgModuleLocal_call_on_new_stack_0_1\n" ++" .type vgModuleLocal_call_on_new_stack_0_1,@function\n" ++"vgModuleLocal_call_on_new_stack_0_1:\n" ++#else + " .align 2\n" + " .globl vgModuleLocal_call_on_new_stack_0_1\n" + " .section \".opd\",\"aw\"\n" +@@ -88,6 +93,7 @@ asm( + " .type .vgModuleLocal_call_on_new_stack_0_1,@function\n" + " .globl .vgModuleLocal_call_on_new_stack_0_1\n" + ".vgModuleLocal_call_on_new_stack_0_1:\n" ++#endif + " mr %r1,%r3\n\t" // stack to %sp + " mtlr %r4\n\t" // retaddr to %lr + " ld 5,0(5)\n\t" // load f_ptr from f_desc[0] +@@ -170,6 +176,11 @@ ULong do_syscall_clone_ppc64_linux ( Wor + Int* parent_tid, + void/*vki_modify_ldt_t*/ * ); + asm( ++#if _CALL_ELF == 2 ++" .globl do_syscall_clone_ppc64_linux\n" ++" .type do_syscall_clone_ppc64_linux,@function\n" ++"do_syscall_clone_ppc64_linux:\n" ++#else + " .align 2\n" + " .globl do_syscall_clone_ppc64_linux\n" + " .section \".opd\",\"aw\"\n" +@@ -180,6 +191,7 @@ asm( + " .type .do_syscall_clone_ppc64_linux,@function\n" + " .globl .do_syscall_clone_ppc64_linux\n" + ".do_syscall_clone_ppc64_linux:\n" ++#endif + " stdu 1,-64(1)\n" + " std 29,40(1)\n" + " std 30,48(1)\n" +Index: valgrind-3.9.0/coregrind/m_syswrap/syscall-ppc64-linux.S +=================================================================== +--- valgrind-3.9.0.orig/coregrind/m_syswrap/syscall-ppc64-linux.S ++++ valgrind-3.9.0/coregrind/m_syswrap/syscall-ppc64-linux.S +@@ -73,6 +73,11 @@ + /* from vki_arch.h */ + #define VKI_SIG_SETMASK 2 + ++#if _CALL_ELF == 2 ++.globl ML_(do_syscall_for_client_WRK) ++.type ML_(do_syscall_for_client_WRK),@function ++ML_(do_syscall_for_client_WRK): ++#else + .align 2 + .globl ML_(do_syscall_for_client_WRK) + .section ".opd","aw" +@@ -83,6 +88,7 @@ ML_(do_syscall_for_client_WRK): + .type .ML_(do_syscall_for_client_WRK),@function + .globl .ML_(do_syscall_for_client_WRK) + .ML_(do_syscall_for_client_WRK): ++#endif + /* make a stack frame */ + stdu 1,-80(1) + std 31,72(1) diff --git a/valgrind.changes b/valgrind.changes index 5a36ed5..814e2b9 100644 --- a/valgrind.changes +++ b/valgrind.changes @@ -1,4 +1,12 @@ ------------------------------------------------------------------- +Mon Jan 13 09:12:21 UTC 2014 - normand@linux.vnet.ibm.com + +- add support of ppc64le architecture + +- added patches: + * valgrind-3.9.0-merge.patches.from.Paul.McKenney.patch + * valgrind-3.9.0-ppc64le-abiv2.patch +------------------------------------------------------------------- Fri Jan 3 19:26:23 UTC 2014 - dmueller@suse.com - add armv6-support.diff: Add support for armv6hl diff --git a/valgrind.spec b/valgrind.spec index 6938e71..3851891 100644 --- a/valgrind.spec +++ b/valgrind.spec @@ -40,6 +40,8 @@ Source0: http://valgrind.org/downloads/%{name}-%{version}.tar.bz2 # svn di svn://svn.valgrind.org/vex/tags/VEX_3_5_0 svn://svn.valgrind.org/vex/branches/VEX_3_5_BRANCH > VEX_3_5_BRANCH.diff Patch1: jit-register-unregister.diff Patch2: armv6-support.diff +Patch3: valgrind-3.9.0-merge.patches.from.Paul.McKenney.patch +Patch4: valgrind-3.9.0-ppc64le-abiv2.patch # during building the major version of glibc is built into the suppression file %define glibc_main_version %(getconf GNU_LIBC_VERSION | cut -d' ' -f2 | cut -d. -f1) %define glibc_major_version %(getconf GNU_LIBC_VERSION | cut -d' ' -f2 | cut -d. -f2) @@ -50,7 +52,7 @@ Provides: valgrind-devel = %version %endif Provides: callgrind = %version Obsoletes: callgrind < %version -ExclusiveArch: %ix86 x86_64 ppc ppc64 s390x armv7l armv7hl armv6l armv6hl +ExclusiveArch: %ix86 x86_64 ppc ppc64 ppc64le s390x armv7l armv7hl armv6l armv6hl %if %suse_version > 1100 %define building_docs 1 %else @@ -138,6 +140,8 @@ cd VEX cd .. %patch1 %patch2 +%patch3 -p1 +%patch4 -p1 %build %ifarch %arm @@ -190,6 +194,9 @@ cp -a README* NEWS AUTHORS COPYING COPYING.DOCS $RPM_BUILD_ROOT/%_defaultdocdir/ %ifarch ppc64 %_libdir/valgrind/*-ppc64-linux %endif +%ifarch ppc64le +%_libdir/valgrind/*-ppc64le-linux +%endif %ifarch s390x %_libdir/valgrind/*-s390x-linux %endif