$OpenBSD: patch-config_rules_mk,v 1.11 2012/06/11 15:33:26 landry Exp $
Add -rpath $(installdir) to be sure libxul/libxpcom can open their
depending libs when being dlopen()'ed themselves
Workarounds https://bugzilla.mozilla.org/show_bug.cgi?id=668869
--- config/rules.mk.orig	Fri Jun  1 19:11:49 2012
+++ config/rules.mk	Wed Jun  6 12:49:40 2012
@@ -555,6 +555,14 @@ endif
 endif
 endif
 
+ifeq ($(OS_ARCH),OpenBSD)
+ifdef IS_COMPONENT
+EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic
+endif
+DSO_LDOPTS += -Wl,-rpath,'$(installdir)'
+OS_LDFLAGS += -Wl,-rpath,'$(installdir)'
+endif
+
 #
 # HP-UXBeOS specific section: for COMPONENTS only, add -Bsymbolic flag
 # which uses internal symbols first
