$OpenBSD: patch-build_make_Makefile,v 1.15 2021/04/29 04:07:21 rsadowski Exp $

Index: build/make/Makefile
--- build/make/Makefile.orig
+++ build/make/Makefile
@@ -306,8 +306,7 @@ define so_template
 # This needs further abstraction for dealing with non-GNU linkers.
 $(1):
 	$(if $(quiet),@echo "    [LD] $$@")
-	$(qexec)$$(LD) -shared $$(LDFLAGS) \
-            -Wl,--no-undefined -Wl,-soname,$$(SONAME) \
+	$(qexec)$$(LD) -shared -fPIC $$(LDFLAGS) \
             -Wl,--version-script,$$(EXPORTS_FILE) -o $$@ \
             $$(filter %.o,$$^) $$(extralibs)
 endef
@@ -392,7 +391,7 @@ LIBS=$(call enabled,LIBS)
 .libs: $(LIBS)
 	@touch $@
 $(foreach lib,$(filter %_g.a,$(LIBS)),$(eval $(call archive_template,$(lib))))
-$(foreach lib,$(filter %so.$(SO_VERSION_MAJOR).$(SO_VERSION_MINOR).$(SO_VERSION_PATCH),$(LIBS)),$(eval $(call so_template,$(lib))))
+$(foreach lib,$(filter %so.$(LIBVPX_VERSION),$(LIBS)),$(eval $(call so_template,$(lib))))
 $(foreach lib,$(filter %$(SO_VERSION_MAJOR).dylib,$(LIBS)),$(eval $(call dl_template,$(lib))))
 $(foreach lib,$(filter %$(SO_VERSION_MAJOR).dll,$(LIBS)),$(eval $(call dll_template,$(lib))))
 
