nixpkgs/pkgs/development/libraries/libffi/libffi-powerpc64.patch
Sergei Trofimovich 55886c3946 pkgsCross.ppc64.libffi: pull upstream patch to support gcc-12
Without the change `libffi` fails to build against `gcc-12` as:

    libtool: compile:  powerpc64-unknown-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude \
        -I../src -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math -Wall -fexceptions -c ../src/tramp.c \
        -fPIC -DPIC -o src/.libs/tramp.o
    ../src/powerpc/linux64_closure.S: Assembler messages:
    ../src/powerpc/linux64_closure.S:363: Error: unrecognized opcode: `lvx'

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2022-06-02 22:44:25 +01:00

24 lines
480 B
Diff

https://github.com/libffi/libffi/issues/668
--- a/src/powerpc/linux64.S
+++ b/src/powerpc/linux64.S
@@ -29,6 +29,8 @@
#include <fficonfig.h>
#include <ffi.h>
+ .machine altivec
+
#ifdef POWERPC64
.hidden ffi_call_LINUX64
.globl ffi_call_LINUX64
--- a/src/powerpc/linux64_closure.S
+++ b/src/powerpc/linux64_closure.S
@@ -30,6 +30,8 @@
.file "linux64_closure.S"
+ .machine altivec
+
#ifdef POWERPC64
FFI_HIDDEN (ffi_closure_LINUX64)
.globl ffi_closure_LINUX64