Hi,

gnupg is broken in the current macppc bulk for two reasons:

> error: invalid use of a cast in an inline asm context requiring an
> l-value

This needs `-fheinous-gnu-extensions' as seen on other archs.

> error: unsupported argument '-mppc' to option 'Wa,'

The integrated assembler being unhappy with that flag, i disabled it.

The below diff fixes the build [0] on macppc, and tests pass. No
REVISION bump needed, because we've never shipped packages with
'_SYSTEM_VERSION-powerpc=1'.

Comments/feedback are welcome,

Charlène.


[0] https://bin.charlenew.xyz/macppc/paths/security/gnupg.log


Index: Makefile
===================================================================
RCS file: /cvs/ports/security/gnupg/Makefile,v
retrieving revision 1.115
diff -u -p -u -p -r1.115 Makefile
--- Makefile    12 Jul 2019 02:16:23 -0000      1.115
+++ Makefile    12 Apr 2020 13:02:21 -0000
@@ -56,7 +56,8 @@ GNUPGDOCFILES=        README AUTHORS COPYING TH
 
 .include <bsd.port.arch.mk>
 .if (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "mips64" || \
-     ${MACHINE_ARCH} == "mips64el") && ${PROPERTIES:Mclang}
+     ${MACHINE_ARCH} == "mips64el" || ${MACHINE_ARCH} == "powerpc") \
+     && ${PROPERTIES:Mclang}
 CFLAGS += -fheinous-gnu-extensions
 .endif
 
@@ -64,6 +65,11 @@ CFLAGS += -fheinous-gnu-extensions
 pre-configure:
        # mpi/hppa1.1/udiv-qrnnd.S is not PIE-safe
        mv ${WRKSRC}/mpi/hppa/udiv-qrnnd.S ${WRKSRC}/mpi/hppa1.1/
+.endif
+
+# Fix "error: unsupported argument '-mppc' to option 'Wa,'"
+.if ${MACHINE_ARCH} == "powerpc"
+CFLAGS+=       -no-integrated-as
 .endif
 
 post-install:

Reply via email to