--- src/powerpc/darwin.S.orig 2023-03-15 07:19:45.000000000 -0700 +++ src/powerpc/darwin.S 2024-02-26 18:37:38.000000000 -0800 @@ -31,8 +31,6 @@ #define MODE_CHOICE(x, y) x #endif -#define machine_choice MODE_CHOICE(ppc7400,ppc64) - ; Define some pseudo-opcodes for size-independent load & store of GPRs ... #define lgu MODE_CHOICE(lwzu, ldu) #define lg MODE_CHOICE(lwz,ld) --- src/powerpc/darwin_closure.S.orig 2023-03-15 07:19:45.000000000 -0700 +++ src/powerpc/darwin_closure.S 2024-02-26 18:37:38.000000000 -0800 @@ -34,7 +34,7 @@ #define MODE_CHOICE(x, y) x #endif -#define machine_choice MODE_CHOICE(ppc7400,ppc64) +#define machine_choice MODE_CHOICE(ppc,ppc64) ; Define some pseudo-opcodes for size-independent load & store of GPRs ... #define lgu MODE_CHOICE(lwzu, ldu) --- testsuite/lib/libffi.exp.orig 2023-03-15 07:19:45.000000000 -0700 +++ testsuite/lib/libffi.exp 2024-02-26 18:37:38.000000000 -0800 @@ -516,7 +516,10 @@ proc run-many-tests { testcases extra_fl } } "gnu" { - set common "-W -Wall -Wno-psabi" + set common "-W -Wall" + if ![info exists env(LIBFFI_TEST_OLDGCC)] { + set common "$common -Wno-psabi" + } if [info exists env(LIBFFI_TEST_OPTIMIZATION)] { set optimizations [ list $env(LIBFFI_TEST_OPTIMIZATION) ] } else { --- testsuite/libffi.bhaible/bhaible.exp.orig 2023-03-15 07:19:45.000000000 -0700 +++ testsuite/libffi.bhaible/bhaible.exp 2024-02-26 18:37:38.000000000 -0800 @@ -24,7 +24,10 @@ global compiler_vendor # was done in a pretty lazy fashion, and requires the use of compiler # flags to disable warnings for now. if { [string match $compiler_vendor "gnu"] } { - set warning_options "-Wno-unused-variable -Wno-unused-parameter -Wno-unused-but-set-variable -Wno-uninitialized"; + set warning_options "-Wno-unused-variable -Wno-unused-parameter -Wno-uninitialized"; + if ![info exists env(LIBFFI_TEST_OLDGCC)] { + set common "$warning_options -Wno-unused-but-set-variable" + } } if { [string match $compiler_vendor "microsoft"] } { # -wd4996 suggest use of vsprintf_s instead of vsprintf