$OpenBSD: patch-hotspot_build_bsd_makefiles_vm_make,v 1.2 2007/07/13 22:52:35 kurt Exp $
--- hotspot/build/bsd/makefiles/vm.make.orig	Fri Jul  6 08:51:57 2007
+++ hotspot/build/bsd/makefiles/vm.make	Fri Jul  6 08:59:35 2007
@@ -100,6 +100,10 @@ CPPFLAGS =           \
   ${RELEASE_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)
 
@@ -109,7 +113,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
@@ -138,7 +142,7 @@ mapfile_reorder : mapfile $(REORDERFILE)
 	rm -f $@
 	cat $^ > $@
 
-STATIC_CXX = true
+STATIC_CXX = false
 
 ifeq ($(LINK_INTO),AOUT)
   LIBJVM.o                 =
