From 0bc9bdf159f43c50ec31e9a1670e2e04b5d4060d Mon Sep 17 00:00:00 2001 From: Rogerio Alves Date: Mon, 5 Nov 2018 10:18:38 -0600 Subject: powerpc: Fix VSCR position in ucontext (bug 24088) This patch fix VSCR position on ucontext. VSCR was read in the wrong position on ucontext structure because it was ignoring the machine endianess. [BZ #24088] * sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h (vscr_t): Added ifdef to fix read of VSCR. * sysdeps/powerpc/powerpc64/Makefile [$subdir == stdlib]: Add tst-ucontext-ppc64-vscr.c to test list. * sysdeps/powerpc/powerpc64/tst-ucontext-ppc64-vscr.c: New test file. Reviewed-by: Tulio Magno Quites Machado Filho --- sysdeps/powerpc/powerpc64/Makefile | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sysdeps/powerpc/powerpc64/Makefile') diff --git a/sysdeps/powerpc/powerpc64/Makefile b/sysdeps/powerpc/powerpc64/Makefile index a0bd0c9..6e88df1 100644 --- a/sysdeps/powerpc/powerpc64/Makefile +++ b/sysdeps/powerpc/powerpc64/Makefile @@ -59,3 +59,8 @@ $(objpfx)tst-setjmp-bug21895-static.out: $(objpfx)setjmp-bug21895.so tst-setjmp-bug21895-static-ENV = \ LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)setjmp:$(common-objpfx)elf endif + +ifeq ($(subdir),stdlib) +CFLAGS-tst-ucontext-ppc64-vscr.c += -maltivec +tests += tst-ucontext-ppc64-vscr +endif -- cgit v1.1