Index: Mk/Uses/cargo.mk =================================================================== --- Mk/Uses/cargo.mk +++ Mk/Uses/cargo.mk @@ -74,7 +74,7 @@ RUSTFLAGS+= ${CFLAGS:M-mcpu=*:S/-mcpu=/-C target-cpu=/} .endif -.if ${ARCH} == powerpc64 +.if defined(PPC_ABI) && ${PPC_ABI} == ELFv1 USE_GCC?= yes .endif Index: Mk/Uses/php.mk =================================================================== --- Mk/Uses/php.mk +++ Mk/Uses/php.mk @@ -159,7 +159,7 @@ . endif . endif -.if ${PHP_VER} == 74 && (${ARCH:Mmips*} || ${ARCH:Mpowerpc*} || ${ARCH} == sparc64) +.if ${PHP_VER} == 74 && (${ARCH:Mmips*} || (${ARCH:Mpowerpc*} && !exists(/usr/bin/clang)) || ${ARCH} == sparc64) USE_GCC= yes .endif Index: Mk/Uses/qt-dist.mk =================================================================== --- Mk/Uses/qt-dist.mk +++ Mk/Uses/qt-dist.mk @@ -172,7 +172,7 @@ ${PORTSDIR}/devel/${_QT_RELNAME}/files/extrapatch-mkspecs_common_bsd_bsd.conf \ ${PORTSDIR}/devel/${_QT_RELNAME}/files/extrapatch-mkspecs_freebsd-clang_qmake.conf \ ${PORTSDIR}/devel/${_QT_RELNAME}/files/extrapatch-mkspecs_features_data_cmake_Qt5BasicConfig.cmake.in -. if ${ARCH:Mmips*} || ${ARCH:Mpowerpc*} || ${ARCH} == sparc64 +. if ${ARCH:Mmips*} || (${ARCH:Mpowerpc*} && !exists(/usr/bin/clang)) || ${ARCH} == sparc64 _EXTRA_PATCHES_QT5+= ${PORTSDIR}/devel/${_QT_RELNAME}/files/extra-patch-mkspecs_common_g++-base.conf \ ${PORTSDIR}/devel/${_QT_RELNAME}/files/extra-patch-mkspecs_common_gcc-base.conf \ ${PORTSDIR}/devel/${_QT_RELNAME}/files/extrapatch-mkspecs_freebsd-g++_qmake.conf Index: Mk/bsd.gecko.mk =================================================================== --- Mk/bsd.gecko.mk +++ Mk/bsd.gecko.mk @@ -323,7 +323,6 @@ .elif ${ARCH:Mpowerpc*} . if ${ARCH} == "powerpc64" MOZ_EXPORT+= UNAME_m="${ARCH}" -CFLAGS+= -mminimal-toc . endif .elif ${ARCH} == "sparc64" # Work around miscompilation/mislinkage of the sCanonicalVTable hacks. Index: Mk/bsd.port.mk =================================================================== --- Mk/bsd.port.mk +++ Mk/bsd.port.mk @@ -1126,6 +1126,16 @@ .endif _EXPORTED_VARS+= ARCH +.if ${ARCH} == powerpc64 +. if !defined(PPC_ABI) +PPC_ABI!= ${CC} -dM -E - < /dev/null | ${AWK} '/_CALL_ELF/{print "ELFv"$$3}' +. if ${PPC_ABI} != ELFv2 +PPC_ABI= ELFv1 +. endif +. endif +_EXPORTED_VARS+= PPC_ABI +.endif + # Get operating system versions for a cross build .if defined(CROSS_SYSROOT) .if !exists(${CROSS_SYSROOT}/usr/include/sys/param.h)