diff --git a/ghc.mk b/ghc.mk
index 8918441b837e2eae5437fbce6729e5b2ed4fc416..e653aae88f26bef4a4966a9f38eb4f61fc00cad8 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -598,15 +598,9 @@ libraries/ghci_dist-install_CONFIGURE_OPTS += --flags=ghci
 
 # We want the ghc-prim package to include the GHC.Prim module when it
 # is registered, but not when it is built, because GHC.Prim is not a
-# real source module, it is built-in to GHC.  The old build system did
-# this using Setup.hs, but we can't do that here, so we have a flag to
-# enable GHC.Prim in the .cabal file (so that the ghc-prim package
-# remains compatible with the old build system for the time being).
-# GHC.Prim module in the ghc-prim package with a flag:
-#
-libraries/ghc-prim_CONFIGURE_OPTS += --flag=include-ghc-prim
+# real source module, it is built-in to GHC.
 
-# And then we strip it out again before building the package:
+# Strip it out again before building the package:
 define libraries/ghc-prim_PACKAGE_MAGIC
 libraries/ghc-prim_dist-install_MODULES := $$(filter-out GHC.Prim,$$(libraries/ghc-prim_dist-install_MODULES))
 endef
diff --git a/libraries/Cabal b/libraries/Cabal
index 357d49d826004c022f3b4871f16d753e1b932b54..97c66f2c7698f0aea4277acb66b918b7341b3d01 160000
--- a/libraries/Cabal
+++ b/libraries/Cabal
@@ -1 +1 @@
-Subproject commit 357d49d826004c022f3b4871f16d753e1b932b54
+Subproject commit 97c66f2c7698f0aea4277acb66b918b7341b3d01
diff --git a/libraries/ghc-prim/ghc-prim.cabal b/libraries/ghc-prim/ghc-prim.cabal
index ca50808469cad4727f800edb517bfda12b67c156..9b8c1ac196b8039d84ab70a63d6e326d35ef4ced 100644
--- a/libraries/ghc-prim/ghc-prim.cabal
+++ b/libraries/ghc-prim/ghc-prim.cabal
@@ -1,3 +1,4 @@
+cabal-version:  2.1
 name:           ghc-prim
 version:        0.5.2.0
 -- NOTE: Don't forget to update ./changelog.md
@@ -7,7 +8,6 @@ category:       GHC
 maintainer:     libraries@haskell.org
 bug-reports:    http://ghc.haskell.org/trac/ghc/newticket?component=libraries%20%28other%29&keywords=ghc-prim
 synopsis:       GHC primitives
-cabal-version:  >=1.10
 build-type:     Custom
 description:
     This package contains the primitive types and operations supplied by GHC.
@@ -19,10 +19,6 @@ source-repository head
     location: http://git.haskell.org/ghc.git
     subdir:   libraries/ghc-prim
 
-flag include-ghc-prim
-    Description: Include GHC.Prim in exposed-modules
-    default: False
-
 custom-setup
     setup-depends: base >= 4 && < 5, Cabal >= 1.23
 
@@ -53,6 +49,9 @@ Library
         GHC.Tuple
         GHC.Types
 
+    virtual-modules:
+        GHC.Prim
+
     -- OS Specific
     if os(windows)
         -- Windows requires some extra libraries for linking because the RTS
@@ -67,9 +66,6 @@ Library
         --         on Windows. Required because of mingw32.
         extra-libraries: user32, mingw32, mingwex
 
-    if flag(include-ghc-prim)
-        exposed-modules: GHC.Prim
-
     c-sources:
         cbits/atomic.c
         cbits/bswap.c
diff --git a/utils/ghc-cabal/Main.hs b/utils/ghc-cabal/Main.hs
index 9d0ffcff9ac8208a3b4972ce15ffd3a9b9edfc4f..440ab0b7d09069d56647f093771361a0e39752fe 100644
--- a/utils/ghc-cabal/Main.hs
+++ b/utils/ghc-cabal/Main.hs
@@ -145,26 +145,12 @@ doCopy directory distDir
                      else ["--destdir", myDestDir])
                  ++ args
          copyHooks = userHooks {
-                         copyHook = noGhcPrimHook
-                                  $ modHook False
+                         copyHook = modHook False
                                   $ copyHook userHooks
                      }
 
      defaultMainWithHooksArgs copyHooks copyArgs
     where
-      noGhcPrimHook f pd lbi us flags
-              = let pd'
-                     | packageName pd == mkPackageName "ghc-prim" =
-                        case library pd of
-                        Just lib ->
-                            let ghcPrim = fromJust (simpleParse "GHC.Prim")
-                                ems = filter (ghcPrim /=) (exposedModules lib)
-                                lib' = lib { exposedModules = ems }
-                            in pd { library = Just lib' }
-                        Nothing ->
-                            error "Expected a library, but none found"
-                     | otherwise = pd
-                in f pd' lbi us flags
       modHook relocatableBuild f pd lbi us flags
        = do let verbosity = normal
                 idts = updateInstallDirTemplates relocatableBuild