$NetBSD$

--- otherlibs/unix/Makefile.orig	2022-10-12 13:53:13.000000000 +0000
+++ otherlibs/unix/Makefile
@@ -40,7 +40,7 @@ LINKOPTS=$(addprefix -cclib ,$(WIN32_LIB
 LDOPTS=$(addprefix -ldopt ,$(WIN32_LIBS))
 else # Unix
 # dllunix.so particularly requires libm for modf symbols
-LDOPTS=$(NATIVECCLIBS)
+LDOPTS=$(NATIVECCLIBS) "$(LDFLAGS)"
 endif
 
 # C source files common to both Unix and Windows
