gnupg: fix the build on macppc with clang:

- add `-fheinous-gnu-extensions' as seen on some other archs
- add a patch to remove the `-Wa,-mppc' flag, because clang's
  integrated assembler was unhappy with it. Proposed by jca@,
  instead of using `-no-integrated-as'.

OK jca@ (maintainer)
This commit is contained in:
cwen 2020-04-12 18:29:01 +00:00
parent ef1c07b8f8
commit a177323c68
2 changed files with 18 additions and 2 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.115 2019/07/12 02:16:23 visa Exp $
# $OpenBSD: Makefile,v 1.116 2020/04/12 18:29:01 cwen Exp $
COMMENT= GNU privacy guard - a free PGP replacement
@ -56,7 +56,8 @@ GNUPGDOCFILES= README AUTHORS COPYING THANKS TODO BUGS \
.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

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-mpi_config_links,v 1.7 2020/04/12 18:29:01 cwen Exp $
Fix "error: unsupported argument '-mppc' to option 'Wa,'" with clang on macppc
Index: mpi/config.links
--- mpi/config.links.orig
+++ mpi/config.links
@@ -234,7 +234,6 @@ case "${host}" in
echo '/* configured for {Open,Net}BSD on powerpc */' >>./mpi/asm-syntax.h
echo '#define ELF_SYNTAX' >>./mpi/asm-syntax.h
cat $srcdir/mpi/powerpc32/syntax.h >>./mpi/asm-syntax.h
- mpi_sflags="-Wa,-mppc"
path="powerpc32"
;;