From 91a4c28de9dc90927ba0acc201c6c1577f4fde0c Mon Sep 17 00:00:00 2001 From: Piotr Kubaj Date: Fri, 22 Oct 2021 11:42:44 +0000 Subject: misc/bb: fix building on non-x86 regparm is strictly i386, but clang allows it on amd64. Building on other architectures fails with: In file included from zoom.c:56: In file included from ./zoom.h:30: ./formulas.h:53:63: error: 'regparm' is not valid on this platform int (*calculate) (number_t, number_t, number_t, number_t) REGISTERS(3); ^ ~ ./config.h:42:38: note: expanded from macro 'REGISTERS' GCC builts in just fine. --- misc/bb/Makefile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/misc/bb/Makefile b/misc/bb/Makefile index 91a4fb01cfaa..e938b862d9ae 100644 --- a/misc/bb/Makefile +++ b/misc/bb/Makefile @@ -15,11 +15,6 @@ LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= libaa.so:graphics/aalib \ libmikmod.so:audio/libmikmod -BROKEN_aarch64= fails to build: regparm is not valid on this platform -BROKEN_armv6= fails to build: regparm is not valid on this platform -BROKEN_armv7= fails to build: regparm is not valid on this platform -BROKEN_riscv64= fails to build: regparm is not valid on this platform - GNU_CONFIGURE= yes WRKSRC= ${WRKDIR}/bb-1.3.0 PORTDOCS= README @@ -28,6 +23,12 @@ PLIST_FILES= bin/bb man/man1/bb.1.gz share/bb/bb.s3m share/bb/bb2.s3m \ OPTIONS_DEFINE= DOCS +.include + +.if ${ARCH} != amd64 && ${ARCH} != i386 +USES+= compiler:gcc-c++11-lib +.endif + pre-patch: @${FIND} ${WRKSRC} -type f | ${XARGS} ${REINPLACE_CMD} -E -e "s@#include +@#include @g" \ -e 's, REGISTERS \(3\),,g' -- cgit v1.2.3