diff --git a/configure.in b/configure.in
index 2551da6bd8f0854ba75ddf3e0ca9e88dece06a5e..74550b121d0ad82cc9a9b75c1f6464f460f4f1df 100644
--- a/configure.in
+++ b/configure.in
@@ -164,6 +164,15 @@ i[[3456]]86-*-netbsd*)
         HostVendor_CPP='unknown'
         HostOS_CPP='netbsd'
         ;;
+i[[3456]]86-*-openbsd*)
+	HostPlatform=i386-unknown-openbsd # hack again
+	TargetPlatform=i386-unknown-openbsd
+	BuildPlatform=i386-unknown-openbsd
+        HostPlatform_CPP='i386_unknown_openbsd'
+        HostArch_CPP='i386'
+        HostVendor_CPP='unknown'
+        HostOS_CPP='openbsd'
+        ;;
 i[[3456]]86-*-solaris2*)
 	HostPlatform=i386-unknown-solaris2 # hack again
 	TargetPlatform=i386-unknown-solaris2
diff --git a/distrib/configure-bin.in b/distrib/configure-bin.in
index b43fe23cf85ecaa5bdf98025b7e8df1e95c0f574..2dd90f03e6c4d80d722d1ce79f774bdb476147da 100644
--- a/distrib/configure-bin.in
+++ b/distrib/configure-bin.in
@@ -44,6 +44,8 @@ i[[3456]]86-*-freebsd[[3-9]]*)
 	TargetPlatform=i386-unknown-freebsd;;
 i[[3456]]86-*-netbsd*)
 	TargetPlatform=i386-unknown-netbsd;;
+i[[3456]]86-*-openbsd*)
+	TargetPlatform=i386-unknown-openbsd;;
 i[[3456]]86-*-solaris2*)
 	TargetPlatform=i386-unknown-solaris2;;
 i[[3456]]86-*-cygwin32*)
diff --git a/distrib/hc-build b/distrib/hc-build
index 6fb9f8687a7025bf587ed20d261e1f4a84ef9646..0b1a03c675160922c811326ea86c24a9cf9fdd0f 100644
--- a/distrib/hc-build
+++ b/distrib/hc-build
@@ -26,9 +26,9 @@ touch ghc/compiler/parser/Parser.hs
 
 echo "*** Building hsc..."
 ./configure --enable-hc-boot $configopts        || exit 1
-make boot all                                   || exit 1
+gmake boot all                                   || exit 1
 
 echo "*** Building library..."
 echo "GhcWithHscBuiltViaC=NO" >>mk/build.mk
-make -C ghc/lib clean boot all			|| exit 1
-make -C hslibs  clean boot all
+gmake -C ghc/lib clean boot all			|| exit 1
+gmake -C hslibs  clean boot all
diff --git a/ghc/compiler/nativeGen/NCG.h b/ghc/compiler/nativeGen/NCG.h
index d55e9f458ac006feedc379e272568b4763742124..e0234632f0a6254ff5b512942e76d2c91983fbe1 100644
--- a/ghc/compiler/nativeGen/NCG.h
+++ b/ghc/compiler/nativeGen/NCG.h
@@ -95,6 +95,12 @@ you will screw up the layout where they are used in case expressions!
 # define IF_OS_netbsd(x,y) y
 #endif
 -- - - - - - - - - - - - - - - - - - - - - - 
+#if openbsd_TARGET_OS
+# define IF_OS_openbsd(x,y) x
+#else
+# define IF_OS_openbsd(x,y) y
+#endif
+-- - - - - - - - - - - - - - - - - - - - - - 
 #if linux_TARGET_OS
 # define IF_OS_linux(x,y) x
 #else
diff --git a/ghc/driver/mangler/ghc-asm.lprl b/ghc/driver/mangler/ghc-asm.lprl
index 10b928f829649650c2aa168bcdb55a591915b448..605b6c2ad438064bb3640db29eff980ed9cb7f55 100644
--- a/ghc/driver/mangler/ghc-asm.lprl
+++ b/ghc/driver/mangler/ghc-asm.lprl
@@ -126,7 +126,7 @@ sub init_TARGET_STUFF {
     $T_HDR_direct   = "\t.SPACE \$TEXT\$\n\t.SUBSPA \$CODE\$\n\t\.align 4\n";
 
     #--------------------------------------------------------#
-    } elsif ( $TargetPlatform =~ /^i386-.*-(linuxaout|freebsd2|netbsd|nextstep3|cygwin32|mingw32)$/ ) {
+    } elsif ( $TargetPlatform =~ /^i386-.*-(linuxaout|freebsd2|netbsd|openbsd|nextstep3|cygwin32|mingw32)$/ ) {
 				# NeXT added but not tested. CaS
 
     $T_STABBY	    = 1; # 1 iff .stab things (usually if a.out format)
diff --git a/ghc/rts/MBlock.c b/ghc/rts/MBlock.c
index c0a619fbad87388faa202a76eeaf0a93c6008ec6..0159dfe4b4a3c0911533897268190db9f0af7cf8 100644
--- a/ghc/rts/MBlock.c
+++ b/ghc/rts/MBlock.c
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: MBlock.c,v 1.15 2000/04/03 15:24:21 rrt Exp $
+ * $Id: MBlock.c,v 1.16 2000/08/04 23:31:44 lewie Exp $
  *
  * (c) The GHC Team 1998-1999
  *
@@ -51,6 +51,8 @@
 /* NetBSD i386 shared libs are at 0x40000000
  */
 #define ASK_FOR_MEM_AT 0x50000000
+#elif openbsd_TARGET_OS
+#define ASK_FOR_MEM_AT 0x50000000
 #elif linux_TARGET_OS
 /* Any ideas?
  */