Add -lm on any arm/arm64 BSD, not just FreeBSD
@@ -419,7 +419,7 @@ ifeq ($(OSNAME), AIX)
EXTRALIB += -lm
endif
-ifeq ($(OSNAME), FreeBSD)
+ifeq ($(OSNAME), $(filter $(OSNAME),FreeBSD OpenBSD NetBSD DragonFly)
ifeq ($(ARCH), $(filter $(ARCH),arm arm64))
EXTRALIB += -lm
endif
