diff --git a/ghc/includes/StgDLL.h b/ghc/includes/StgDLL.h
index 599d9e8a756e37d73fc902b49c052db90391c27c..9a0730a3c9353895bc3d148f46a39fc9fc0c4cb8 100644
--- a/ghc/includes/StgDLL.h
+++ b/ghc/includes/StgDLL.h
@@ -41,4 +41,10 @@
 # endif
 #endif
 
+#ifdef COMPILING_STDLIB
+#define DLL_IMPORT_STDLIB
+#else
+#define DLL_IMPORT_STDLIB DLLIMPORT
+#endif
+
 #endif /* __STGDLL_H__ */
diff --git a/ghc/lib/std/cbits/Makefile b/ghc/lib/std/cbits/Makefile
index 44d1ac22f891b01b1a24d9f1c53bfe8a1d52e5e7..4e4303332f400b8c3146cdb75dc81f8cff861933 100644
--- a/ghc/lib/std/cbits/Makefile
+++ b/ghc/lib/std/cbits/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.22 2000/07/09 16:06:28 panne Exp $
+# $Id: Makefile,v 1.23 2000/08/07 16:09:03 rrt Exp $
 
 TOP = ../../..
 include $(TOP)/mk/boilerplate.mk
@@ -34,6 +34,7 @@ DLL_IMPLIB_NAME = libHSstd_cbits_imp.a
 DLL_DESCRIPTION = "Haskell Prelude helpers"
 SRC_BLD_DLL_OPTS += --export-all --output-def=HSstdcbits.def DllVersionInfo.o
 SRC_BLD_DLL_OPTS += -lwinmm -lwsock32 -lHSrts_imp -lgmp -L. -L../../../rts/gmp -L../../../rts
+SRC_CC_OPTS += -optc-DCOMPILING_STDLIB
 
 #
 # Compile the files using the Haskell compiler (ghc really).