+$(eval $(call addPackage,$(INTEGER_LIBRARY)))
+endif
+$(eval $(call addPackage,base))
+$(eval $(call addPackage,filepath))
+$(eval $(call addPackage,array))
+$(eval $(call addPackage,bytestring))
+$(eval $(call addPackage,containers))
+
+$(eval $(call addPackage,Win32,($$(Windows),YES)))
+$(eval $(call addPackage,unix,($$(Windows),NO)))
+
+$(eval $(call addPackage,old-locale))
+$(eval $(call addPackage,old-time))
+$(eval $(call addPackage,time))
+$(eval $(call addPackage,directory))
+$(eval $(call addPackage,process))
+$(eval $(call addPackage,random))
+$(eval $(call addPackage,extensible-exceptions))
+$(eval $(call addPackage,haskell98))
+$(eval $(call addPackage,hpc))
+$(eval $(call addPackage,pretty))
+$(eval $(call addPackage,template-haskell))
+$(eval $(call addPackage,Cabal))
+$(eval $(call addPackage,binary))
+$(eval $(call addPackage,bin-package-db))
+$(eval $(call addPackage,mtl))
+$(eval $(call addPackage,utf8-string))
+
+$(eval $(call addPackage,terminfo,($$(Windows),NO)))
+
+$(eval $(call addPackage,haskeline))
+
+$(foreach pkg,$(EXTRA_PACKAGES),$(eval $(call addPackage,$(pkg))))
+
+ifneq "$(BootingFromHc)" "YES"
+PACKAGES_STAGE2 += \
+ dph/dph-base \
+ dph/dph-prim-interface \
+ dph/dph-prim-seq \
+ dph/dph-prim-par \
+ dph/dph-seq \
+ dph/dph-par
+endif
+
+# We assume that the stage0 compiler has a suitable bytestring package,
+# so we don't have to include it below.
+BOOT_PKGS = Cabal hpc extensible-exceptions binary bin-package-db
+
+# The actual .a and .so/.dll files: needed for dependencies.
+ALL_STAGE1_LIBS = $(foreach lib,$(PACKAGES),$(libraries/$(lib)_dist-install_v_LIB))
+ifeq "$(BuildSharedLibs)" "YES"
+ALL_STAGE1_LIBS += $(foreach lib,$(PACKAGES),$(libraries/$(lib)_dist-install_dyn_LIB))
+endif