--- src/powerpc/darwin.S.orig	2024-06-01 10:42:02.000000000 -0700
+++ src/powerpc/darwin.S	2025-04-17 11:40:54.000000000 -0700
@@ -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	2024-06-01 10:42:02.000000000 -0700
+++ src/powerpc/darwin_closure.S	2025-04-17 11:40:54.000000000 -0700
@@ -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	2024-06-01 10:42:02.000000000 -0700
+++ testsuite/lib/libffi.exp	2025-04-17 11:40:54.000000000 -0700
@@ -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	2024-06-01 10:42:02.000000000 -0700
+++ testsuite/libffi.bhaible/bhaible.exp	2025-04-17 11:40:54.000000000 -0700
@@ -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
