From a177323c689c31679fa7604073760bb8b51b4d75 Mon Sep 17 00:00:00 2001 From: cwen Date: Sun, 12 Apr 2020 18:29:01 +0000 Subject: [PATCH] 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) --- security/gnupg/Makefile | 5 +++-- security/gnupg/patches/patch-mpi_config_links | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 security/gnupg/patches/patch-mpi_config_links diff --git a/security/gnupg/Makefile b/security/gnupg/Makefile index 969ed250dbe..de23bb01eae 100644 --- a/security/gnupg/Makefile +++ b/security/gnupg/Makefile @@ -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 .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 diff --git a/security/gnupg/patches/patch-mpi_config_links b/security/gnupg/patches/patch-mpi_config_links new file mode 100644 index 00000000000..c6b394c5433 --- /dev/null +++ b/security/gnupg/patches/patch-mpi_config_links @@ -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" + ;; +