From aa90fd221531368063a5d713699e4b56531c7813 Mon Sep 17 00:00:00 2001 From: jca Date: Fri, 24 Aug 2018 15:47:33 +0000 Subject: [PATCH] Fix on powerpc and probably hppa (needs 8 bytes atomics) Most of the work done by kirby@, ok kirby@ tb@ --- devel/protobuf/Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/devel/protobuf/Makefile b/devel/protobuf/Makefile index ad11987ffe5..f27bfe7a6e8 100644 --- a/devel/protobuf/Makefile +++ b/devel/protobuf/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.22 2018/08/09 16:45:21 tb Exp $ +# $OpenBSD: Makefile,v 1.23 2018/08/24 15:47:33 jca Exp $ COMMENT = c++ protocol buffers @@ -33,3 +33,11 @@ CONFIGURE_STYLE = gnu CONFIGURE_ARGS += --with-zlib .include + +# avoid undefined reference to __atomic_fetch_add_8 +.if ${CHOSEN_COMPILER} == "ports-gcc" +. if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "hppa" +CONFIGURE_ENV += LIBS="-latomic" +WANTLIB += atomic +. endif +.endif