Index: Makefile
===================================================================
RCS file: /cvs/ports/lang/squeak/vm/Makefile,v
retrieving revision 1.30
diff -u -p -u -p -r1.30 Makefile
--- Makefile	11 Feb 2020 13:44:10 -0000	1.30
+++ Makefile	13 Jun 2020 10:38:10 -0000
@@ -1,6 +1,7 @@
 # $OpenBSD: Makefile,v 1.30 2020/02/11 13:44:10 kmos Exp $
 
-BROKEN-sparc64 = Many undefined references when linking
+# Undefined references to internal plugins with ld.bfd
+ONLY_FOR_ARCHS =	${LLD_ARCHS}
 
 COMMENT =	smalltalk system, vm
 
@@ -38,17 +39,21 @@ NO_TEST =		Yes
 
 FULLV =			$V-${SRCV}
 
-# XXX gnu-interp doesn't work with pie.
-#.if ${MACHINE_ARCH} != "powerpc"
-#MAKE_FLAGS +=		INTERP=gnu-interp
-#.endif
-
 MAKE_FLAGS +=		docdir=${PREFIX}/share/doc/squeak \
 			CC="${CC}" \
 			LD="${CC}"
 DESTDIRNAME =		ROOT
 SUBST_VARS +=		FULLV
 CFLAGS +=		-fgnu89-inline
+
+.if ${MACHINE_ARCH:Mpowerpc}
+# The asm used requires GNU as
+CFLAGS +=		-fno-integrated-as
+# Fix relocation errors
+CFLAGS +=		-Wa,-mregnames
+# Drop hardcoded flags and `-mno-fused-madd' is not recognised by clang
+MAKE_FLAGS +=		LIBM_CFLAGS=	
+.endif
 
 pre-patch:
 	@perl -pi -e s,\\r,\\n,g ${WRKDIST}/platforms/unix/src/vm/intplugins/SoundPlugin/*.c
Index: patches/patch-platforms_unix_config_acinclude_m4
===================================================================
RCS file: /cvs/ports/lang/squeak/vm/patches/patch-platforms_unix_config_acinclude_m4,v
retrieving revision 1.1
diff -u -p -u -p -r1.1 patch-platforms_unix_config_acinclude_m4
--- patches/patch-platforms_unix_config_acinclude_m4	14 Jan 2020 22:20:29 -0000	1.1
+++ patches/patch-platforms_unix_config_acinclude_m4	13 Jun 2020 10:38:10 -0000
@@ -1,14 +1,25 @@
 $OpenBSD: patch-platforms_unix_config_acinclude_m4,v 1.1 2020/01/14 22:20:29 sthen Exp $
 
-fix build on alpha
+fix build on alpha and macppc
 
 Index: platforms/unix/config/acinclude.m4
 --- platforms/unix/config/acinclude.m4.orig
 +++ platforms/unix/config/acinclude.m4
-@@ -255,16 +255,6 @@ fi)
+@@ -114,9 +114,6 @@ if test "$GCC" = yes; then
+   i?86)
+     ac_optflags="-fomit-frame-pointer"
+     ;;
+-  powerpc|ppc)
+-    ac_optflags="-O3 -funroll-loops -mcpu=750 -mno-fused-madd"
+-    ;;
+   esac
+   AC_DEFINE(VM_BUILD_STRING, ["Unix built on "__DATE__ " "__TIME__" Compiler: "__VERSION__])
+ else
+@@ -254,16 +251,6 @@ else ac_cv_module_prefix="lib"
+ fi)
  AC_DEFINE_UNQUOTED(VM_MODULE_PREFIX,"$mkfrags_lib_prefix")
  test "$ac_cv_module_prefix" = lib && mkfrags_lib_prefix=lib])
- 
+-
 -AC_DEFUN([AC_64BIT_ARCH],
 -[AC_MSG_CHECKING(for compiler flags to force 32-bit addresses)
 -case $host in
@@ -18,7 +29,6 @@ Index: platforms/unix/config/acinclude.m
 -    ;;
 -esac
 -AC_MSG_RESULT($CFLAGS_32)])
--
  
- ### plugin support
  
+ ### plugin support
