$OpenBSD: patch-hotspot_build_bsd_makefiles_vm_make,v 1.3 2007/09/06 15:46:18 kurt Exp $
--- hotspot/build/bsd/makefiles/vm.make.orig	Sun Sep  2 14:06:00 2007
+++ hotspot/build/bsd/makefiles/vm.make	Sun Sep  2 14:06:01 2007
@@ -111,6 +111,10 @@ CPPFLAGS =           \
   ${JRE_VERSION}     \
   ${VM_DISTRO}
 
+ifdef DEFAULT_LIBPATH
+CPPFLAGS += -DDEFAULT_LIBPATH="\"$(DEFAULT_LIBPATH)\""
+endif
+
 # CFLAGS_WARN holds compiler options to suppress/enable warnings.
 CFLAGS += $(CFLAGS_WARN/BYFILE)
 
@@ -120,7 +124,7 @@ CFLAGS += $(CFLAGS/NOEX)
 # Extra flags from gnumake's invocation or environment
 CFLAGS += $(EXTRA_CFLAGS)
 
-LIBS += -lm -ldl -lpthread
+LIBS += -lm -pthread
 
 # By default, link the *.o into the library, not the executable.
 LINK_INTO$(LINK_INTO) = LIBJVM
@@ -149,7 +153,7 @@ mapfile_reorder : mapfile $(REORDERFILE)
 	rm -f $@
 	cat $^ > $@
 
-STATIC_CXX = true
+STATIC_CXX = false
 
 ifeq ($(LINK_INTO),AOUT)
   LIBJVM.o                 =
